mirror of
https://github.com/BepInEx/mono.git
synced 2026-11-16 01:41:18 -10:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d01276bb36 | ||
|
|
7f1768441c | ||
|
|
39d89a335c | ||
|
|
a533cb343b | ||
|
|
c5b8988d22 | ||
|
|
15eab7066c | ||
|
|
e0e035e3b1 | ||
|
|
4e0a2ac0dd | ||
|
|
02928166e5 | ||
|
|
6c1f4b9746 | ||
|
|
4fe3280bba | ||
|
|
12ae4f9b0c | ||
|
|
a2b95fbb4b | ||
|
|
f795aa5d2d | ||
|
|
04493d2224 | ||
|
|
35284c340c | ||
|
|
077307fce4 | ||
|
|
1ad118647c | ||
|
|
86f99d31bd | ||
|
|
97aa066389 | ||
|
|
37091f00c2 | ||
|
|
955ad4538e | ||
|
|
fc0c12f768 | ||
|
|
c495285cac | ||
|
|
d18b8941ab | ||
|
|
1bdbf71a8b | ||
|
|
cae8c54884 | ||
|
|
8b479398bb | ||
|
|
9ef7249458 | ||
|
|
cd5d306ea0 | ||
|
|
8b628bb532 | ||
|
|
671db7c46d | ||
|
|
a57665c315 | ||
|
|
f552ff99a1 | ||
|
|
4e1474e9e3 | ||
|
|
f3235f3d03 | ||
|
|
3467e374ba | ||
|
|
f353dc4db0 | ||
|
|
f59eac4c0f | ||
|
|
a37e6e5739 | ||
|
|
6f9bef3bdb | ||
|
|
1c24c158b0 | ||
|
|
a49a68c6d7 | ||
|
|
92e11812f4 | ||
|
|
260676f948 | ||
|
|
eefdf4ed31 | ||
|
|
0754926394 | ||
|
|
7bdb7dd765 | ||
|
|
65d719d16e | ||
|
|
88262b52d2 | ||
|
|
aaed1f77ce | ||
|
|
58637d0ee7 | ||
|
|
c22f532871 | ||
|
|
d2a4141475 | ||
|
|
5db90bde0c | ||
|
|
21716f8b68 | ||
|
|
f2381f329a | ||
|
|
4afcb37eca | ||
|
|
139d2a441b | ||
|
|
76c1c1baec | ||
|
|
9529b37b69 | ||
|
|
f80aeb547f | ||
|
|
cbbe573e20 | ||
|
|
f80ae8146f | ||
|
|
5152e84055 | ||
|
|
35d4d7e8e6 | ||
|
|
d3fa0e12d0 | ||
|
|
2c0121911d | ||
|
|
fc45400caa | ||
|
|
baf8448122 | ||
|
|
e6b6562cdc | ||
|
|
c0bf542e2a | ||
|
|
4f23989316 | ||
|
|
514c06b12f | ||
|
|
d785f7d7f0 | ||
|
|
b7ea31a324 | ||
|
|
8d2dc95494 | ||
|
|
93e3dafc38 | ||
|
|
965c939531 | ||
|
|
7c317d0af3 | ||
|
|
6ec37b18d9 | ||
|
|
2a90cd598d | ||
|
|
48fcc7e350 | ||
|
|
90b0ea99cd | ||
|
|
217d0c7ab7 | ||
|
|
9824e260f5 | ||
|
|
a085951264 | ||
|
|
b4a42e6e4b | ||
|
|
a0228295dc | ||
|
|
91509419f5 | ||
|
|
07ba54237d | ||
|
|
5130d89a0d | ||
|
|
78740e252b | ||
|
|
0d37a86d2c | ||
|
|
9061f77e7f | ||
|
|
700f316825 | ||
|
|
12d764f5a0 | ||
|
|
638a7ed3b0 | ||
|
|
6c5b8bcc39 | ||
|
|
b1dda64bda | ||
|
|
64ec2dd3eb | ||
|
|
9bbc930d62 | ||
|
|
891c01eb6e | ||
|
|
e03516d11f | ||
|
|
4a00c501b2 | ||
|
|
34b31f05f5 | ||
|
|
8e08947e1c | ||
|
|
d96186b5e8 | ||
|
|
763e7f9d78 | ||
|
|
35cb6bda95 | ||
|
|
61da4c7a5f | ||
|
|
2710e67296 | ||
|
|
dbf27d49ad | ||
|
|
02390a7414 | ||
|
|
cea4294912 | ||
|
|
9e7efad7be | ||
|
|
d0562a9e6f | ||
|
|
887d3ad27e | ||
|
|
363790b1ec | ||
|
|
bf838da659 | ||
|
|
c530c5182f | ||
|
|
e310966925 | ||
|
|
5c2ab44dec | ||
|
|
0fac09cf89 | ||
|
|
02d69477dd | ||
|
|
54f51bf701 | ||
|
|
0ca09346e3 | ||
|
|
f5989de3b4 | ||
|
|
8ad8623646 | ||
|
|
19cc4c427a | ||
|
|
e88bfbcbce | ||
|
|
7048fb45ab | ||
|
|
2c564f83f2 | ||
|
|
3c52f0a4a9 | ||
|
|
c5f99aa4dc | ||
|
|
1e35db0ae2 | ||
|
|
88f5058a33 | ||
|
|
0d5eb5c9bb | ||
|
|
723f194cdc | ||
|
|
a5e4482376 | ||
|
|
95cc49a65c | ||
|
|
dea448aa83 | ||
|
|
21cef8b793 | ||
|
|
0ba54d6bdd | ||
|
|
c3e00ab9bc | ||
|
|
30b5b2b188 | ||
|
|
29adf3012f | ||
|
|
d6fde73640 | ||
|
|
572c33ae18 | ||
|
|
dcdd956e1b | ||
|
|
811e3b4dcd | ||
|
|
25aba4e86e | ||
|
|
ae7f365c06 | ||
|
|
cda8574a88 | ||
|
|
a6b0e1ccbe | ||
|
|
7ee378c904 | ||
|
|
511ca9f507 | ||
|
|
88b5266376 | ||
|
|
4aa9fd41b8 | ||
|
|
4bf541a969 | ||
|
|
b250b4a657 | ||
|
|
6c324b91b2 | ||
|
|
77fc4cfa2e | ||
|
|
3984508a04 | ||
|
|
67a2468db9 | ||
|
|
da0e172ae5 | ||
|
|
1c9d8aad07 | ||
|
|
c6fc176f5c | ||
|
|
c9bf7a3878 | ||
|
|
d37075a949 | ||
|
|
42fc0bd51f | ||
|
|
2487301faf | ||
|
|
0d6be4da5e | ||
|
|
ebbed2bb87 | ||
|
|
e5bad88ebb | ||
|
|
238c21cf77 | ||
|
|
2fbd5a16a3 | ||
|
|
a13c12ac99 | ||
|
|
bdf405fae4 | ||
|
|
ce612bb49e | ||
|
|
0a3d40ac60 | ||
|
|
c17d8c6dcd | ||
|
|
07d5a031d4 | ||
|
|
ff546b9d8b | ||
|
|
9922d1af20 | ||
|
|
875240538e | ||
|
|
e29f146ab3 | ||
|
|
535bfc5d84 | ||
|
|
5b66de0bf0 | ||
|
|
a6c7b9eca4 | ||
|
|
3577465fcd | ||
|
|
7d9e106c03 | ||
|
|
3931767dca | ||
|
|
deb3474e7c | ||
|
|
27c7a4b01e | ||
|
|
da5b39d785 | ||
|
|
7f69ff87b5 | ||
|
|
e33bf27c9a | ||
|
|
79030a3284 | ||
|
|
e74d4a6e31 | ||
|
|
c2fe39f13e | ||
|
|
0d8de253cb | ||
|
|
e9c512092d | ||
|
|
08a7043b66 | ||
|
|
cb89a1575c | ||
|
|
1a0508a58c | ||
|
|
d67d75a4f3 | ||
|
|
6036b45bce | ||
|
|
9136f4c1a0 | ||
|
|
abb82546d7 | ||
|
|
6af13f6e83 | ||
|
|
c684567bd7 | ||
|
|
4ab5e8a495 | ||
|
|
ed56e90aca | ||
|
|
57e18b15d0 | ||
|
|
279d7e230f | ||
|
|
2ce1d5f3d5 | ||
|
|
668baf1915 | ||
|
|
2201952d9a | ||
|
|
4d3e9d53b2 | ||
|
|
2476d2ac06 | ||
|
|
91fe1eb5f5 | ||
|
|
bb0c123e74 | ||
|
|
e965e1647d | ||
|
|
a652297384 | ||
|
|
685d39238a | ||
|
|
3648ace2b9 | ||
|
|
b62bfdcb55 | ||
|
|
9f2841c3a0 | ||
|
|
6f90188e9f | ||
|
|
84027bddaa | ||
|
|
66f19a974a | ||
|
|
99b7f59ddc | ||
|
|
f28abdbebd | ||
|
|
2dc56b5a60 | ||
|
|
58d02a9603 | ||
|
|
fa1ec4ac4d | ||
|
|
30aadcaa3a | ||
|
|
214321dee5 | ||
|
|
413f2fb976 | ||
|
|
020ac2de89 | ||
|
|
769bf9ef25 | ||
|
|
878a54030a | ||
|
|
a849f9a6e8 | ||
|
|
d9aa6f4083 | ||
|
|
c0b76ff9ae | ||
|
|
5cef19dcd2 | ||
|
|
ffe180c47f | ||
|
|
c627c1b4b6 | ||
|
|
d0e7df4717 | ||
|
|
28c171a337 | ||
|
|
0c8f0774ce | ||
|
|
6a1b416592 | ||
|
|
078760db9b | ||
|
|
ffc643d10c | ||
|
|
6ed6a1b568 | ||
|
|
33b47292c3 | ||
|
|
df0a29e779 | ||
|
|
6ccf73c8c8 | ||
|
|
d6b6fc61f1 | ||
|
|
8249522f23 | ||
|
|
2623bc3045 | ||
|
|
3be3714b6e | ||
|
|
daace66339 | ||
|
|
fd18515516 | ||
|
|
c68cc6a4f4 | ||
|
|
4169af750b | ||
|
|
ed22f9fa84 | ||
|
|
d389ff9ff6 | ||
|
|
d1f461c5a3 | ||
|
|
4e29f2ef9a | ||
|
|
b242e82ba4 | ||
|
|
9c9d5d9e22 | ||
|
|
f8ed9bcd12 | ||
|
|
578cfcd146 | ||
|
|
93705443b6 | ||
|
|
5f626db882 | ||
|
|
6cb693c4b5 | ||
|
|
e96f9fbb4a | ||
|
|
6559a504ed | ||
|
|
c62864c98e | ||
|
|
c5accf5ebc | ||
|
|
470256aca5 | ||
|
|
f0f76abc30 | ||
|
|
e7e28f4b9d | ||
|
|
00dec1f0c0 | ||
|
|
e0c46d9114 | ||
|
|
ba542c0b1e | ||
|
|
72aea0056b | ||
|
|
0dfa4f85a9 | ||
|
|
d956447d56 | ||
|
|
4aa717dc82 | ||
|
|
d8e28e14a5 | ||
|
|
176f127c1b | ||
|
|
764b03fcab | ||
|
|
1df45be2e9 | ||
|
|
e9fa8a306d | ||
|
|
7126712f86 | ||
|
|
07a5c686e0 | ||
|
|
bc64a17db8 | ||
|
|
f3c1fcd7c9 | ||
|
|
268f2ac419 | ||
|
|
ebb26ab546 | ||
|
|
01e35bc383 | ||
|
|
4e374e8cea | ||
|
|
94a8a589c8 | ||
|
|
fd7c5cdac6 | ||
|
|
942dd07c65 | ||
|
|
f403697225 | ||
|
|
20ada1bc3b | ||
|
|
3320f45d98 | ||
|
|
f804385745 | ||
|
|
8f16dd35ba | ||
|
|
fe918745d5 |
No files matched your search
+4
-7
@@ -1,6 +1,3 @@
|
||||
# diff settings
|
||||
*.cs diff=csharp
|
||||
|
||||
# ensure LF endings on all checkouts
|
||||
configure.ac crlf=input
|
||||
config.rpath crlf=input
|
||||
@@ -16,11 +13,11 @@ mkinstalldirs crlf=input
|
||||
*.h crlf
|
||||
*.cs crlf
|
||||
*.il crlf
|
||||
*.sln crlf
|
||||
*.*proj* crlf
|
||||
|
||||
# don't do anything to line-endings. Let CRLFs/LFs go into the repo, and CRLF/LFs on checkout
|
||||
*.bat -crlf
|
||||
# don't do anything to line-endings. Let CRLFs go into the repo, and CRLF on checkout
|
||||
*.bat -crlf
|
||||
*.sln -crlf
|
||||
*.*proj* -crlf
|
||||
*.xml -crlf
|
||||
|
||||
# CRLF Handling
|
||||
|
||||
@@ -1,161 +0,0 @@
|
||||
# Mono Code Owners File
|
||||
#
|
||||
# GitHub uses this file to determine who to assign for reviews
|
||||
# on pull requests. Please keep this file alphabetically sorted.
|
||||
#
|
||||
# References:
|
||||
#
|
||||
# https://github.com/blog/2392-introducing-code-owners
|
||||
# https://help.github.com/articles/about-codeowners
|
||||
|
||||
|
||||
# These owners will be the default owners for everything in the repo.
|
||||
* @marek-safar
|
||||
|
||||
# Order is important. The last matching pattern has the most precedence.
|
||||
|
||||
/acceptance-tests @akoeplinger @kg
|
||||
/acceptance-tests/profiler-stress* @BrzVlad @akoeplinger
|
||||
|
||||
/data @directhex @akoeplinger
|
||||
/data/gdb @lewurm @vargaz
|
||||
/data/lldb @lewurm @vargaz
|
||||
|
||||
/docs @marek-safar @akoeplinger
|
||||
/docs/riscv.md @alexrp @lewurm
|
||||
/docs/sources/mono-api-profiler.html @BrzVlad
|
||||
|
||||
/external @akoeplinger @marek-safar
|
||||
/external/api-snapshot @marek-safar @akoeplinger
|
||||
/external/binary-reference-assemblies @marek-safar @akoeplinger
|
||||
/external/bockbuild @akoeplinger @alexischr
|
||||
/external/boringssl @baulig
|
||||
/external/cecil @marek-safar @akoeplinger
|
||||
/external/corefx @akoeplinger @marek-safar @egorbo @steveisok
|
||||
/external/corert @akoeplinger @marek-safar @egorbo @steveisok
|
||||
/external/linker @marek-safar
|
||||
/external/llvm-project @SamMonoRT @vargaz @imhameed
|
||||
/external/nuget-buildtasks @radical @akoeplinger
|
||||
/external/roslyn-binaries @kg @marek-safar @akoeplinger @lewing
|
||||
|
||||
/libgc @BrzVlad @vargaz @naricc
|
||||
|
||||
/llvm @vargaz @SamMonoRT @imhameed
|
||||
|
||||
/man @marek-safar @miguel
|
||||
/man/*prof* @BrzVlad
|
||||
|
||||
/mcs @marek-safar @akoeplinger @egorbo
|
||||
|
||||
/mcs/build @marek-safar @akoeplinger
|
||||
|
||||
/mcs/class @steveisok @akoeplinger
|
||||
/mcs/class/corlib/System.Reflection*/ @vargaz @lambdageek
|
||||
/mcs/class/corlib/System.Security.Cryptography.X509Certificates @baulig @steveisok
|
||||
/mcs/class/Mono.Btls.Interface @baulig @steveisok
|
||||
/mcs/class/Mono.Data.Tds @egorbo
|
||||
/mcs/class/Mono.Debugger.Soft @vargaz @thaystg
|
||||
/mcs/class/Mono.Options @jonpryor @marek-safar
|
||||
/mcs/class/Mono.Profiler.Log @lambdageek
|
||||
/mcs/class/Mono.Security/Mono.Security/Interface @baulig @steveisok
|
||||
/mcs/class/System/Mono.AppleTls @baulig @rolf
|
||||
/mcs/class/System/Mono.Btls @baulig @marek-safar
|
||||
/mcs/class/System/Mono.Net.Security @baulig @steveisok
|
||||
/mcs/class/System/Mono.Security.Interface @baulig @steveisok
|
||||
/mcs/class/System/System.Security.Cryptography.X509Certificates @baulig @steveisok
|
||||
/mcs/class/System.Data* @egorbo @steveisok
|
||||
|
||||
/mcs/errors @marek-safar @lewurm
|
||||
/mcs/ilasm @marek-safar @lewurm
|
||||
/mcs/jay @marek-safar @lewurm
|
||||
/mcs/mcs @marek-safar @lewurm
|
||||
/mcs/tests @marek-safar @lewurm
|
||||
|
||||
/mcs/tools @marek-safar @akoeplinger @steveisok
|
||||
/mcs/tools/gensources @kg @akoeplinger
|
||||
/mcs/tools/resx2sr @baulig
|
||||
/mcs/tools/upload-to-sentry @directhex @akoeplinger
|
||||
|
||||
/mono/arch @vargaz @lewurm
|
||||
|
||||
/mono/btls @baulig @marek-safar
|
||||
/mono/dis @lambdageek @vargaz
|
||||
/mono/eglib @vargaz @lambdageek
|
||||
|
||||
/mono/benchmark @SamMonoRT @lewurm
|
||||
|
||||
/mono/metadata @vargaz @lambdageek @thaystg
|
||||
/mono/metadata/*profiler* @lambdageek
|
||||
/mono/metadata/handle* @lambdageek @vargaz
|
||||
/mono/metadata/monitor* @brzvlad @vargaz
|
||||
/mono/metadata/sgen* @brzvlad @vargaz @naricc
|
||||
/mono/metadata/thread* @lateralusX @lambdageek
|
||||
/mono/metadata/w32* @lateralusX @lambdageek
|
||||
/mono/metadata/*-win* @lateralusX @lambdageek
|
||||
/mono/metadata/appdomain* @vargaz @lambdageek @CoffeeFlux
|
||||
/mono/metadata/assembly* @vargaz @lambdageek @CoffeeFlux
|
||||
/mono/metadata/domain* @vargaz @lambdageek @CoffeeFlux
|
||||
/mono/metadata/loader* @vargaz @lambdageek @CoffeeFlux
|
||||
/mono/metadata/native-library* @vargaz @lambdageek @CoffeeFlux
|
||||
/mono/metadata/*-unix* @lambdageek @CoffeeFlux
|
||||
|
||||
/mono/mini @vargaz @lewurm @lambdageek @SamMonoRT
|
||||
/mono/mini/*cfgdump* @lewurm @vargaz
|
||||
/mono/mini/*exceptions* @lewurm @vargaz @BrzVlad
|
||||
/mono/mini/*ppc* @lewurm @vargaz
|
||||
/mono/mini/*riscv* @alexrp @lewurm
|
||||
/mono/mini/*type-check* @lewurm @lambdageek
|
||||
/mono/mini/*llvm* @vargaz @imhameed
|
||||
/mono/mini/interp/* @lewurm @BrzVlad
|
||||
/mono/mini/*profiler* @BrzVlad @lambdageek
|
||||
/mono/mini/debugger-agent.c @vargaz @thaystg @DavidKarlas @lambdageek
|
||||
|
||||
/mono/native @baulig @egorbo @alexischr @marek-safar
|
||||
|
||||
/mono/profiler @BrzVlad @lambdageek
|
||||
|
||||
/mono/sgen @BrzVlad @lambdageek
|
||||
|
||||
/mono/utils @vargaz @lewurm @lambdageek
|
||||
/mono/utils/atomic* @lewurm @vargaz
|
||||
/mono/utils/mono-hwcap* @lewurm @vargaz
|
||||
/mono/utils/mono-mem* @lewurm @vargaz
|
||||
/mono/utils/mono-merp* @alexischr @lambdageek
|
||||
/mono/utils/mono-state* @alexischr @lambdageek
|
||||
/mono/utils/mono-threads* @lambdageek @vargaz
|
||||
/mono/utils/*-win* @lateralusX @lambdageek
|
||||
|
||||
/msvc @lateralusX @kg @akoeplinger
|
||||
/msvc/scripts @akoeplinger @kg
|
||||
|
||||
/netcore @marek-safar @akoeplinger @egorbo @vargaz @steveisok
|
||||
|
||||
/packaging @alexischr @akoeplinger @directhex
|
||||
/packaging/MacSDK/msbuild.py @radical @akoeplinger
|
||||
|
||||
/runtime @akoeplinger @marek-safar
|
||||
|
||||
/samples @lambdageek @lewurm
|
||||
/samples/profiler @BrzVlad @lambdageek
|
||||
/samples/size @alexrp @lambdageek
|
||||
|
||||
/scripts @akoeplinger @directhex
|
||||
/scripts/ci @akoeplinger @directhex
|
||||
|
||||
/sdks @marek-safar @lewurm @vargaz @lambdageek
|
||||
/sdks/builds/android* @alexischr @jonpryor
|
||||
/sdks/builds/mxe* @alexischr @jonpryor
|
||||
/sdks/builds/ios* @vargaz @rolfbjarne
|
||||
/sdks/builds/wasm* @vargaz @kjpou1 @lewing
|
||||
/sdks/wasm @vargaz @kjpou1 @kg @lewing
|
||||
/sdks/ios @vargaz @rolfbjarne
|
||||
/sdks/android @alexischr @jonpryor
|
||||
|
||||
/support @lambdageek @vargaz
|
||||
|
||||
/tools @lambdageek @vargaz
|
||||
/tools/locale-builder @marek-safar @egorbo
|
||||
/tools/nuget-hash-extractor @marek-safar @radical @akoeplinger
|
||||
/tools/offsets-tool @lewurm @rolfbjarne
|
||||
/tools/pedump @lambdageek @lewurm
|
||||
/tools/sgen @brzvlad @vargaz @naricc
|
||||
+10
-12
@@ -1,7 +1,3 @@
|
||||
<!--
|
||||
If you are new to the project get yourself familiar with https://www.mono-project.com/community/bugs/make-a-good-bug-report/ before filling the issue
|
||||
-->
|
||||
|
||||
## Steps to Reproduce
|
||||
|
||||
1.
|
||||
@@ -12,19 +8,19 @@ If you are new to the project get yourself familiar with https://www.mono-projec
|
||||
You may drag & drop the attachment (repro code/solution, screenshot, etc.) onto the issue.
|
||||
-->
|
||||
|
||||
### Current Behavior
|
||||
## Current Behavior
|
||||
|
||||
<!--
|
||||
What is the current behavior?
|
||||
What is the current behaviour?
|
||||
-->
|
||||
|
||||
### Expected Behavior
|
||||
## Expected Behavior
|
||||
|
||||
<!--
|
||||
Please describe the behavior you are expecting
|
||||
Please describe the behaviour you are expecting
|
||||
-->
|
||||
|
||||
## On which platforms did you notice this
|
||||
### On which platforms did you notice this
|
||||
|
||||
[ ] macOS
|
||||
[ ] Linux
|
||||
@@ -36,12 +32,14 @@ Please describe the behavior you are expecting
|
||||
You can use `mono --version` or About dialog to obtain this information.
|
||||
-->
|
||||
|
||||
## Stacktrace
|
||||
### Stacktrace
|
||||
|
||||
```
|
||||
Please paste the stack trace here if available.
|
||||
Please paste the stacktrace here if available.
|
||||
```
|
||||
|
||||
<!--
|
||||
|
||||
You can join us at https://gitter.im/mono/mono to discuss your reported issue
|
||||
-->
|
||||
|
||||
-->
|
||||
+1
-20
@@ -24,6 +24,7 @@
|
||||
*.tlh
|
||||
*.bak
|
||||
*.ilk
|
||||
*.log
|
||||
*.lib
|
||||
*.sbr
|
||||
*.sdf
|
||||
@@ -39,7 +40,6 @@ Ankh.NoLoad
|
||||
*.gpState
|
||||
.vscode/
|
||||
*.exp
|
||||
.vs/
|
||||
|
||||
# Tooling
|
||||
_ReSharper*/
|
||||
@@ -88,9 +88,7 @@ stamp-h.in
|
||||
*~
|
||||
*.swp
|
||||
*.o
|
||||
*.dylib
|
||||
.deps
|
||||
.libs
|
||||
|
||||
# Libtool
|
||||
libtool.m4
|
||||
@@ -128,24 +126,7 @@ docs/perlmod*
|
||||
compile
|
||||
mono.h
|
||||
mono-*.tar.*
|
||||
mono_crash*
|
||||
tmpinst-dir.stamp
|
||||
msvc/scripts/inputs/
|
||||
extensions-config.h
|
||||
*.dylib.dSYM
|
||||
*.mlpd
|
||||
llvm/build/
|
||||
llvm/usr/
|
||||
sdks/builds/llvm-*/
|
||||
sdks/builds/android-*/
|
||||
mcs/build/compiler-server.log
|
||||
tools/offsets-tool-py/offtool/
|
||||
tools/offsets-tool-py/clang/__pycache__
|
||||
|
||||
##############################################################################
|
||||
# Arcade output directories
|
||||
##############################################################################
|
||||
|
||||
.packages
|
||||
artifacts
|
||||
.dotnet
|
||||
-13
@@ -58,16 +58,3 @@
|
||||
[submodule "external/api-snapshot"]
|
||||
path = external/api-snapshot
|
||||
url = git://github.com/mono/api-snapshot.git
|
||||
[submodule "external/helix-binaries"]
|
||||
path = external/helix-binaries
|
||||
url = git://github.com/mono/helix-binaries.git
|
||||
[submodule "external/illinker-test-assets"]
|
||||
path = external/illinker-test-assets
|
||||
url = git://github.com/mono/illinker-test-assets.git
|
||||
[submodule "external/llvm-project"]
|
||||
path = external/llvm-project
|
||||
url = git://github.com/dotnet/llvm-project.git
|
||||
branch = release/6.x
|
||||
[submodule "external/bdwgc"]
|
||||
path = external/bdwgc
|
||||
url = git://github.com/Unity-Technologies/bdwgc.git
|
||||
Vendored
-90
@@ -1,90 +0,0 @@
|
||||
{
|
||||
"configurations": [
|
||||
{
|
||||
"name": "Mac",
|
||||
"includePath": [
|
||||
"${default}",
|
||||
"/usr/local/include",
|
||||
"${workspaceRoot}",
|
||||
"${workspaceRoot}/mono",
|
||||
"${workspaceRoot}/mono/eglib",
|
||||
"${workspaceRoot}/support"
|
||||
],
|
||||
"defines": [],
|
||||
"intelliSenseMode": "clang-x64",
|
||||
"browse": {
|
||||
"path": [
|
||||
"${default}",
|
||||
"/usr/local/include",
|
||||
"${workspaceRoot}",
|
||||
"${workspaceRoot}/mono",
|
||||
"${workspaceRoot}/mono/eglib",
|
||||
"${workspaceRoot}/support"
|
||||
],
|
||||
"limitSymbolsToIncludedHeaders": true,
|
||||
"databaseFilename": ""
|
||||
},
|
||||
"macFrameworkPath": [
|
||||
"${default}",
|
||||
"/System/Library/Frameworks",
|
||||
"/Library/Frameworks"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Linux",
|
||||
"includePath": [
|
||||
"${default}",
|
||||
"/usr/include",
|
||||
"/usr/local/include",
|
||||
"${workspaceRoot}",
|
||||
"${workspaceRoot}/mono",
|
||||
"${workspaceRoot}/mono/eglib",
|
||||
"${workspaceRoot}/support"
|
||||
],
|
||||
"defines": [],
|
||||
"intelliSenseMode": "clang-x64",
|
||||
"browse": {
|
||||
"path": [
|
||||
"${default}",
|
||||
"/usr/include",
|
||||
"/usr/local/include",
|
||||
"${workspaceRoot}",
|
||||
"${workspaceRoot}/mono",
|
||||
"${workspaceRoot}/mono/eglib",
|
||||
"${workspaceRoot}/support"
|
||||
],
|
||||
"limitSymbolsToIncludedHeaders": true,
|
||||
"databaseFilename": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Win32",
|
||||
"includePath": [
|
||||
"${default}",
|
||||
"C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/include",
|
||||
"${workspaceRoot}",
|
||||
"${workspaceRoot}/mono",
|
||||
"${workspaceRoot}/mono/eglib",
|
||||
"${workspaceRoot}/support"
|
||||
],
|
||||
"defines": [
|
||||
"_DEBUG",
|
||||
"UNICODE"
|
||||
],
|
||||
"intelliSenseMode": "msvc-x64",
|
||||
"browse": {
|
||||
"path": [
|
||||
"${default}",
|
||||
"C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/include/*",
|
||||
"${workspaceRoot}",
|
||||
"${workspaceRoot}/mono",
|
||||
"${workspaceRoot}/mono/eglib",
|
||||
"${workspaceRoot}/support"
|
||||
],
|
||||
"limitSymbolsToIncludedHeaders": true,
|
||||
"databaseFilename": ""
|
||||
}
|
||||
}
|
||||
],
|
||||
"version": 4
|
||||
}
|
||||
+133
@@ -0,0 +1,133 @@
|
||||
# Mono Code Owners File
|
||||
#
|
||||
# GitHub uses this file to determine who to assign for reviews
|
||||
# on pull requests. Please keep this file alphabetically sorted.
|
||||
#
|
||||
# References:
|
||||
#
|
||||
# https://github.com/blog/2392-introducing-code-owners
|
||||
# https://help.github.com/articles/about-codeowners
|
||||
|
||||
|
||||
# These owners will be the default owners for everything in the repo.
|
||||
* @luhenry @marek-safar
|
||||
|
||||
# Order is important. The last matching pattern has the most precedence.
|
||||
|
||||
/acceptance-tests @akoeplinger
|
||||
/acceptance-tests/profiler-stress* @alexrp
|
||||
|
||||
/data @marek-safar @akoeplinger
|
||||
/data/gdb @vargaz
|
||||
/data/lldb @lewurm @vargaz
|
||||
|
||||
/docs @luhenry @marek-safar
|
||||
/docs/sources/mono-api-profiler.html @alexrp
|
||||
|
||||
/external @marek-safar @luhenry
|
||||
/external/binary-reference-assemblies @marek-safar @akoeplinger
|
||||
/external/bockbuild @akoeplinger @alexischr
|
||||
/external/boringssl @baulig
|
||||
/external/nuget-buildtasks @radical @akoeplinger
|
||||
|
||||
/libgc @BrzVlad @vargaz
|
||||
|
||||
/llvm @vargaz
|
||||
|
||||
/man @marek-safar @miguel
|
||||
/man/*prof* @alexrp
|
||||
|
||||
/mcs @marek-safar
|
||||
|
||||
/mcs/build @marek-safar @akoeplinger
|
||||
|
||||
/mcs/class @marek-safar @akoeplinger
|
||||
/mcs/class/corlib/System.Reflection*/ @vargaz @lambdageek
|
||||
/mcs/class/Mono.Btls.Interface @baulig
|
||||
/mcs/class/Mono.Data.Tds @egorbo
|
||||
/mcs/class/Mono.Debugger.Soft @vargaz
|
||||
/mcs/class/Mono.Options @jonpryor
|
||||
/mcs/class/Mono.Profiler.Log @alexrp
|
||||
/mcs/class/Mono.Security/Mono.Security/Interface @baulig
|
||||
/mcs/class/System/Mono.AppleTls @baulig
|
||||
/mcs/class/System/Mono.Btls @baulig
|
||||
/mcs/class/System/Mono.Net.Security @baulig
|
||||
/mcs/class/System/Mono.Security.Interface @baulig
|
||||
/mcs/class/System.Data* @egorbo
|
||||
|
||||
/mcs/errors @marek-safar
|
||||
/mcs/ilasm @marek-safar
|
||||
/mcs/jay @marek-safar
|
||||
/mcs/mcs @marek-safar @lewurm
|
||||
/mcs/tests @marek-safar
|
||||
/mcs/tools @marek-safar @akoeplinger
|
||||
|
||||
/mono @luhenry
|
||||
|
||||
/mono/btls @baulig
|
||||
/mono/dis @lambdageek @vargaz
|
||||
/mono/eglib @kumpera @vargaz @luhenry
|
||||
|
||||
/mono/metadata @vargaz @kumpera
|
||||
/mono/metadata/*verify* @kumpera
|
||||
/mono/metadata/*profiler* @alexrp
|
||||
/mono/metadata/monitor* @brzvlad
|
||||
/mono/metadata/sgen* @brzvlad
|
||||
/mono/metadata/threads* @luhenry @kumpera
|
||||
/mono/metadata/threadpool* @luhenry
|
||||
/mono/metadata/w32* @luhenry
|
||||
/mono/metadata/*-win* @lateralusX @luhenry
|
||||
|
||||
/mono/mini @vargaz @kumpera
|
||||
/mono/mini/*cfgdump* @lewurm
|
||||
/mono/mini/*exceptions* @lewurm
|
||||
/mono/mini/*ppc* @lewurm
|
||||
/mono/mini/*type-check* @lewurm
|
||||
/mono/mini/interp/* @lewurm @BrzVlad
|
||||
/mono/mini/*profiler* @alexrp
|
||||
/mono/mini/debugger-agent.c @DavidKarlas
|
||||
|
||||
/mono/profiler @alexrp @kumpera
|
||||
|
||||
/mono/sdks @luhenry
|
||||
/mono/sdks/android @luhenry @jonpryor
|
||||
/mono/sdks/ios @vargaz @rolfbjarne
|
||||
/mono/sdks/wasm @kumpera @lrz
|
||||
|
||||
/mono/sgen @BrzVlad @kumpera
|
||||
|
||||
/mono/utils @kumpera @vargaz
|
||||
/mono/utils/atomic* @alexrp
|
||||
/mono/utils/mono-hwcap* @alexrp
|
||||
/mono/utils/mono-mem* @alexrp
|
||||
/mono/utils/mono-threads* @luhenry @kumpera
|
||||
/mono/utils/*-win* @lateralusX @kumpera
|
||||
|
||||
/msvc @lateralusX
|
||||
/msvc/*profiler* @alexrp
|
||||
/msvc/scripts @akoeplinger
|
||||
|
||||
/packaging/ @alexischr @akoeplinger
|
||||
/packaging/MacSDK/msbuild.py @radical @akoeplinger
|
||||
|
||||
/runtime @akoeplinger @marek-safar
|
||||
|
||||
/samples @luhenry
|
||||
/samples/profiler @alexrp
|
||||
/samples/size @alexrp
|
||||
|
||||
/scripts @akoeplinger
|
||||
/scripts/ci @akoeplinger
|
||||
/scripts/ci/run-test-profiler-stress-tests.sh @alexrp
|
||||
|
||||
/support @luhenry @vargaz
|
||||
|
||||
/tools @kumpera
|
||||
/tools/checker @tritao
|
||||
/tools/crash-bisector @kumpera
|
||||
/tools/locale-builder @marek-safar
|
||||
/tools/monograph @vargaz
|
||||
/tools/nuget-hash-extractor @marek-safar
|
||||
/tools/offsets-tool @lewurm @rolfbjarne
|
||||
/tools/pedump @kumpera @lambdageek
|
||||
/tools/sgen @brzvlad
|
||||
@@ -28,6 +28,8 @@ Mono itself, and does not end up in the redistributable part of Mono:
|
||||
|
||||
* mcs/jay: 4-clause BSD licensed
|
||||
|
||||
* mcs/nunit24: MS-PL
|
||||
|
||||
* mcs/class/I18N/mklist.sh, tools/cvt.sh: GNU GPLv2
|
||||
|
||||
Runtime Code
|
||||
|
||||
+10
-43
@@ -11,29 +11,15 @@ else
|
||||
tools_dir = tools
|
||||
endif
|
||||
|
||||
if ENABLE_MSVC
|
||||
build_with_msvc = msvc
|
||||
build_without_msvc =
|
||||
else
|
||||
build_with_msvc =
|
||||
build_without_msvc = msvc
|
||||
endif
|
||||
|
||||
if ENABLE_NETCORE
|
||||
update_submodules =
|
||||
SUBDIRS = mk llvm mono runtime netcore
|
||||
else
|
||||
update_submodules = update_submodules
|
||||
SUBDIRS = $(build_with_msvc) mk po $(libgc_dir) llvm mono $(ikvm_native_dir) support data runtime scripts man samples $(tools_dir) $(build_without_msvc) $(docs_dir) acceptance-tests
|
||||
endif
|
||||
|
||||
SUBDIRS = po $(libgc_dir) mono $(ikvm_native_dir) support data runtime scripts man samples $(tools_dir) msvc $(docs_dir) acceptance-tests llvm
|
||||
# Keep in sync with SUBDIRS
|
||||
DIST_SUBDIRS = $(build_with_msvc) m4 mk po $(libgc_dir) llvm mono ikvm-native support data runtime scripts man samples tools $(build_without_msvc) docs acceptance-tests netcore netcore/corerun
|
||||
DIST_SUBDIRS = m4 po $(libgc_dir) mono ikvm-native support data runtime scripts man samples tools msvc docs acceptance-tests llvm
|
||||
|
||||
all: $(update_submodules)
|
||||
all: update_submodules
|
||||
|
||||
SUBMODULE_ERROR='Could not recursively update all git submodules. You may experience compilation problems if some submodules are out of date'
|
||||
update_submodules:
|
||||
@cd $(srcdir) && scripts/update_submodules.sh
|
||||
@$(srcdir)/scripts/update_submodules.sh
|
||||
|
||||
.PHONY: update_submodules
|
||||
|
||||
@@ -46,10 +32,9 @@ EXTRA_DIST= \
|
||||
winconfig.h \
|
||||
code_of_conduct.md \
|
||||
external \
|
||||
netcore/Makefile \
|
||||
mcs/class/referencesource
|
||||
|
||||
DISTCHECK_CONFIGURE_FLAGS = EXTERNAL_RUNTIME=false
|
||||
DISTCHECK_CONFIGURE_FLAGS = EXTERNAL_MCS=false EXTERNAL_RUNTIME=false
|
||||
|
||||
# Distribute the 'mcs' tree too
|
||||
GIT_DIR ?= $(srcdir)/.git
|
||||
@@ -57,19 +42,9 @@ dist-hook:
|
||||
test -d $(distdir)/mcs || mkdir $(distdir)/mcs
|
||||
d=`cd $(distdir)/mcs && pwd`; cd $(mcs_topdir) && $(MAKE) distdir=$$d dist-recursive
|
||||
rm -rf `find $(top_distdir)/external -path '*\.git'`
|
||||
rm -rf `find $(top_distdir)/external -path '*\.libs'`
|
||||
rm -rf `find $(top_distdir)/external -path '*\.deps'`
|
||||
rm -f `find $(top_distdir)/external -path '*\.o'`
|
||||
rm -f `find $(top_distdir)/external -path '*\.so'`
|
||||
rm -f `find $(top_distdir)/external -path '*\.lo'`
|
||||
rm -f `find $(top_distdir)/external -path '*\.Plo'`
|
||||
rm -f `find $(top_distdir)/external -name '\.dirstamp'`
|
||||
rm -f `find $(top_distdir)/external -path '*\.exe' -not -path '*/roslyn-binaries/*'`
|
||||
rm -f `find $(top_distdir)/external -path '*\.dll' -not -path '*/binary-reference-assemblies/*' -not -path '*/roslyn-binaries/*' -not -path '*/helix-binaries/*'`
|
||||
rm -rf "$(top_distdir)/external/linker/test"
|
||||
rm -rf "$(top_distdir)/external/llvm-project/lldb/test"
|
||||
rm -rf "$(top_distdir)/external/llvm-project/libcxx/test"
|
||||
rm -rf "$(top_distdir)/external/llvm-project/clang/test"
|
||||
rm -f `find $(top_distdir)/external -path '*\.dll' -not -path '*/binary-reference-assemblies/*' -not -path '*/roslyn-binaries/*'`
|
||||
rm -rf "$(top_distdir)/external/linker/linker/Tests"
|
||||
|
||||
pkgconfigdir = $(libdir)/pkgconfig
|
||||
noinst_DATA = mono-uninstalled.pc
|
||||
@@ -84,15 +59,9 @@ if BITCODE
|
||||
BITCODE_CHECK=yes
|
||||
endif
|
||||
|
||||
if DEFAULT_TESTS
|
||||
CI_TEST_SCRIPT=$(srcdir)/scripts/ci/run-test-default.sh
|
||||
else
|
||||
CI_TEST_SCRIPT=$(srcdir)/scripts/ci/run-test-$(TEST_PROFILE).sh
|
||||
endif
|
||||
|
||||
.PHONY: check-ci
|
||||
check-ci:
|
||||
MONO_LLVMONLY=$(BITCODE_CHECK) $(CI_TEST_SCRIPT)
|
||||
MONO_LLVMONLY=$(BITCODE_CHECK) $(srcdir)/scripts/ci/run-test-$(TEST_PROFILE).sh
|
||||
|
||||
.PHONY: validate do-build-mono-mcs mcs-do-clean mcs-do-tests
|
||||
validate: do-build-mono-mcs
|
||||
@@ -157,7 +126,6 @@ package-inputs:
|
||||
(echo " <project dir=\"$$1\" library=\"$$2\">"; \
|
||||
read boot; echo " <boot>$$boot</boot>"; \
|
||||
read flags; echo " <flags>$$flags</flags>"; \
|
||||
read sources;echo " <sources>$$sources</sources>"; \
|
||||
read output; echo " <output>$$output</output>"; \
|
||||
read built; echo " <built_sources>`echo $$built | sed 's/\\\/\\\\/g'`</built_sources>"; \
|
||||
read libou; echo " <library_output>$$libou</library_output>"; \
|
||||
@@ -176,10 +144,9 @@ update-llvm-version:
|
||||
|
||||
|
||||
update-solution-files:
|
||||
cd msvc/scripts && $(MAKE) genproj.exe || exit $$?;
|
||||
$(MAKE) update-csproj
|
||||
$(MAKE) package-inputs
|
||||
(cd msvc/scripts; mono --debug genproj.exe $(GENPROJ_ARGS))
|
||||
(cd msvc/scripts; $(MAKE) genproj.exe; mono genproj.exe $(GENPROJ_ARGS))
|
||||
|
||||
update-solution-files-with-tests:
|
||||
$(MAKE) "GENPROJ_ARGS=2012 true true" update-solution-files
|
||||
@@ -1,8 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
<packageSources>
|
||||
<clear />
|
||||
<add key="dotnet-core" value="https://dotnetfeed.blob.core.windows.net/dotnet-core/index.json" />
|
||||
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" />
|
||||
</packageSources>
|
||||
</configuration>
|
||||
@@ -3,7 +3,7 @@ create cross platform applications. It is an open source
|
||||
implementation of Microsoft's .NET Framework based on the ECMA
|
||||
standards for C# and the Common Language Runtime.
|
||||
|
||||
The Mono project is part of the [.NET Foundation](https://www.dotnetfoundation.org/)
|
||||
The Mono project is part of the [.NET Foundation](http://www.dotnetfoundation.org/)
|
||||
|
||||
[](https://gitter.im/mono/mono?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
|
||||
|
||||
@@ -29,9 +29,7 @@ The Mono project is part of the [.NET Foundation](https://www.dotnetfoundation.o
|
||||
| Windows | amd64 | [![windows-amd64][15]][16] |
|
||||
| Windows | i386 | [![windows-i386][17]][18] |
|
||||
| CentOS | s390x (cs) | [![centos-s390x][19]][20] |
|
||||
| Debian 9 | ppc64el (cs) | [![debian-9-ppc64el][21]][22]|
|
||||
| AIX 6.1 | ppc64 (cs) | [![aix-ppc64][23]][24] |
|
||||
| FreeBSD 12 | amd64 (cs) | [![freebsd-amd64][25]][26] |
|
||||
| Debian 8 | ppc64el (cs) | [![debian-8-ppc64el][21]][22]|
|
||||
|
||||
_(cs) = community supported architecture_
|
||||
|
||||
@@ -55,12 +53,8 @@ _(cs) = community supported architecture_
|
||||
[18]: https://jenkins.mono-project.com/job/z/label=w32/
|
||||
[19]: https://jenkins.mono-project.com/job/test-mono-mainline-community/label=centos-s390x/badge/icon
|
||||
[20]: https://jenkins.mono-project.com/job/test-mono-mainline-community/label=centos-s390x
|
||||
[21]: https://jenkins.mono-project.com/job/test-mono-mainline-community-chroot/label=debian-9-ppc64el/badge/icon
|
||||
[22]: https://jenkins.mono-project.com/job/test-mono-mainline-community-chroot/label=debian-9-ppc64el
|
||||
[23]: https://jenkins.mono-project.com/job/test-mono-mainline-community/label=aix-ppc64/badge/icon
|
||||
[24]: https://jenkins.mono-project.com/job/test-mono-mainline-community/label=aix-ppc64
|
||||
[25]: https://jenkins.mono-project.com/job/test-mono-mainline-community/label=freebsd-12-amd64/badge/icon
|
||||
[26]: https://jenkins.mono-project.com/job/test-mono-mainline-community/label=freebsd-12-amd64
|
||||
[21]: https://jenkins.mono-project.com/job/test-mono-mainline-community-chroot/label=debian-8-ppc64el/badge/icon
|
||||
[22]: https://jenkins.mono-project.com/job/test-mono-mainline-community-chroot/label=debian-8-ppc64el
|
||||
|
||||
Compilation and Installation
|
||||
============================
|
||||
@@ -69,15 +63,15 @@ Building the Software
|
||||
---------------------
|
||||
|
||||
Please see our guides for building Mono on
|
||||
[Mac OS X](https://www.mono-project.com/docs/compiling-mono/mac/),
|
||||
[Linux](https://www.mono-project.com/docs/compiling-mono/linux/) and
|
||||
[Windows](https://www.mono-project.com/docs/compiling-mono/windows/).
|
||||
[Mac OS X](http://www.mono-project.com/docs/compiling-mono/mac/),
|
||||
[Linux](http://www.mono-project.com/docs/compiling-mono/linux/) and
|
||||
[Windows](http://www.mono-project.com/docs/compiling-mono/windows/).
|
||||
|
||||
Note that building from Git assumes that you already have Mono installed,
|
||||
so please download and [install the latest Mono release](https://www.mono-project.com/download/)
|
||||
so please download and [install the latest Mono release](http://www.mono-project.com/download/)
|
||||
before trying to build from Git. This is required because the Mono build
|
||||
relies on a working Mono C# compiler to compile itself
|
||||
(also known as [bootstrapping](https://en.wikipedia.org/wiki/Bootstrapping_(compilers))).
|
||||
(also known as [bootstrapping](http://en.wikipedia.org/wiki/Bootstrapping_(compilers))).
|
||||
|
||||
If you don't have a working Mono installation
|
||||
---------------------------------------------
|
||||
@@ -117,7 +111,7 @@ Once you have installed the software, you can run a few programs:
|
||||
|
||||
* `mono program.exe` runtime engine
|
||||
|
||||
* `mcs program.cs` C# compiler
|
||||
* `mcs program.cs` C# compiler
|
||||
|
||||
* `monodis program.exe` CIL Disassembler
|
||||
|
||||
@@ -134,14 +128,6 @@ Directory Roadmap
|
||||
|
||||
* `external/` - Git submodules for external libraries (Newtonsoft.Json, ikvm, etc).
|
||||
|
||||
* `ikvm-native/` - Glue code for ikvm.
|
||||
|
||||
* `libgc/` - The (deprecated) Boehm GC implementation.
|
||||
|
||||
* `llvm/` - Utility Makefiles for integrating the Mono LLVM fork.
|
||||
|
||||
* `m4/` - General utility Makefiles.
|
||||
|
||||
* `man/` - Manual pages for the various Mono commands and programs.
|
||||
|
||||
* `mcs/` - The class libraries, compiler and tools
|
||||
@@ -156,59 +142,33 @@ Directory Roadmap
|
||||
|
||||
* `arch/` - Architecture specific portions.
|
||||
|
||||
* `benchmark/` - A collection of benchmarks.
|
||||
|
||||
* `btls/` - Build files for the BTLS library which incorporates BoringSSL.
|
||||
|
||||
* `cil/` - Common Intermediate Representation, XML
|
||||
definition of the CIL bytecodes.
|
||||
|
||||
* `dis/` - CIL executable Disassembler.
|
||||
* `dis/` - CIL executable Disassembler
|
||||
|
||||
* `eglib/` - Independent implementation of the glib API.
|
||||
* `io-layer/` - The I/O layer and system abstraction for
|
||||
emulating the .NET IO model.
|
||||
|
||||
* `metadata/` - The object system and metadata reader.
|
||||
|
||||
* `mini/` - The Just in Time Compiler.
|
||||
|
||||
* `profiler/` - The profiler implementation.
|
||||
|
||||
* `sgen/` - The SGen Garbage Collector implementation.
|
||||
|
||||
* `tests/` - The main runtime tests.
|
||||
|
||||
* `unit-tests/` - Additional runtime unit tests.
|
||||
|
||||
* `utils/` - Utility functions used across the runtime codebase.
|
||||
|
||||
* `msvc/` - Logic for the MSVC / Visual Studio based runtime and BCL build system.
|
||||
The latter is experimental at the moment.
|
||||
|
||||
* `packaging/` - Packaging logic for the OS X and Windows Mono packages.
|
||||
|
||||
* `po/` - Translation files.
|
||||
|
||||
* `runtime/` - A directory that contains the Makefiles that link the
|
||||
mono/ and mcs/ build systems.
|
||||
|
||||
* `samples/` - Some simple sample programs on uses of the Mono
|
||||
runtime as an embedded library.
|
||||
* `samples/` -Some simple sample programs on uses of the Mono
|
||||
runtime as an embedded library.
|
||||
|
||||
* `scripts/` - Scripts used to invoke Mono and the corresponding program.
|
||||
|
||||
* `sdks/` - A new way of embedding Mono into Xamarin.iOS, Xamarin.Android and other products.
|
||||
|
||||
* `support/` - Various support libraries.
|
||||
|
||||
* `tools/` - A collection of tools, mostly used during Mono development.
|
||||
|
||||
Contributing to Mono
|
||||
====================
|
||||
|
||||
Before submitting changes to Mono, please review the [contribution
|
||||
guidelines](https://www.mono-project.com/community/contributing/).
|
||||
guidelines](http://www.mono-project.com/community/contributing/).
|
||||
Please pay particular attention to the [Important
|
||||
Rules](https://www.mono-project.com/community/contributing/#important-rules)
|
||||
Rules](http://www.mono-project.com/community/contributing/#important-rules)
|
||||
section.
|
||||
|
||||
Reporting bugs
|
||||
@@ -218,7 +178,7 @@ To submit bug reports, please [open an issue on the mono GitHub repo](https://gi
|
||||
|
||||
Please use the search facility to ensure the same bug hasn't already
|
||||
been submitted and follow our
|
||||
[guidelines](https://www.mono-project.com/community/bugs/make-a-good-bug-report/)
|
||||
[guidelines](http://www.mono-project.com/community/bugs/make-a-good-bug-report/)
|
||||
on how to make a good bug report.
|
||||
|
||||
Configuration Options
|
||||
@@ -247,12 +207,12 @@ Disables the inclusion of a Boehm garbage collector.
|
||||
|
||||
* This defaults to `included`.
|
||||
|
||||
* `--enable-cooperative-suspend`
|
||||
* `--with-cooperative-gc`
|
||||
|
||||
* If you pass this flag the Mono runtime is configured to only use
|
||||
the cooperative mode of the garbage collector. If you do not pass
|
||||
this flag, then you can control at runtime the use of the
|
||||
cooperative GC mode by setting the `MONO_ENABLE_COOP_SUSPEND` flag.
|
||||
cooperative GC mode by setting the `MONO_ENABLE_COOP` flag.
|
||||
|
||||
* `--with-tls=__thread,pthread`
|
||||
|
||||
@@ -309,9 +269,6 @@ faster under the Xen virtualization system.
|
||||
|
||||
* `--with-large-heap=yes,no` - Enable support for GC heaps larger than 3GB.
|
||||
|
||||
* This only applies only to the Boehm garbage collector, the SGen garbage
|
||||
collector does not use this configuration option.
|
||||
|
||||
* This defaults to `no`.
|
||||
|
||||
* `--enable-small-config=yes,no` - Enable some tweaks to reduce memory usage
|
||||
@@ -441,7 +398,7 @@ for Mono. The LLVM code generator and optimizer will be
|
||||
used instead of Mono's built-in code generator for both
|
||||
Just in Time and Ahead of Time compilations.
|
||||
|
||||
* See https://www.mono-project.com/docs/advanced/mono-llvm/ for the
|
||||
* See http://www.mono-project.com/docs/advanced/mono-llvm/ for the
|
||||
full details and up-to-date information on this feature.
|
||||
|
||||
* You will need to have an LLVM built that Mono can link
|
||||
@@ -510,7 +467,7 @@ also, see the man page.
|
||||
|
||||
* This configures the Mono compiler to generate code
|
||||
suitable to be used by Google's Native Client:
|
||||
https://code.google.com/p/nativeclient/
|
||||
http://code.google.com/p/nativeclient/
|
||||
|
||||
* Currently this is used with Mono's AOT engine as
|
||||
Native Client does not support JIT engines yet.
|
||||
@@ -584,7 +541,7 @@ file for information about Microsoft's patent grant.
|
||||
Mono Trademark Use Policy
|
||||
=========================
|
||||
|
||||
The use of trademarks and logos for Mono can be found [here](https://www.dotnetfoundation.org/legal/mono-tm).
|
||||
The use of trademarks and logos for Mono can be found [here](http://www.dotnetfoundation.org/legal/mono-tm).
|
||||
|
||||
Maintaining the Class Library Solution Files
|
||||
============================================
|
||||
|
||||
@@ -1,185 +0,0 @@
|
||||
|
||||
Mono uses third-party libraries or other resources that may be
|
||||
distributed under licenses different than the Mono software.
|
||||
|
||||
Attributions and license notices for test cases originally authored by
|
||||
third parties can be found in the respective test directories.
|
||||
|
||||
In the event that we accidentally failed to list a required notice, please
|
||||
bring it to our attention. Post an issue or email us:
|
||||
|
||||
[email protected]
|
||||
|
||||
The attached notices are provided for information only.
|
||||
|
||||
License notice for Mono
|
||||
-----------------------
|
||||
|
||||
Note: multiple license notices are provided that occure in source code.
|
||||
They are equivalent forms of the the MIT license from various copyright holders.
|
||||
|
||||
// Dual licensed under the terms of the MIT X11 or GNU GPL
|
||||
// Copyright 2003-2011 Novell, Inc.
|
||||
// Copyright 2011 Xamarin Inc
|
||||
|
||||
/**
|
||||
*
|
||||
* Copyright 2001-2003 Ximian, Inc
|
||||
* Copyright 2003-2010 Novell, Inc.
|
||||
* Copyright (C) 2012 Xamarin Inc
|
||||
*
|
||||
* Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||
*/
|
||||
|
||||
/******************************************************************************
|
||||
* The MIT License
|
||||
* Copyright (c) 2003 Novell Inc. www.novell.com
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the Software), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED AS IS, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
* SOFTWARE.
|
||||
*******************************************************************************/
|
||||
|
||||
License notice for Apple
|
||||
-------------------------
|
||||
Content: https://github.com/mono/mono/blob/435f968102d0820ca65d63e1e741e4130b4d1303/support/ios/net/route.h
|
||||
License: https://opensource.apple.com/apsl/
|
||||
|
||||
License for GCC
|
||||
---------------
|
||||
|
||||
License: http://gcc.gnu.org/onlinedocs/gcc-4.6.4/libstdc++/manual/manual/license.html
|
||||
Content: https://github.com/mono/mono/blob/c398e19d3515c6bbb6046ed014b2095594a15229/mono/mini
|
||||
Example: https://github.com/mono/mono/blob/c398e19d3515c6bbb6046ed014b2095594a15229/mono/mini/decompose.c#L967
|
||||
|
||||
GCC RUNTIME LIBRARY EXCEPTION
|
||||
|
||||
Version 3.1, 31 March 2009
|
||||
|
||||
Copyright (C) 2009 Free Software Foundation, Inc.
|
||||
|
||||
Everyone is permitted to copy and distribute verbatim copies of this
|
||||
license document, but changing it is not allowed.
|
||||
|
||||
This GCC Runtime Library Exception ("Exception") is an additional
|
||||
permission under section 7 of the GNU General Public License, version
|
||||
3 ("GPLv3"). It applies to a given file (the "Runtime Library") that
|
||||
bears a notice placed by the copyright holder of the file stating that
|
||||
the file is governed by GPLv3 along with this Exception.
|
||||
|
||||
When you use GCC to compile a program, GCC may combine portions of
|
||||
certain GCC header files and runtime libraries with the compiled
|
||||
program. The purpose of this Exception is to allow compilation of
|
||||
non-GPL (including proprietary) programs to use, in this way, the
|
||||
header files and runtime libraries covered by this Exception.
|
||||
|
||||
0. Definitions.
|
||||
|
||||
A file is an "Independent Module" if it either requires the Runtime
|
||||
Library for execution after a Compilation Process, or makes use of an
|
||||
interface provided by the Runtime Library, but is not otherwise based
|
||||
on the Runtime Library.
|
||||
|
||||
"GCC" means a version of the GNU Compiler Collection, with or without
|
||||
modifications, governed by version 3 (or a specified later version) of
|
||||
the GNU General Public License (GPL) with the option of using any
|
||||
subsequent versions published by the FSF.
|
||||
|
||||
"GPL-compatible Software" is software whose conditions of propagation,
|
||||
modification and use would permit combination with GCC in accord with
|
||||
the license of GCC.
|
||||
|
||||
"Target Code" refers to output from any compiler for a real or virtual
|
||||
target processor architecture, in executable form or suitable for
|
||||
input to an assembler, loader, linker and/or execution
|
||||
phase. Notwithstanding that, Target Code does not include data in any
|
||||
format that is used as a compiler intermediate representation, or used
|
||||
for producing a compiler intermediate representation.
|
||||
|
||||
The "Compilation Process" transforms code entirely represented in
|
||||
non-intermediate languages designed for human-written code, and/or in
|
||||
Java Virtual Machine byte code, into Target Code. Thus, for example,
|
||||
use of source code generators and preprocessors need not be considered
|
||||
part of the Compilation Process, since the Compilation Process can be
|
||||
understood as starting with the output of the generators or
|
||||
preprocessors.
|
||||
|
||||
A Compilation Process is "Eligible" if it is done using GCC, alone or
|
||||
with other GPL-compatible software, or if it is done without using any
|
||||
work based on GCC. For example, using non-GPL-compatible Software to
|
||||
optimize any GCC intermediate representations would not qualify as an
|
||||
Eligible Compilation Process.
|
||||
|
||||
1. Grant of Additional Permission.
|
||||
|
||||
You have permission to propagate a work of Target Code formed by
|
||||
combining the Runtime Library with Independent Modules, even if such
|
||||
propagation would otherwise violate the terms of GPLv3, provided that
|
||||
all Target Code was generated by Eligible Compilation Processes. You
|
||||
may then convey such a combination under terms of your choice,
|
||||
consistent with the licensing of the Independent Modules.
|
||||
|
||||
2. No Weakening of GCC Copyleft.
|
||||
|
||||
The availability of this Exception does not imply any general
|
||||
presumption that third-party software is unaffected by the copyleft
|
||||
requirements of the license of GCC.
|
||||
|
||||
|
||||
Hopefully that text is self-explanatory. If it isn't, you need to speak to your lawyer, or the Free Software Foundation.
|
||||
|
||||
License notice for Silicon Graphics and HP
|
||||
------------------------------------------
|
||||
|
||||
/*
|
||||
* Copyright (c) 1996-1997
|
||||
* Silicon Graphics Computer Systems, Inc.
|
||||
*
|
||||
* Permission to use, copy, modify, distribute and sell this software
|
||||
* and its documentation for any purpose is hereby granted without fee,
|
||||
* provided that the above copyright notice appear in all copies and
|
||||
* that both that copyright notice and this permission notice appear
|
||||
* in supporting documentation. Silicon Graphics makes no
|
||||
* representations about the suitability of this software for any
|
||||
* purpose. It is provided "as is" without express or implied warranty.
|
||||
*
|
||||
* Copyright (c) 2002
|
||||
* Hewlett-Packard Company
|
||||
*
|
||||
* Permission to use, copy, modify, distribute and sell this software
|
||||
* and its documentation for any purpose is hereby granted without fee,
|
||||
* provided that the above copyright notice appear in all copies and
|
||||
* that both that copyright notice and this permission notice appear
|
||||
* in supporting documentation. Hewlett-Packard Company makes no
|
||||
* representations about the suitability of this software for any
|
||||
* purpose. It is provided "as is" without express or implied warranty.
|
||||
*/
|
||||
|
||||
/*
|
||||
* This implements standard-conforming allocators that interact with
|
||||
* the garbage collector. Gc_alloctor<T> allocates garbage-collectable
|
||||
* objects of type T. Traceable_allocator<T> allocates objects that
|
||||
* are not temselves garbage collected, but are scanned by the
|
||||
* collector for pointers to collectable objects. Traceable_alloc
|
||||
* should be used for explicitly managed STL containers that may
|
||||
* point to collectable objects.
|
||||
*
|
||||
* This code was derived from an earlier version of the GNU C++ standard
|
||||
* library, which itself was derived from the SGI STL implementation.
|
||||
*/
|
||||
|
||||
Content: https://github.com/mono/mono/blob/d58dfa185af1d48fb93efdef1d046762f214f0a7/libgc/include/gc_allocator.h
|
||||
@@ -4,4 +4,3 @@ Makefile
|
||||
*.dll
|
||||
*.mdb
|
||||
coreclr-testlist.txt
|
||||
microbench-perf.sh
|
||||
@@ -0,0 +1,14 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Reflection;
|
||||
|
||||
namespace System.Runtime.Loader
|
||||
{
|
||||
public static class AssemblyExtensions
|
||||
{
|
||||
public static Type[] GetTypes(this Assembly assembly)
|
||||
{
|
||||
return assembly.GetTypes ();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -3,10 +3,9 @@ BENCHMARKER_PATH=$(ACCEPTANCE_TESTS_PATH)/benchmarker
|
||||
ROSLYN_PATH=$(ACCEPTANCE_TESTS_PATH)/roslyn
|
||||
CORECLR_PATH=$(ACCEPTANCE_TESTS_PATH)/coreclr
|
||||
MSTESTSUITE_PATH=$(ACCEPTANCE_TESTS_PATH)/ms-test-suite
|
||||
DEBIANSHOOTOUTMONO_PATH=$(ACCEPTANCE_TESTS_PATH)/DebianShootoutMono
|
||||
|
||||
CLEANFILES = *.dll *.exe *.mdb
|
||||
EXTRA_DIST=README.md SUBMODULES.json microbench.mk versions.mk profiler-stress.mk roslyn.mk coreclr.mk ms-test-suite.mk
|
||||
EXTRA_DIST=README.md SUBMODULES.json versions.mk roslyn.mk coreclr.mk ms-test-suite.mk
|
||||
|
||||
CLASS=$(mcs_topdir)/class/lib/$(DEFAULT_PROFILE)
|
||||
TOOLS_CLASS=$(mcs_topdir)/class/lib/build
|
||||
@@ -18,7 +17,6 @@ ILASM = $(TOOLS_RUNTIME) $(TOOLS_CLASS)/ilasm.exe
|
||||
XUNIT = $(RUNTIME) $(abs_top_builddir)/external/xunit-binaries/xunit.console.exe
|
||||
|
||||
include versions.mk
|
||||
include microbench.mk
|
||||
include profiler-stress.mk
|
||||
include roslyn.mk
|
||||
include coreclr.mk
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
{
|
||||
"name": "roslyn",
|
||||
"url": "git://github.com/mono/roslyn.git",
|
||||
"rev": "6bfcd4e770609a38b8523e83ce1ec943162f30bb",
|
||||
"rev": "1d9895045041925490038c5df0d8f947d8dcbd7f",
|
||||
"remote-branch": "origin/mono-testing",
|
||||
"branch": "mono-testing",
|
||||
"directory": "roslyn"
|
||||
@@ -10,7 +10,7 @@
|
||||
{
|
||||
"name": "coreclr",
|
||||
"url": "git://github.com/mono/coreclr.git",
|
||||
"rev": "90f7060935732bb624e1f325d23f63072433725f",
|
||||
"rev": "83d8279997d8ce4ad344ff9b937b2d13d074dcaa",
|
||||
"remote-branch": "origin/mono",
|
||||
"branch": "mono",
|
||||
"directory": "coreclr"
|
||||
@@ -18,7 +18,7 @@
|
||||
{
|
||||
"name": "ms-test-suite",
|
||||
"url": "[email protected]:xamarin/ms-test-suite.git",
|
||||
"rev": "39b1b222e8a3690a1b8ea018ce54d2a826f5246e",
|
||||
"rev": "67f29dfc0741b5311dd746c75760963a2915e648",
|
||||
"remote-branch": "origin/master",
|
||||
"branch": "master",
|
||||
"directory": "ms-test-suite"
|
||||
@@ -30,13 +30,5 @@
|
||||
"remote-branch": "origin/master",
|
||||
"branch": "master",
|
||||
"directory": "benchmarker"
|
||||
},
|
||||
{
|
||||
"name": "DebianShootoutMono",
|
||||
"url": "https://github.com/alexanderkyte/DebianShootoutMono.git",
|
||||
"rev": "3fde2ced806c1fe7eed81120a40d99474fa009f0",
|
||||
"remote-branch": "origin/release_11_15_2018",
|
||||
"branch": "release_11_15_2018",
|
||||
"directory": "DebianShootoutMono"
|
||||
}
|
||||
]
|
||||
@@ -2162,6 +2162,7 @@ CORECLR_COREMANGLIB_TEST_CS_SRC= \
|
||||
$(CORECLR_PATH)/tests/src/CoreMangLib/cti/system/double/doubleepsilon.cs \
|
||||
$(CORECLR_PATH)/tests/src/CoreMangLib/cti/system/double/doubleequals1.cs \
|
||||
$(CORECLR_PATH)/tests/src/CoreMangLib/cti/system/double/doubleequals2.cs \
|
||||
$(CORECLR_PATH)/tests/src/CoreMangLib/cti/system/double/doublegethashcode.cs \
|
||||
$(CORECLR_PATH)/tests/src/CoreMangLib/cti/system/double/doubleiconvertibletoboolean.cs \
|
||||
$(CORECLR_PATH)/tests/src/CoreMangLib/cti/system/double/doubleiconvertibletobyte.cs \
|
||||
$(CORECLR_PATH)/tests/src/CoreMangLib/cti/system/double/doubleiconvertibletodatetime.cs \
|
||||
@@ -3175,6 +3176,7 @@ CORECLR_COREMANGLIB_TEST_CS_SRC= \
|
||||
$(CORECLR_PATH)/tests/src/CoreMangLib/cti/system/runtime/interopservices/inattribute/inattributector.cs \
|
||||
$(CORECLR_PATH)/tests/src/CoreMangLib/cti/system/runtime/interopservices/layoutkind/layoutkindauto.cs \
|
||||
$(CORECLR_PATH)/tests/src/CoreMangLib/cti/system/runtime/interopservices/layoutkind/layoutkindsequential.cs \
|
||||
$(CORECLR_PATH)/tests/src/CoreMangLib/cti/system/runtime/interopservices/marshal/marshalgetlastwin32error.cs \
|
||||
$(CORECLR_PATH)/tests/src/CoreMangLib/cti/system/runtime/interopservices/marshal/marshalreadint641.cs \
|
||||
$(CORECLR_PATH)/tests/src/CoreMangLib/cti/system/runtime/interopservices/marshal/marshalsizeof1.cs \
|
||||
$(CORECLR_PATH)/tests/src/CoreMangLib/cti/system/runtime/interopservices/marshalasattribute/marshalasattributearraysubtype.cs \
|
||||
@@ -3240,6 +3242,7 @@ CORECLR_COREMANGLIB_TEST_CS_SRC= \
|
||||
$(CORECLR_PATH)/tests/src/CoreMangLib/cti/system/security/securityexception/securityexceptionctor3.cs \
|
||||
$(CORECLR_PATH)/tests/src/CoreMangLib/cti/system/security/securityexception/securityexceptiontostring.cs \
|
||||
$(CORECLR_PATH)/tests/src/CoreMangLib/cti/system/single/singleepsilon.cs \
|
||||
$(CORECLR_PATH)/tests/src/CoreMangLib/cti/system/single/singlegethashcode.cs \
|
||||
$(CORECLR_PATH)/tests/src/CoreMangLib/cti/system/single/singleisinfinity.cs \
|
||||
$(CORECLR_PATH)/tests/src/CoreMangLib/cti/system/single/singleisnan.cs \
|
||||
$(CORECLR_PATH)/tests/src/CoreMangLib/cti/system/single/singleisnegativeinfinity.cs \
|
||||
@@ -3688,8 +3691,9 @@ CORECLR_STRESSTEST_RUNNER_CS_SRC= \
|
||||
$(CORECLR_PATH)/tests/src/GC/Stress/Framework/RFLogging.cs \
|
||||
$(CORECLR_PATH)/tests/src/GC/Stress/Framework/DetourHelpers.cs \
|
||||
$(CORECLR_PATH)/tests/src/GC/Stress/Framework/LoaderClass.cs \
|
||||
GCStressTests/AssemblyLoadContext.cs
|
||||
|
||||
GCStressTests/AssemblyLoadContext.cs \
|
||||
GCStressTests/AssemblyExtensions.cs
|
||||
|
||||
CORECLR_TESTLIBRARY_CS_SRC = \
|
||||
$(CORECLR_PATH)/tests/src/Common/CoreCLRTestLibrary/TestFramework.cs \
|
||||
$(CORECLR_PATH)/tests/src/Common/CoreCLRTestLibrary/Utilities.cs \
|
||||
@@ -3711,7 +3715,7 @@ CORECLR_DISABLED_TEST_CS_SRC += \
|
||||
CORECLR_DISABLED_TEST_CS_SRC += \
|
||||
$(CORECLR_PATH)/tests/src/readytorun/main.cs \
|
||||
$(CORECLR_PATH)/tests/src/readytorun/test.cs
|
||||
|
||||
|
||||
# relies on a referenced managed or native assembly, to complicated here:
|
||||
CORECLR_DISABLED_TEST_CS_SRC += \
|
||||
$(CORECLR_PATH)/tests/src/Regressions/assemblyref/assem.cs \
|
||||
@@ -3851,7 +3855,7 @@ CORECLR_DISABLED_TEST_CS_SRC += \
|
||||
CORECLR_DISABLED_TEST_CS_SRC += \
|
||||
$(CORECLR_PATH)/tests/src/CoreMangLib/cti/system/datetime/cfdatetimetools.cs \
|
||||
$(CORECLR_PATH)/tests/src/CoreMangLib/cti/system/datetime/datetimeisdaylightsavingtime.cs
|
||||
|
||||
|
||||
# relies on delegatedefinitions.cs helper
|
||||
CORECLR_DISABLED_TEST_CS_SRC += \
|
||||
$(CORECLR_PATH)/tests/src/CoreMangLib/cti/system/multicastdelegate/multicastdelegatector.cs \
|
||||
@@ -3959,7 +3963,7 @@ CORECLR_DISABLED_TEST_CS_SRC += \
|
||||
$(CORECLR_PATH)/tests/src/CoreMangLib/system/delegate/threatmodel/public/testclass.cs \
|
||||
$(CORECLR_PATH)/tests/src/CoreMangLib/system/delegate/threatmodel/tests/bindingtarget.cs \
|
||||
$(CORECLR_PATH)/tests/src/CoreMangLib/system/delegate/threatmodel/tests/testclass.cs
|
||||
|
||||
|
||||
# samples (should probably be removed upstream)
|
||||
CORECLR_DISABLED_TEST_CS_SRC += \
|
||||
$(CORECLR_PATH)/tests/src/hosting/samples/hosting/usercode/usercode.cs \
|
||||
@@ -4965,6 +4969,7 @@ CORECLR_TEST_IL_SRC = \
|
||||
$(CORECLR_PATH)/tests/src/JIT/jit64/opt/regress/vswhidbey/223862/rem.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/jit64/opt/regress/vswhidbey/228572/conv.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/jit64/opt/regress/vswhidbey/481244/foo.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/jit64/opt/regress/vswhidbey/481244/foo2.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/jit64/regress/ddb/118414/118414.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/jit64/regress/ddb/127931/127931.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/jit64/regress/vsw/102974/test.il \
|
||||
@@ -5056,9 +5061,6 @@ CORECLR_DISABLED_TEST_IL_SRC += \
|
||||
CORECLR_DISABLED_TEST_IL_SRC += \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Directed/coverage/oldtests/lcliimpl.il
|
||||
|
||||
# We use an r4 for r4-r8 stack merge so it loses precision
|
||||
CORECLR_DISABLED_TEST_IL_SRC += \
|
||||
$(CORECLR_PATH)/tests/src/JIT/jit64/opt/regress/vswhidbey/481244/foo2.il
|
||||
|
||||
# FIXME: these tests are baselined, i.e. we don't have time to investigate
|
||||
# them right now but want to make sure we don't introduce new regressions
|
||||
|
||||
@@ -1,17 +0,0 @@
|
||||
#! /bin/sh
|
||||
r='@mono_build_root@'
|
||||
aotpattern="--aot="
|
||||
|
||||
# if this is an aot invoke
|
||||
if [[ $@ =~ $aotpattern ]];
|
||||
then
|
||||
# just aot the code
|
||||
echo "$r/runtime/mono-wrapper $@"
|
||||
exec $r/runtime/mono-wrapper $@
|
||||
else
|
||||
# else run it under perf
|
||||
echo "$MONO_PERF_BINARY record -o $r/acceptance-tests/perf.data -v -s -g -- $r/mono/mini/mono-sgen $@"
|
||||
exec $MONO_PERF_BINARY record -o $r/acceptance-tests/perf.data -v -s -g $r/mono/mini/mono-sgen $@
|
||||
fi
|
||||
|
||||
|
||||
@@ -1,119 +0,0 @@
|
||||
check-microbench: DebianShootoutMono.stamp
|
||||
@$(MAKE) test-run-microbench
|
||||
|
||||
DebianShootoutMono.stamp:
|
||||
@$(MAKE) validate-DebianShootoutMono RESET_VERSIONS=1
|
||||
@$(MAKE) prepare-dlls
|
||||
@touch $@
|
||||
|
||||
abs_top_srcdir = $(abspath $(top_srcdir))
|
||||
TEST_EXE_PATH=$(abs_top_srcdir)/acceptance-tests/external/DebianShootoutMono/release/
|
||||
NET_4_X_RUNTIME=MONO_PATH=$(TEST_EXE_PATH):$(abs_top_srcdir)/mcs/class/lib/net_4_x $(abs_top_srcdir)/runtime/mono-wrapper
|
||||
FULL_AOT_RUNTIME=MONO_PATH=$(abs_top_srcdir)/mcs/class/lib/testing_aot_full $(abs_top_srcdir)/runtime/mono-wrapper
|
||||
|
||||
PERF_BINARY=$(if $(MONO_PERF_BINARY),$(MONO_PERF_BINARY),perf)
|
||||
PERF_RUNTIME=$(abs_top_srcdir)/acceptance-tests/microbench-perf.sh
|
||||
|
||||
define BenchmarkDotNetTemplate
|
||||
|
||||
run-microbench-$(1):: DebianShootoutMono.stamp
|
||||
MONO_BENCH_AOT_RUN="$(AOT_RUN_FLAGS)" \
|
||||
MONO_BENCH_AOT_BUILD="$(AOT_BUILD_FLAGS)" \
|
||||
MONO_BENCH_EXECUTABLE="$(abs_top_srcdir)/runtime/mono-wrapper" \
|
||||
MONO_BENCH_PATH="$(abs_top_srcdir)/mcs/class/lib/$(TEST_PROFILE)" \
|
||||
MONO_BENCH_INPUT="$(2)" \
|
||||
$(NET_4_X_RUNTIME) \
|
||||
$(TEST_EXE_PATH)/DebianShootoutMono.exe $(1)
|
||||
|
||||
test-run-microbench:: run-microbench-$(1)
|
||||
|
||||
run-microbench-debug-$(1):: DebianShootoutMono.stamp
|
||||
echo MONO_PATH="$(abs_top_srcdir)/mcs/class/lib/$(TEST_PROFILE)" $(abs_top_srcdir)/runtime/mono-wrapper $(AOT_BUILD_FLAGS) $(TEST_EXE_PATH)/DebianShootoutMono.exe
|
||||
MONO_BENCH_INPUT="$(2)" \
|
||||
MONO_PATH="$(abs_top_srcdir)/mcs/class/lib/$(TEST_PROFILE)" \
|
||||
$(abs_top_srcdir)/runtime/mono-wrapper $(AOT_RUN_FLAGS) $(TEST_EXE_PATH)/DebianShootoutMono.exe Run $(1)
|
||||
|
||||
test-run-microbench-debug:: run-microbench-debug-$(1)
|
||||
|
||||
if HOST_LINUX
|
||||
run-microbench-profiled-$(1):: microbench-results/$(1).perf.data
|
||||
|
||||
microbench-results/$(1).perf.data: DebianShootoutMono.stamp
|
||||
mkdir -p microbench-results
|
||||
MONO_PERF_BINARY="$(PERF_BINARY)" \
|
||||
MONO_BENCH_EXECUTABLE="$(PERF_RUNTIME)" \
|
||||
MONO_BENCH_AOT_RUN="$(AOT_RUN_FLAGS)"\
|
||||
MONO_BENCH_AOT_BUILD="$(AOT_BUILD_FLAGS)"\
|
||||
MONO_BENCH_PATH="$(abs_top_srcdir)/mcs/class/lib/$(TEST_PROFILE)" \
|
||||
MONO_BENCH_INPUT="$(2)" \
|
||||
$(NET_4_X_RUNTIME) \
|
||||
$(TEST_EXE_PATH)/DebianShootoutMono.exe $(1) $(2)
|
||||
mv perf.data microbench-results/$(1).perf.data
|
||||
|
||||
microbench-results/$(1).tmp.perf: microbench-results/$(1).perf.data
|
||||
$(PERF_BINARY) script -i microbench-results/$(1).perf.data > microbench-results/$(1).tmp.perf
|
||||
|
||||
microbench-results/$(1).perf-flame.svg: microbench-results/$(1).tmp.perf
|
||||
cat microbench-results/$(1).tmp.perf | ./external/DebianShootoutMono/FlameGraph/stackcollapse-perf.pl > microbench-results/$(1).perf-folded
|
||||
./external/DebianShootoutMono/FlameGraph/flamegraph.pl microbench-results/$(1).perf-folded > microbench-results/$(1).perf-flame.svg
|
||||
rm microbench-results/$(1).tmp.perf
|
||||
rm microbench-results/$(1).perf-folded
|
||||
|
||||
MONO_PERF_FLAGS=--show-cpu-utilization -n --hierarchy -T $(MONO_PERF_ADDITIONAL_FLAGS)
|
||||
|
||||
microbench-results/$(1).perf.report: microbench-results/$(1).perf.data
|
||||
$(PERF_BINARY) report -i microbench-results/$(1).perf.data $(MONO_PERF_FLAGS) > microbench-results/$(1).perf.report
|
||||
|
||||
test-run-microbench-profiled:: run-microbench-profiled-$(1)
|
||||
|
||||
test-run-microbench-publish-collect:: microbench-results/$(1).perf.data microbench-results/$(1).perf.report microbench-results/$(1).perf-flame.svg
|
||||
|
||||
endif
|
||||
|
||||
endef
|
||||
|
||||
if HOST_LINUX
|
||||
|
||||
test-run-microbench-perf-check:
|
||||
$(PERF_BINARY) record -a -o perf.data -- echo "testing"
|
||||
rm perf.data
|
||||
|
||||
microbench-results/perf-data.zip:
|
||||
zip microbench-results/perf-data.zip microbench-results/*.perf.data
|
||||
rm microbench-results/*.perf.data
|
||||
|
||||
perf-report: microbench-results/perf-data.zip
|
||||
|
||||
perf-report-total: test-run-microbench-publish-collect
|
||||
@$(MAKE) perf-report
|
||||
|
||||
endif
|
||||
|
||||
.PHONY: prepare-dlls
|
||||
|
||||
if FULL_AOT_TESTS
|
||||
prepare-dlls:
|
||||
$(FULL_AOT_RUNTIME) $(AOT_BUILD_FLAGS) $(TEST_EXE_PATH)/*.{dll,exe}
|
||||
|
||||
else
|
||||
|
||||
prepare-dlls:
|
||||
|
||||
endif
|
||||
|
||||
FIXTURE_DIR=$(abs_top_srcdir)/acceptance-tests/external/DebianShootoutMono/fixtures
|
||||
|
||||
$(eval $(call BenchmarkDotNetTemplate,Mandelbrot,))
|
||||
$(eval $(call BenchmarkDotNetTemplate,RegexRedux,$(FIXTURE_DIR)/regexredux-input.txt))
|
||||
$(eval $(call BenchmarkDotNetTemplate,KNucleotide,$(FIXTURE_DIR)/knucleotide-input.txt))
|
||||
|
||||
$(eval $(call BenchmarkDotNetTemplate,BinaryTrees,))
|
||||
$(eval $(call BenchmarkDotNetTemplate,NBodyTest,))
|
||||
$(eval $(call BenchmarkDotNetTemplate,SpectralNorm,))
|
||||
$(eval $(call BenchmarkDotNetTemplate,Fannkuchredux,))
|
||||
$(eval $(call BenchmarkDotNetTemplate,Fasta,))
|
||||
|
||||
$(eval $(call BenchmarkDotNetTemplate,RevComp,$(FIXTURE_DIR)/revcomp-input.txt))
|
||||
|
||||
#$(eval $(call BenchmarkDotNetTemplate,GistBenchmark,$(MONO_BENCH_GIST_URL))) broken in BDN, bug filed
|
||||
|
||||
@@ -40,6 +40,7 @@ namespace Mono.Profiling.Tests.Stress {
|
||||
public int? ExitCode { get; set; }
|
||||
public string StandardOutput { get; set; }
|
||||
public string StandardError { get; set; }
|
||||
public string CombinedOutput { get; set; }
|
||||
}
|
||||
|
||||
static class Program {
|
||||
@@ -124,11 +125,6 @@ namespace Mono.Profiling.Tests.Stress {
|
||||
if (Environment.GetEnvironmentVariable ("MONO_PROFILER_STRESS_OPTIONS") is string envOptions)
|
||||
options = envOptions;
|
||||
|
||||
var suspend = false;
|
||||
|
||||
if (Environment.GetEnvironmentVariable ("MONO_PROFILER_STRESS_SUSPEND") is string envSuspend)
|
||||
suspend = bool.Parse (envSuspend);
|
||||
|
||||
var rand = new Random (seed);
|
||||
var cpus = Environment.ProcessorCount;
|
||||
|
||||
@@ -179,9 +175,6 @@ namespace Mono.Profiling.Tests.Stress {
|
||||
info.EnvironmentVariables.Clear ();
|
||||
info.EnvironmentVariables.Add ("MONO_PATH", classDir);
|
||||
|
||||
if (suspend)
|
||||
info.EnvironmentVariables.Add ("MONO_DEBUG", "suspend-on-native-crash,suspend-on-unhandled");
|
||||
|
||||
var progress = $"({i + 1}/{benchmarks.Length})";
|
||||
|
||||
Console.ForegroundColor = ConsoleColor.Blue;
|
||||
@@ -198,17 +191,22 @@ namespace Mono.Profiling.Tests.Stress {
|
||||
|
||||
var stdout = new StringBuilder ();
|
||||
var stderr = new StringBuilder ();
|
||||
var combined = new StringBuilder ();
|
||||
|
||||
proc.OutputDataReceived += (sender, args) => {
|
||||
if (args.Data != null)
|
||||
lock (result)
|
||||
lock (result) {
|
||||
stdout.AppendLine (args.Data);
|
||||
combined.AppendLine (args.Data);
|
||||
}
|
||||
};
|
||||
|
||||
proc.ErrorDataReceived += (sender, args) => {
|
||||
if (args.Data != null)
|
||||
lock (result)
|
||||
lock (result) {
|
||||
stderr.AppendLine (args.Data);
|
||||
combined.AppendLine (args.Data);
|
||||
}
|
||||
};
|
||||
|
||||
result.Stopwatch.Start ();
|
||||
@@ -235,6 +233,7 @@ namespace Mono.Profiling.Tests.Stress {
|
||||
lock (result) {
|
||||
result.StandardOutput = stdout.ToString ();
|
||||
result.StandardError = stderr.ToString ();
|
||||
result.CombinedOutput = combined.ToString ();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -246,16 +245,10 @@ namespace Mono.Profiling.Tests.Stress {
|
||||
|
||||
if (result.ExitCode != 0) {
|
||||
Console.ForegroundColor = ConsoleColor.Red;
|
||||
Console.WriteLine ("===== stdout =====");
|
||||
Console.WriteLine ("===== stdout + stderr =====");
|
||||
Console.ResetColor ();
|
||||
|
||||
Console.WriteLine (result.StandardOutput);
|
||||
|
||||
Console.ForegroundColor = ConsoleColor.Red;
|
||||
Console.WriteLine ("===== stderr =====");
|
||||
Console.ResetColor ();
|
||||
|
||||
Console.WriteLine (result.StandardError);
|
||||
Console.WriteLine (result.CombinedOutput);
|
||||
}
|
||||
|
||||
results.Add (result);
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
check-roslyn:
|
||||
@echo "Runnning roslyn tests using mono from PATH:"
|
||||
mono --version
|
||||
@$(MAKE) validate-roslyn RESET_VERSIONS=1
|
||||
cd $(ROSLYN_PATH); \
|
||||
./build.sh --restore --build --test --mono || exit; \
|
||||
./mono-testing.sh "$(XUNIT)" || exit; \
|
||||
echo "done"
|
||||
@@ -7,7 +7,6 @@ $(eval $(call ValidateVersionTemplate,benchmarker,BENCHMARKER))
|
||||
$(eval $(call ValidateVersionTemplate,roslyn,ROSLYN))
|
||||
$(eval $(call ValidateVersionTemplate,coreclr,CORECLR))
|
||||
$(eval $(call ValidateVersionTemplate,ms-test-suite,MSTESTSUITE))
|
||||
$(eval $(call ValidateVersionTemplate,DebianShootoutMono,DEBIANSHOOTOUTMONO))
|
||||
|
||||
# Bump the given submodule to the revision given by the REV make variable
|
||||
# If COMMIT is 1, commit the change
|
||||
@@ -15,7 +14,6 @@ bump-benchmarker: __bump-benchmarker
|
||||
bump-roslyn: __bump-version-roslyn
|
||||
bump-coreclr: __bump-version-coreclr
|
||||
bump-ms-test-suite: __bump-version-ms-test-suite
|
||||
bump-DebianShootoutMono: __bump-version-DebianShootoutMono
|
||||
|
||||
# Bump the given submodule to the branch given by the BRANCH/REMOTE_BRANCH make variables
|
||||
# If COMMIT is 1, commit the change
|
||||
@@ -23,7 +21,6 @@ bump-branch-benchmarker: __bump-branch-benchmarker
|
||||
bump-branch-roslyn: __bump-branch-roslyn
|
||||
bump-branch-coreclr: __bump-branch-coreclr
|
||||
bump-branch-ms-test-suite: __bump-branch-ms-test-suite
|
||||
bump-branch-DebianShootoutMono: __bump-branch-DebianShootoutMono
|
||||
|
||||
# Bump the given submodule to its current GIT version
|
||||
# If COMMIT is 1, commit the change
|
||||
@@ -31,7 +28,6 @@ bump-current-benchmarker: __bump-current-benchmarker
|
||||
bump-current-roslyn: __bump-current-version-roslyn
|
||||
bump-current-coreclr: __bump-current-version-coreclr
|
||||
bump-current-ms-test-suite: __bump-current-version-ms-test-suite
|
||||
bump-current-DebianShootoutMono: __bump-current-version-DebianShootoutMono
|
||||
|
||||
commit-bump-benchmarker:
|
||||
$(MAKE) bump-benchmarker COMMIT=1
|
||||
@@ -45,9 +41,6 @@ commit-bump-coreclr:
|
||||
commit-bump-ms-test-suite:
|
||||
$(MAKE) bump-ms-test-suite COMMIT=1
|
||||
|
||||
commit-bump-DebianShootoutMono:
|
||||
$(MAKE) bump-DebianShootoutMono COMMIT=1
|
||||
|
||||
commit-bump-current-benchmarker:
|
||||
$(MAKE) bump-current-benchmarker COMMIT=1
|
||||
|
||||
@@ -59,6 +52,3 @@ commit-bump-current-coreclr:
|
||||
|
||||
commit-bump-current-ms-test-suite:
|
||||
$(MAKE) bump-current-ms-test-suite COMMIT=1
|
||||
|
||||
commit-bump-current-DebianShootoutMono:
|
||||
$(MAKE) bump-current-DebianShootoutMono COMMIT=1
|
||||
+9
-23
@@ -89,11 +89,9 @@ if test x$NOCONFIGURE = x && test -z "$*"; then
|
||||
echo
|
||||
fi
|
||||
|
||||
am_opt="--add-missing --copy --gnu -Wno-portability -Wno-obsolete"
|
||||
|
||||
case $CC in
|
||||
xlc )
|
||||
am_opt="$am_opt --include-deps";;
|
||||
am_opt=--include-deps;;
|
||||
esac
|
||||
|
||||
|
||||
@@ -120,7 +118,7 @@ for PARAM; do
|
||||
done
|
||||
|
||||
if test x$has_ext_mod = xtrue; then
|
||||
pushd $top_srcdir../mono-extensions/scripts
|
||||
pushd ../mono-extensions/scripts
|
||||
sh ./prepare-repo.sh $ext_mod_args || exit 1
|
||||
popd
|
||||
else
|
||||
@@ -144,35 +142,23 @@ if grep "^AC_CONFIG_HEADERS" configure.ac >/dev/null; then
|
||||
autoheader || { echo "**Error**: autoheader failed."; exit 1; }
|
||||
fi
|
||||
|
||||
echo "Running automake $am_opt ..."
|
||||
automake $am_opt ||
|
||||
echo "Running automake --gnu $am_opt ..."
|
||||
automake --add-missing --gnu -Wno-portability -Wno-obsolete $am_opt ||
|
||||
{ echo "**Error**: automake failed."; exit 1; }
|
||||
echo "Running autoconf ..."
|
||||
autoconf || { echo "**Error**: autoconf failed."; exit 1; }
|
||||
|
||||
if test -d $srcdir/external/bdwgc; then
|
||||
echo Running external/bdwgc/autogen.sh ...
|
||||
(cd $srcdir/external/bdwgc ; NOCONFIGURE=1 ./autogen.sh "$@")
|
||||
echo Done running external/bdwgc/autogen.sh ...
|
||||
if test -d $srcdir/libgc; then
|
||||
echo Running libgc/autogen.sh ...
|
||||
(cd $srcdir/libgc ; NOCONFIGURE=1 ./autogen.sh "$@")
|
||||
echo Done running libgc/autogen.sh ...
|
||||
fi
|
||||
|
||||
if test x$MONO_EXTRA_CONFIGURE_FLAGS != x; then
|
||||
echo "MONO_EXTRA_CONFIGURE_FLAGS is $MONO_EXTRA_CONFIGURE_FLAGS"
|
||||
fi
|
||||
|
||||
host_conf_flag=
|
||||
build_uname_all=`(uname -a) 2>/dev/null`
|
||||
case "$build_uname_all" in
|
||||
CYGWIN*)
|
||||
if [[ "$@" != *"--host="* ]]; then
|
||||
echo "Missing --host parameter, configure using ./configure --host=i686-w64-mingw32 or --host=x86_64-w64-mingw32"
|
||||
echo "Falling back using --host=x86_64-w64-mingw32 as default."
|
||||
host_conf_flag="--host=x86_64-w64-mingw32"
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
conf_flags="$MONO_EXTRA_CONFIGURE_FLAGS --enable-maintainer-mode --enable-compile-warnings $host_conf_flag" #--enable-iso-c
|
||||
conf_flags="$MONO_EXTRA_CONFIGURE_FLAGS --enable-maintainer-mode --enable-compile-warnings" #--enable-iso-c
|
||||
|
||||
if test x$NOCONFIGURE = x; then
|
||||
echo Running $srcdir/configure $conf_flags "$@" ...
|
||||
|
||||
+631
-2566
File diff suppressed because it is too large.
Load diff
+3
-3
@@ -7,7 +7,7 @@ EXTRA_DIST = \
|
||||
config.in \
|
||||
browscap.ini mono.supp mono.d README \
|
||||
mono.pc.in mono-2.pc.in monosgen-2.pc.in mint.pc.in dotnet.pc.in dotnet35.pc.in wcf.pc.in monodoc.pc.in \
|
||||
mono-cairo.pc.in mono-options.pc.in cecil.pc.in \
|
||||
mono-nunit.pc.in mono-cairo.pc.in mono-options.pc.in cecil.pc.in \
|
||||
mono-lineeditor.pc.in system.web.extensions_1.0.pc.in system.web.extensions.design_1.0.pc.in\
|
||||
dtrace-prelink.sh system.web.mvc.pc.in system.web.mvc2.pc.in system.web.mvc3.pc.in aspnetwebstack.pc.in \
|
||||
reactive.pc.in xbuild12.pc \
|
||||
@@ -25,10 +25,10 @@ else
|
||||
SGENPCFILE=
|
||||
endif
|
||||
|
||||
pkgconfig_DATA= mono.pc mono-2.pc dotnet.pc dotnet35.pc wcf.pc mono-cairo.pc mono-options.pc cecil.pc monodoc.pc mono-lineeditor.pc system.web.extensions_1.0.pc \
|
||||
pkgconfig_DATA= mono.pc mono-2.pc dotnet.pc dotnet35.pc wcf.pc mono-nunit.pc mono-cairo.pc mono-options.pc cecil.pc monodoc.pc mono-lineeditor.pc system.web.extensions_1.0.pc \
|
||||
system.web.extensions.design_1.0.pc system.web.mvc.pc system.web.mvc2.pc system.web.mvc3.pc aspnetwebstack.pc reactive.pc xbuild12.pc $(SGENPCFILE)
|
||||
|
||||
DISTCLEANFILES= mono-2.pc mono.pc mint.pc dotnet.pc dotnet35.pc wcf.pc mono-cairo.pc mono-options.pc cecil.pc monodoc.pc mono-lineeditor.pc system.web.extensions_1.0.pc \
|
||||
DISTCLEANFILES= mono-2.pc mono.pc mint.pc dotnet.pc dotnet35.pc wcf.pc mono-nunit.pc mono-cairo.pc mono-options.pc cecil.pc monodoc.pc mono-lineeditor.pc system.web.extensions_1.0.pc \
|
||||
system.web.extensions.design_1.0.pc system.web.mvc.pc system.web.mvc2.pc system.web.mvc3.pc aspnetwebstack.pc reactive.pc $(SGENPCFILE) mono-sgen-gdb.py
|
||||
|
||||
mono_DATA = config \
|
||||
|
||||
+1
-4
@@ -6,14 +6,11 @@
|
||||
<dllmap dll="libintl" name="bind_textdomain_codeset" target="@LIBC@" os="solaris"/>
|
||||
<dllmap dll="libintl" target="@INTL@" os="!windows"/>
|
||||
<dllmap dll="i:libxslt.dll" target="libxslt@libsuffix@" os="!windows"/>
|
||||
<dllmap dll="i:odbc32.dll" target="@ODBC@" os="!windows"/>
|
||||
<dllmap dll="i:odbc32.dll" target="libodbc@libsuffix@" os="!windows"/>
|
||||
<dllmap dll="i:odbc32.dll" target="libiodbc.dylib" os="osx"/>
|
||||
<dllmap dll="oci" target="libclntsh@libsuffix@" os="!windows"/>
|
||||
<dllmap dll="db2cli" target="libdb2_36@libsuffix@" os="!windows"/>
|
||||
<dllmap dll="MonoPosixHelper" target="$mono_libdir/libMonoPosixHelper@libsuffix@" os="!windows" />
|
||||
<dllmap dll="System.Native" target="$mono_libdir/@MONO_NATIVE_LIBRARY_NAME@@libsuffix@" os="!windows" />
|
||||
<dllmap dll="System.Net.Security.Native" target="$mono_libdir/@MONO_NATIVE_LIBRARY_NAME@@libsuffix@" os="!windows" />
|
||||
<dllmap dll="System.Security.Cryptography.Native.Apple" target="$mono_libdir/@MONO_NATIVE_LIBRARY_NAME@@libsuffix@" os="osx" />
|
||||
<dllmap dll="libmono-btls-shared" target="$mono_libdir/libmono-btls-shared@libsuffix@" os="!windows" />
|
||||
<dllmap dll="i:msvcrt" target="@LIBC@" os="!windows"/>
|
||||
<dllmap dll="i:msvcrt.dll" target="@LIBC@" os="!windows"/>
|
||||
|
||||
Executable → Regular
File mode changed.
+12
-12
@@ -53,7 +53,7 @@ def stringify_class_name(ns, name):
|
||||
if ns == "":
|
||||
return name
|
||||
else:
|
||||
return "{0}.{1}".format (ns, name)
|
||||
return "{}.{}".format (ns, name)
|
||||
|
||||
class ArrayPrinter:
|
||||
"Print a C# array"
|
||||
@@ -66,7 +66,7 @@ class ArrayPrinter:
|
||||
def to_string(self):
|
||||
obj = self.val.cast (gdb.lookup_type ("MonoArray").pointer ()).dereference ()
|
||||
length = obj ['max_length']
|
||||
return "{0} [{1}]".format (stringify_class_name (self.class_ns, self.class_name [0:len (self.class_name) - 2]), int (length))
|
||||
return "{} [{}]".format (stringify_class_name (self.class_ns, self.class_name [0:len (self.class_name) - 2]), int (length))
|
||||
|
||||
class ObjectPrinter:
|
||||
"Print a C# object"
|
||||
@@ -96,7 +96,7 @@ class ObjectPrinter:
|
||||
return (field.name, self.obj [field.name])
|
||||
except:
|
||||
# Superclass
|
||||
return (field.name, self.obj.cast (gdb.lookup_type ("{0}".format (field.name))))
|
||||
return (field.name, self.obj.cast (gdb.lookup_type ("{}".format (field.name))))
|
||||
|
||||
def children(self):
|
||||
# FIXME: It would be easier if gdb.Value would support iteration itself
|
||||
@@ -109,7 +109,7 @@ class ObjectPrinter:
|
||||
class_name = obj ['vtable'].dereference ()['klass'].dereference ()['name'].string ()
|
||||
if class_name [-2:len(class_name)] == "[]":
|
||||
return {}.__iter__ ()
|
||||
gdb_type = gdb.lookup_type ("struct {0}_{1}".format (class_ns.replace (".", "_"), class_name))
|
||||
gdb_type = gdb.lookup_type ("struct {}_{}".format (class_ns.replace (".", "_"), class_name))
|
||||
return self._iterator(obj.cast (gdb_type))
|
||||
except:
|
||||
print (sys.exc_info ()[0])
|
||||
@@ -129,12 +129,12 @@ class ObjectPrinter:
|
||||
return ArrayPrinter (self.val,class_ns,class_name).to_string ()
|
||||
if class_ns != "":
|
||||
try:
|
||||
gdb_type = gdb.lookup_type ("struct {0}.{1}".format (class_ns, class_name))
|
||||
gdb_type = gdb.lookup_type ("struct {}.{}".format (class_ns, class_name))
|
||||
except:
|
||||
# Maybe there is no debug info for that type
|
||||
return "{0}.{1}".format (class_ns, class_name)
|
||||
return "{}.{}".format (class_ns, class_name)
|
||||
#return obj.cast (gdb_type)
|
||||
return "{0}.{1}".format (class_ns, class_name)
|
||||
return "{}.{}".format (class_ns, class_name)
|
||||
return class_name
|
||||
except:
|
||||
print (sys.exc_info ()[0])
|
||||
@@ -154,9 +154,9 @@ class MonoMethodPrinter:
|
||||
val = self.val.dereference ()
|
||||
klass = val ["klass"].dereference ()
|
||||
class_name = stringify_class_name (klass ["name_space"].string (), klass ["name"].string ())
|
||||
return "\"{0}:{1} ()\"".format (class_name, val ["name"].string ())
|
||||
return "\"{}:{} ()\"".format (class_name, val ["name"].string ())
|
||||
# This returns more info but requires calling into the inferior
|
||||
#return "\"{0}\"".format (gdb.parse_and_eval ("mono_method_full_name ({0}, 1)".format (str (int (self.val.cast (gdb.lookup_type ("guint64")))))).string ())
|
||||
#return "\"{}\"".format (gdb.parse_and_eval ("mono_method_full_name ({}, 1)".format (str (int (self.val.cast (gdb.lookup_type ("guint64")))))).string ())
|
||||
|
||||
class MonoClassPrinter:
|
||||
"Print a MonoClass structure"
|
||||
@@ -169,9 +169,9 @@ class MonoClassPrinter:
|
||||
return "0x0"
|
||||
klass = self.val.dereference ()
|
||||
class_name = stringify_class_name (klass ["name_space"].string (), klass ["name"].string ())
|
||||
return "\"{0}\"".format (class_name)
|
||||
return "\"{}\"".format (class_name)
|
||||
# This returns more info but requires calling into the inferior
|
||||
#return "\"{0}\"".format (gdb.parse_and_eval ("mono_type_full_name (&((MonoClass*){0})->byval_arg)".format (str (int ((self.val).cast (gdb.lookup_type ("guint64")))))))
|
||||
#return "\"{}\"".format (gdb.parse_and_eval ("mono_type_full_name (&((MonoClass*){})->byval_arg)".format (str (int ((self.val).cast (gdb.lookup_type ("guint64")))))))
|
||||
|
||||
def lookup_pretty_printer(val):
|
||||
t = str (val.type)
|
||||
@@ -245,4 +245,4 @@ exec_file = gdb.current_objfile ().filename
|
||||
if os.stat (exec_file).st_size != os.lstat (exec_file).st_size:
|
||||
exec_file = os.readlink (exec_file)
|
||||
exec_dir = os.path.dirname (exec_file)
|
||||
gdb.execute ("source {0}/{1}-gdbinit".format (exec_dir, os.path.basename (exec_file)))
|
||||
gdb.execute ("source {}/{}-gdbinit".format (exec_dir, os.path.basename (exec_file)))
|
||||
+16
-16
@@ -48,7 +48,7 @@ def stringify_class_name(ns, name):
|
||||
if ns == "":
|
||||
return name
|
||||
else:
|
||||
return "{0}.{1}".format (ns, name)
|
||||
return "{}.{}".format (ns, name)
|
||||
|
||||
class ArrayPrinter:
|
||||
"Print a C# array"
|
||||
@@ -61,7 +61,7 @@ class ArrayPrinter:
|
||||
def to_string(self):
|
||||
obj = self.val.cast (gdb.lookup_type ("MonoArray").pointer ()).dereference ()
|
||||
length = obj ['max_length']
|
||||
return "{0} [{1}]".format (stringify_class_name (self.class_ns, self.class_name [0:len(self.class_name) - 2]), int(length))
|
||||
return "{} [{}]".format (stringify_class_name (self.class_ns, self.class_name [0:len(self.class_name) - 2]), int(length))
|
||||
|
||||
class ObjectPrinter:
|
||||
"Print a C# object"
|
||||
@@ -91,7 +91,7 @@ class ObjectPrinter:
|
||||
return (field.name, self.obj [field.name])
|
||||
except:
|
||||
# Superclass
|
||||
return (field.name, self.obj.cast (gdb.lookup_type ("{0}".format (field.name))))
|
||||
return (field.name, self.obj.cast (gdb.lookup_type ("{}".format (field.name))))
|
||||
|
||||
def children(self):
|
||||
# FIXME: It would be easier if gdb.Value would support iteration itself
|
||||
@@ -105,7 +105,7 @@ class ObjectPrinter:
|
||||
if class_name [-2:len(class_name)] == "[]":
|
||||
return {}.__iter__ ()
|
||||
try:
|
||||
gdb_type = gdb.lookup_type ("struct {0}_{1}".format (class_ns.replace (".", "_"), class_name))
|
||||
gdb_type = gdb.lookup_type ("struct {}_{}".format (class_ns.replace (".", "_"), class_name))
|
||||
return self._iterator(obj.cast (gdb_type))
|
||||
except:
|
||||
return {}.__iter__ ()
|
||||
@@ -127,12 +127,12 @@ class ObjectPrinter:
|
||||
return ArrayPrinter (self.val,class_ns,class_name).to_string ()
|
||||
if class_ns != "":
|
||||
try:
|
||||
gdb_type = gdb.lookup_type ("struct {0}.{1}".format (class_ns, class_name))
|
||||
gdb_type = gdb.lookup_type ("struct {}.{}".format (class_ns, class_name))
|
||||
except:
|
||||
# Maybe there is no debug info for that type
|
||||
return "{0}.{1}".format (class_ns, class_name)
|
||||
return "{}.{}".format (class_ns, class_name)
|
||||
#return obj.cast (gdb_type)
|
||||
return "{0}.{1}".format (class_ns, class_name)
|
||||
return "{}.{}".format (class_ns, class_name)
|
||||
return class_name
|
||||
except:
|
||||
print (sys.exc_info ()[0])
|
||||
@@ -152,9 +152,9 @@ class MonoMethodPrinter:
|
||||
val = self.val.dereference ()
|
||||
klass = val ["klass"].dereference ()
|
||||
class_name = stringify_class_name (klass ["name_space"].string (), klass ["name"].string ())
|
||||
return "\"{0}:{1} ()\"".format (class_name, val ["name"].string ())
|
||||
return "\"{}:{} ()\"".format (class_name, val ["name"].string ())
|
||||
# This returns more info but requires calling into the inferior
|
||||
#return "\"{0}\"".format (gdb.parse_and_eval ("mono_method_full_name ({0}, 1)".format (str (int (self.val.cast (gdb.lookup_type ("guint64")))))).string ())
|
||||
#return "\"{}\"".format (gdb.parse_and_eval ("mono_method_full_name ({}, 1)".format (str (int (self.val.cast (gdb.lookup_type ("guint64")))))).string ())
|
||||
|
||||
class MonoClassPrinter:
|
||||
"Print a MonoClass structure"
|
||||
@@ -168,11 +168,11 @@ class MonoClassPrinter:
|
||||
klass = self.val.dereference ()
|
||||
class_name = stringify_class_name (klass ["name_space"].string (), klass ["name"].string ())
|
||||
if add_quotes:
|
||||
return "\"{0}\"".format (class_name)
|
||||
return "\"{}\"".format (class_name)
|
||||
else:
|
||||
return class_name
|
||||
# This returns more info but requires calling into the inferior
|
||||
#return "\"{0}\"".format (gdb.parse_and_eval ("mono_type_full_name (&((MonoClass*){0})->byval_arg)".format (str (int ((self.val).cast (gdb.lookup_type ("guint64")))))))
|
||||
#return "\"{}\"".format (gdb.parse_and_eval ("mono_type_full_name (&((MonoClass*){})->byval_arg)".format (str (int ((self.val).cast (gdb.lookup_type ("guint64")))))))
|
||||
|
||||
def to_string(self):
|
||||
try:
|
||||
@@ -220,7 +220,7 @@ class MonoGenericClassPrinter:
|
||||
method_inst_str = ""
|
||||
if int(method_inst.cast (gdb.lookup_type ("guint64"))) != 0:
|
||||
method_inst_str = str(method_inst)
|
||||
return "{0}, [{1}], [{2}]>".format (container_str, class_inst_str, method_inst_str)
|
||||
return "{}, [{}], [{}]>".format (container_str, class_inst_str, method_inst_str)
|
||||
|
||||
def to_string(self):
|
||||
try:
|
||||
@@ -250,9 +250,9 @@ class MonoTypePrinter:
|
||||
info = str(t ["data"]["generic_class"])
|
||||
|
||||
if info != "":
|
||||
return "{{{0}, {1}}}".format (kind, info)
|
||||
return "{{{}, {}}}".format (kind, info)
|
||||
else:
|
||||
return "{{{0}}}".format (kind)
|
||||
return "{{{}}}".format (kind)
|
||||
except:
|
||||
#print (sys.exc_info ()[0])
|
||||
#print (sys.exc_info ()[1])
|
||||
@@ -281,7 +281,7 @@ class MonoMethodRgctxPrinter:
|
||||
if i > 0:
|
||||
inst_str = inst_str + ", "
|
||||
inst_str = inst_str + type_printer.to_string ()
|
||||
return "MRGCTX[{0}, [{1}]]".format (klass_printer.to_string(), inst_str)
|
||||
return "MRGCTX[{}, [{}]]".format (klass_printer.to_string(), inst_str)
|
||||
|
||||
class MonoVTablePrinter:
|
||||
"Print a MonoVTable structure"
|
||||
@@ -296,7 +296,7 @@ class MonoVTablePrinter:
|
||||
klass = vtable ["klass"]
|
||||
klass_printer = MonoClassPrinter (klass)
|
||||
|
||||
return "vtable({0})".format (klass_printer.to_string ())
|
||||
return "vtable({})".format (klass_printer.to_string ())
|
||||
|
||||
def lookup_pretty_printer(val):
|
||||
t = str (val.type)
|
||||
|
||||
+13
-13
@@ -1,9 +1,8 @@
|
||||
import lldb
|
||||
import traceback
|
||||
|
||||
def print_frames(thread, num_frames, current_thread):
|
||||
# TODO: Make output header similar to bt.
|
||||
print('%c thread #%i' % ('*' if current_thread else ' ', thread.idx))
|
||||
print '%c thread #%i' % ('*' if current_thread else ' ', thread.idx)
|
||||
|
||||
if current_thread:
|
||||
selected_frame = thread.GetSelectedFrame()
|
||||
@@ -15,16 +14,17 @@ def print_frames(thread, num_frames, current_thread):
|
||||
if function_name == "interp_exec_method_full":
|
||||
try:
|
||||
s = 'frame->imethod->method'
|
||||
methoddesc = frame.EvaluateExpression('(char*) mono_method_full_name (' + s + ', 1)').summary[1:-1]
|
||||
klassname = frame.EvaluateExpression('(char*) ' + s + '->klass->name').summary[1:-1]
|
||||
methodname = frame.EvaluateExpression('(char*) ' + s + '->name').summary[1:-1]
|
||||
|
||||
ipoffset = frame.EvaluateExpression('ip').GetValueAsUnsigned()
|
||||
insn = ''
|
||||
if ipoffset != 0:
|
||||
ipoffset -= frame.EvaluateExpression('frame->imethod->code').GetValueAsUnsigned()
|
||||
insn = "\"" + frame.EvaluateExpression('mono_interp_opname (*ip)').summary[1:-1] + "\""
|
||||
var = '%s @ %d %s || %s' % (methoddesc, ipoffset, insn, frame)
|
||||
ipoffset -= frame.EvaluateExpression('rtm->code').GetValueAsUnsigned()
|
||||
insn = "\"" + frame.EvaluateExpression('mono_interp_opname [*ip]').summary[1:-1] + "\""
|
||||
var = '%s::%s @ %d %s || %s' % (klassname, methodname, ipoffset, insn, frame)
|
||||
except Exception as e:
|
||||
traceback.print_exc()
|
||||
print "DBG: execfail:" + str(e)
|
||||
elif function_name == "mono_interp_transform_method":
|
||||
try:
|
||||
s = 'runtime_method->method'
|
||||
@@ -32,7 +32,7 @@ def print_frames(thread, num_frames, current_thread):
|
||||
methodname = frame.EvaluateExpression('(char*) ' + s + '->name').summary[1:-1]
|
||||
var = 'transforming %s::%s || %s' % (klassname, methodname, frame)
|
||||
except Exception as e:
|
||||
print("DBG: transformfail:" + str(e))
|
||||
print "DBG: transformfail:" + str(e)
|
||||
elif pc[0] == '0':
|
||||
try:
|
||||
framestr = frame.EvaluateExpression('(char*)mono_pmip((void*)%s)' % pc).summary[1:-1]
|
||||
@@ -40,7 +40,7 @@ def print_frames(thread, num_frames, current_thread):
|
||||
except:
|
||||
pass
|
||||
|
||||
print(' %c %s' % ('*' if current_thread and frame.idx == selected_frame.idx else ' ', var))
|
||||
print ' %c %s' % ('*' if current_thread and frame.idx == selected_frame.idx else ' ', var)
|
||||
|
||||
def monobt(debugger, command, result, dict):
|
||||
opts = {'all_bt': False, 'num_frames': None}
|
||||
@@ -50,20 +50,20 @@ def monobt(debugger, command, result, dict):
|
||||
elif command.isdigit():
|
||||
opts['num_frames'] = int(command)
|
||||
elif command != '':
|
||||
print('error: monobt [<number>|all]')
|
||||
print 'error: monobt [<number>|all]'
|
||||
return
|
||||
|
||||
target = debugger.GetSelectedTarget()
|
||||
process = target.process
|
||||
|
||||
if not process.IsValid():
|
||||
print('error: invalid process')
|
||||
print 'error: invalid process'
|
||||
return
|
||||
|
||||
if opts['all_bt']:
|
||||
for thread in process.threads:
|
||||
print_frames(thread, len(thread), process.selected_thread == thread)
|
||||
print('')
|
||||
print ''
|
||||
else:
|
||||
thread = process.selected_thread
|
||||
num_frames = len(thread) if opts['num_frames'] is None else opts['num_frames']
|
||||
@@ -76,4 +76,4 @@ def __lldb_init_module (debugger, dict):
|
||||
# Add any commands contained in this module to LLDB
|
||||
debugger.HandleCommand('command script add -f monobt.monobt monobt')
|
||||
debugger.HandleCommand('command alias mbt monobt')
|
||||
print('"monobt" command installed')
|
||||
print '"monobt" command installed'
|
||||
@@ -0,0 +1,9 @@
|
||||
prefix=${pcfiledir}/../..
|
||||
exec_prefix=${prefix}
|
||||
libdir=${exec_prefix}/lib
|
||||
|
||||
|
||||
Name: Mono NUnit
|
||||
Description: Mono's version of NUnit
|
||||
Version: @VERSION@
|
||||
Libs: -r:${libdir}/mono/4.5/nunit.core.dll -r:${libdir}/mono/4.5/nunit.core.interfaces.dll -r:${libdir}/mono/4.5/nunit.core.extensions.dll -r:${libdir}/mono/4.5/nunit.framework.dll -r:${libdir}/mono/4.5/nunit.framework.extensions.dll -r:${libdir}/mono/4.5/nunit.mocks.dll -r:${libdir}/mono/4.5/nunit.util.dll -r:${libdir}/mono/4.5/nunit-console-runner.dll
|
||||
@@ -116,7 +116,7 @@
|
||||
<add prefix="http" type="System.Net.HttpRequestCreator, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<add prefix="https" type="System.Net.HttpRequestCreator, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<add prefix="file" type="System.Net.FileWebRequestCreator, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<add prefix="ftp" type="System.Net.FtpWebRequestCreator, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<add prefix="ftp" type="System.Net.FtpRequestCreator, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
</webRequestModules>
|
||||
</system.net>
|
||||
|
||||
|
||||
@@ -132,7 +132,7 @@
|
||||
<add prefix="http" type="System.Net.HttpRequestCreator, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<add prefix="https" type="System.Net.HttpRequestCreator, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<add prefix="file" type="System.Net.FileWebRequestCreator, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<add prefix="ftp" type="System.Net.FtpWebRequestCreator, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<add prefix="ftp" type="System.Net.FtpRequestCreator, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
</webRequestModules>
|
||||
<settings>
|
||||
<ipv6 enabled="false"/>
|
||||
|
||||
@@ -133,7 +133,7 @@
|
||||
<add prefix="http" type="System.Net.HttpRequestCreator, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<add prefix="https" type="System.Net.HttpRequestCreator, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<add prefix="file" type="System.Net.FileWebRequestCreator, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<add prefix="ftp" type="System.Net.FtpWebRequestCreator, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<add prefix="ftp" type="System.Net.FtpRequestCreator, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
</webRequestModules>
|
||||
</system.net>
|
||||
|
||||
|
||||
@@ -136,7 +136,7 @@
|
||||
<add prefix="http" type="System.Net.HttpRequestCreator, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<add prefix="https" type="System.Net.HttpRequestCreator, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<add prefix="file" type="System.Net.FileWebRequestCreator, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<add prefix="ftp" type="System.Net.FtpWebRequestCreator, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<add prefix="ftp" type="System.Net.FtpRequestCreator, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
</webRequestModules>
|
||||
</system.net>
|
||||
|
||||
|
||||
+2
-3
@@ -52,8 +52,7 @@ EXTRA_DIST = \
|
||||
|
||||
-include $(mcs_topdir)/build/config.make
|
||||
|
||||
DOC_PROFILE:=net_4_x
|
||||
CLASS=$(mcs_topdir)/class/lib/$(DOC_PROFILE)
|
||||
CLASS=$(mcs_topdir)/class/lib/$(DEFAULT_PROFILE)
|
||||
|
||||
dist-hook:
|
||||
$(mkdir_p) $(distdir)/sources
|
||||
@@ -69,7 +68,7 @@ clean-local:
|
||||
-rm -f deploy/* convert.exe* AgilityPack.dll*
|
||||
-rm -f $(ASSEMBLED_DOCS)
|
||||
|
||||
TOOL_MAKE=$(MAKE) -f $(srcdir)/docs.make topdir=$(srcdir)/../mcs srcdir=$(srcdir) PROFILE=$(DOC_PROFILE)
|
||||
TOOL_MAKE=$(MAKE) -f $(srcdir)/docs.make topdir=$(srcdir)/../mcs srcdir=$(srcdir)
|
||||
|
||||
monoapi.zip: monoapi.tree
|
||||
|
||||
|
||||
+2
-25
@@ -13,31 +13,10 @@ ASSEMBLED_DOCS = \
|
||||
monoapi.tree monoapi.zip
|
||||
|
||||
convert.exe: $(srcdir)/convert.cs AgilityPack.dll
|
||||
$(CSCOMPILE) -r:$(topdir)/class/lib/$(PROFILE)/mscorlib.dll -r:$(topdir)/class/lib/$(PROFILE)/System.Xml.dll -out:$@ $< -r:AgilityPack.dll
|
||||
$(CSCOMPILE) -r:$(topdir)/class/lib/$(PROFILE)/System.Xml.dll -out:$@ $< -r:AgilityPack.dll
|
||||
|
||||
AgilityPack.dll:
|
||||
$(CSCOMPILE) -r:$(topdir)/class/lib/$(PROFILE)/mscorlib.dll -r:$(topdir)/class/lib/$(PROFILE)/System.dll -r:$(topdir)/class/lib/$(PROFILE)/System.Xml.dll -target:library -out:$@ $(srcdir)/HtmlAgilityPack/*.cs
|
||||
|
||||
ifdef MCS_MODE
|
||||
monoapi.zip:
|
||||
touch $@
|
||||
|
||||
monoapi.tree: monoapi.zip
|
||||
touch $@
|
||||
|
||||
mono-tools.zip:
|
||||
touch $@
|
||||
|
||||
mono-tools.tree: mono-tools.zip
|
||||
touch $@
|
||||
|
||||
mono-file-formats.zip:
|
||||
touch $@
|
||||
|
||||
mono-file-formats.tree: mono-file-formats.zip
|
||||
touch $@
|
||||
|
||||
else
|
||||
$(CSCOMPILE) -r:$(topdir)/class/lib/$(PROFILE)/System.dll -r:$(topdir)/class/lib/$(PROFILE)/System.Xml.dll -target:library -out:$@ $(srcdir)/HtmlAgilityPack/*.cs
|
||||
|
||||
monoapi.zip: monoapi.tree
|
||||
@test -f $@ || { rm -f $< && $(MAKE) $<; }
|
||||
@@ -57,7 +36,5 @@ mono-file-formats.zip: mono-file-formats.tree
|
||||
mono-file-formats.tree: $(srcdir)/mono-file-formats.config $(srcdir)/docs.make
|
||||
$(MDOC) assemble -o mono-file-formats -f man $<
|
||||
|
||||
endif
|
||||
|
||||
.doc-stamp:
|
||||
|
||||
-138
@@ -1,138 +0,0 @@
|
||||
# Mono RISC-V Port
|
||||
|
||||
These are some useful links and notes pertaining to the RISC-V port of Mono.
|
||||
|
||||
## Useful RISC-V documentation
|
||||
|
||||
* [RISC-V User-Level ISA Specification](https://riscv.org/specifications)
|
||||
* [RISC-V Privileged ISA Specification](https://riscv.org/specifications/privileged-isa)
|
||||
* [RISC-V Debug Specification](https://riscv.org/specifications/debug-specification)
|
||||
* [RISC-V ELF psABI Specification](https://github.com/riscv/riscv-elf-psabi-doc)
|
||||
* [RISC-V C API Specification](https://github.com/riscv/riscv-c-api-doc)
|
||||
* [RISC-V Toolchain Conventions](https://github.com/riscv/riscv-toolchain-conventions)
|
||||
* [RISC-V Assembly Programmer's Manual](https://github.com/riscv/riscv-asm-manual)
|
||||
|
||||
## Useful RISC-V repositories
|
||||
|
||||
* [RISC-V Organization](https://github.com/riscv)
|
||||
* [RISC-V GNU Toolchain](https://github.com/riscv/riscv-gnu-toolchain)
|
||||
* [RISC-V Binutils](https://github.com/riscv/riscv-binutils-gdb)
|
||||
* [RISC-V GCC](https://github.com/riscv/riscv-gcc)
|
||||
* [RISC-V Glibc](https://github.com/riscv/riscv-glibc)
|
||||
* [RISC-V Newlib](https://github.com/riscv/riscv-newlib)
|
||||
* [RISC-V Tools](https://github.com/riscv/riscv-tools)
|
||||
* [RISC-V Opcodes](https://github.com/riscv/riscv-opcodes)
|
||||
* [RISC-V Tests](https://github.com/riscv/riscv-tests)
|
||||
|
||||
## Setting up a cross environment
|
||||
|
||||
### Debian/Ubuntu packages
|
||||
|
||||
This is the most painless way of getting a functional toolchain installed. Note
|
||||
that these packages may not be available on older distributions; this is tested
|
||||
on Ubuntu 19.04.
|
||||
|
||||
First, add this to your `$HOME/.bashrc` (or some other script that you run):
|
||||
|
||||
```bash
|
||||
export RISCV=$HOME/riscv
|
||||
export PATH=$RISCV/bin:$PATH
|
||||
export QEMU_LD_PREFIX=/usr/riscv64-linux-gnu
|
||||
```
|
||||
|
||||
Next, install the toolchain packages like so:
|
||||
|
||||
```bash
|
||||
# apt install autoconf automake binutils-riscv64-linux-gnu build-essential gcc-riscv64-linux-gnu gdb-multiarch g++-riscv64-linux-gnu libtool qemu qemu-system-misc qemu-user qemu-user-static
|
||||
```
|
||||
|
||||
You will now have all the toolchain binaries in `/usr/bin`.
|
||||
|
||||
### Building manually
|
||||
|
||||
This approach may be somewhat unstable since you will be using the latest
|
||||
versions of the various parts of the toolchain.
|
||||
|
||||
First, add this to your `$HOME/.bashrc` (or some other script that you run):
|
||||
|
||||
```bash
|
||||
export RISCV=$HOME/riscv
|
||||
export PATH=$RISCV/bin:$PATH
|
||||
export QEMU_LD_PREFIX=$RISCV/sysroot
|
||||
```
|
||||
|
||||
Next, install some dependencies needed to build the toolchain:
|
||||
|
||||
```console
|
||||
# apt install autoconf automake autotools-dev curl libmpc-dev libmpfr-dev libgmp-dev gawk build-essential bison flex texinfo gperf libtool patchutils bc zlib1g-dev libexpat-dev
|
||||
```
|
||||
|
||||
Finally, build the toolchain:
|
||||
|
||||
```console
|
||||
$ git clone --recursive [email protected]:riscv/riscv-gnu-toolchain.git
|
||||
$ cd riscv-gnu-toolchain
|
||||
$ ./configure --prefix=$RISCV --enable-linux --enable-multilib --with-arch=rv64imafdc --with-abi=lp64d
|
||||
$ make linux
|
||||
```
|
||||
|
||||
This will install the built toolchain binaries in `$RISCV/bin`.
|
||||
|
||||
## Building Mono with a cross toolchain
|
||||
|
||||
Building Mono is quite straightforward:
|
||||
|
||||
```console
|
||||
$ ./autogen.sh --prefix=$RISCV/sysroot --host=riscv64-linux-gnu
|
||||
$ make
|
||||
$ make install
|
||||
```
|
||||
|
||||
(Note: You may need to use `--host=riscv64-unknown-linux-gnu` instead if you
|
||||
built the toolchain manually.)
|
||||
|
||||
You can set `CFLAGS` as appropriate to change the RISC-V options, such as which
|
||||
standard extensions and ABI to use. For example, to use the 64-bit soft float
|
||||
ABI:
|
||||
|
||||
```console
|
||||
$ CFLAGS="-mabi=lp64" ./autogen.sh --prefix=$RISCV/sysroot --host=riscv64-linux-gnu
|
||||
```
|
||||
|
||||
Note that, since this is a cross build, the `mcs` directory won't be built. You
|
||||
will have to build the managed libraries and tools through a native build of
|
||||
Mono and copy them into `$RISCV/sysroot`.
|
||||
|
||||
You can run Mono with QEMU like this:
|
||||
|
||||
```console
|
||||
$ qemu-riscv64 ./mono/mini/mono hello.exe
|
||||
```
|
||||
|
||||
## Debugging
|
||||
|
||||
Debugging with GDB currently requires a manually built toolchain.
|
||||
|
||||
It can be done like so:
|
||||
|
||||
```console
|
||||
$ qemu-riscv64 -g 12345 ./mono/mini/mono --interp basic.exe &
|
||||
$ riscv64-unknown-elf-gdb -ex 'target remote localhost:12345' -ex 'b main' -ex 'c' ./mono/mini/mono
|
||||
```
|
||||
|
||||
## Things to be done
|
||||
|
||||
Things that need to be done beyond the basic 64-bit port, in no particular
|
||||
order:
|
||||
|
||||
* Complete the soft float port.
|
||||
* Complete the 32-bit port.
|
||||
* Add unwind info to trampolines.
|
||||
* Implement AOT support.
|
||||
* Implement interpreter support.
|
||||
* Implement LLVM support.
|
||||
* Implement SDB support.
|
||||
* Implement `dyn_call` support.
|
||||
* Ensure all runtime tests pass.
|
||||
* Ensure all corlib tests pass.
|
||||
* Set up CI on Jenkins.
|
||||
@@ -109,12 +109,6 @@ typedef struct {
|
||||
|
||||
<h3>Write Barriers</h3>
|
||||
|
||||
<p>SGen is a concurrent and generational GC, features which require
|
||||
tracking changes to the state of the heap. This is achieved through
|
||||
write barriers. Whenever native code is changing the state of the
|
||||
heap by storing references into another managed object, it needs to
|
||||
do it using this write barrier API.
|
||||
|
||||
<h4><a name="api:mono_gc_wbarrier_arrayref_copy">mono_gc_wbarrier_arrayref_copy</a></h4>
|
||||
<h4><a name="api:mono_gc_wbarrier_generic_nostore">mono_gc_wbarrier_generic_nostore</a></h4>
|
||||
<h4><a name="api:mono_gc_wbarrier_generic_store">mono_gc_wbarrier_generic_store</a></h4>
|
||||
|
||||
@@ -1,27 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Dependencies>
|
||||
<ProductDependencies>
|
||||
<Dependency Name="Microsoft.Private.CoreFx.NETCoreApp" Version="5.0.0-alpha.1.19563.3">
|
||||
<Uri>https://github.com/dotnet/corefx</Uri>
|
||||
<Sha>5cee7c97d602f294e27c582d4dab81ec388f1d7b</Sha>
|
||||
</Dependency>
|
||||
<Dependency Name="Microsoft.NETCore.App" Version="5.0.0-alpha.1.19564.1">
|
||||
<Uri>https://github.com/dotnet/core-setup</Uri>
|
||||
<Sha>c77948d92a2f950140f09384f057cb893ec3955a</Sha>
|
||||
</Dependency>
|
||||
<Dependency Name="Microsoft.Net.Compilers" Version="3.3.1-beta4-19476-06">
|
||||
<Uri>https://github.com/dotnet/roslyn</Uri>
|
||||
<Sha>39d545dc14bc4d5a546e5e2f58d1ebaca72fcd61</Sha>
|
||||
</Dependency>
|
||||
</ProductDependencies>
|
||||
<ToolsetDependencies>
|
||||
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="5.0.0-beta.19567.2">
|
||||
<Uri>https://github.com/dotnet/arcade</Uri>
|
||||
<Sha>928efaa081ffd17b37f6c662fee44775f2d0b90f</Sha>
|
||||
</Dependency>
|
||||
<Dependency Name="Microsoft.DotNet.Helix.Sdk" Version="5.0.0-beta.19567.2">
|
||||
<Uri>https://github.com/dotnet/arcade</Uri>
|
||||
<Sha>928efaa081ffd17b37f6c662fee44775f2d0b90f</Sha>
|
||||
</Dependency>
|
||||
</ToolsetDependencies>
|
||||
</Dependencies>
|
||||
@@ -1,14 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<VersionPrefix>5.0.0</VersionPrefix>
|
||||
<PreReleaseVersionLabel>prerelease</PreReleaseVersionLabel>
|
||||
<!-- Package versions -->
|
||||
<!-- corefx -->
|
||||
<MicrosoftPrivateCoreFxNETCoreAppVersion>5.0.0-alpha.1.19563.3</MicrosoftPrivateCoreFxNETCoreAppVersion>
|
||||
<!-- core-setup -->
|
||||
<MicrosoftNETCoreAppVersion>5.0.0-alpha.1.19564.1</MicrosoftNETCoreAppVersion>
|
||||
<!-- roslyn -->
|
||||
<MicrosoftNetCompilersVersion>3.3.1-beta4-19476-06</MicrosoftNetCompilersVersion>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
@@ -1,2 +0,0 @@
|
||||
@echo off
|
||||
powershell -ExecutionPolicy ByPass -NoProfile -command "& """%~dp0Build.ps1""" -restore -build -test -sign -pack -publish -ci %*"
|
||||
@@ -1,158 +0,0 @@
|
||||
param(
|
||||
[Parameter(Mandatory=$true)][string] $InputPath, # Full path to directory where NuGet packages to be checked are stored
|
||||
[Parameter(Mandatory=$true)][string] $ExtractPath, # Full path to directory where the packages will be extracted during validation
|
||||
[Parameter(Mandatory=$true)][string] $SymbolToolPath # Full path to directory where dotnet symbol-tool was installed
|
||||
)
|
||||
|
||||
Add-Type -AssemblyName System.IO.Compression.FileSystem
|
||||
|
||||
function FirstMatchingSymbolDescriptionOrDefault {
|
||||
param(
|
||||
[string] $FullPath, # Full path to the module that has to be checked
|
||||
[string] $TargetServerParam, # Parameter to pass to `Symbol Tool` indicating the server to lookup for symbols
|
||||
[string] $SymbolsPath
|
||||
)
|
||||
|
||||
$FileName = [System.IO.Path]::GetFileName($FullPath)
|
||||
$Extension = [System.IO.Path]::GetExtension($FullPath)
|
||||
|
||||
# Those below are potential symbol files that the `dotnet symbol` might
|
||||
# return. Which one will be returned depend on the type of file we are
|
||||
# checking and which type of file was uploaded.
|
||||
|
||||
# The file itself is returned
|
||||
$SymbolPath = $SymbolsPath + "\" + $FileName
|
||||
|
||||
# PDB file for the module
|
||||
$PdbPath = $SymbolPath.Replace($Extension, ".pdb")
|
||||
|
||||
# PDB file for R2R module (created by crossgen)
|
||||
$NGenPdb = $SymbolPath.Replace($Extension, ".ni.pdb")
|
||||
|
||||
# DBG file for a .so library
|
||||
$SODbg = $SymbolPath.Replace($Extension, ".so.dbg")
|
||||
|
||||
# DWARF file for a .dylib
|
||||
$DylibDwarf = $SymbolPath.Replace($Extension, ".dylib.dwarf")
|
||||
|
||||
.\dotnet-symbol.exe --symbols --modules --windows-pdbs $TargetServerParam $FullPath -o $SymbolsPath | Out-Null
|
||||
|
||||
if (Test-Path $PdbPath) {
|
||||
return "PDB"
|
||||
}
|
||||
elseif (Test-Path $NGenPdb) {
|
||||
return "NGen PDB"
|
||||
}
|
||||
elseif (Test-Path $SODbg) {
|
||||
return "DBG for SO"
|
||||
}
|
||||
elseif (Test-Path $DylibDwarf) {
|
||||
return "Dwarf for Dylib"
|
||||
}
|
||||
elseif (Test-Path $SymbolPath) {
|
||||
return "Module"
|
||||
}
|
||||
else {
|
||||
return $null
|
||||
}
|
||||
}
|
||||
|
||||
function CountMissingSymbols {
|
||||
param(
|
||||
[string] $PackagePath # Path to a NuGet package
|
||||
)
|
||||
|
||||
# Ensure input file exist
|
||||
if (!(Test-Path $PackagePath)) {
|
||||
throw "Input file does not exist: $PackagePath"
|
||||
}
|
||||
|
||||
# Extensions for which we'll look for symbols
|
||||
$RelevantExtensions = @(".dll", ".exe", ".so", ".dylib")
|
||||
|
||||
# How many files are missing symbol information
|
||||
$MissingSymbols = 0
|
||||
|
||||
$PackageId = [System.IO.Path]::GetFileNameWithoutExtension($PackagePath)
|
||||
$PackageGuid = New-Guid
|
||||
$ExtractPath = Join-Path -Path $ExtractPath -ChildPath $PackageGuid
|
||||
$SymbolsPath = Join-Path -Path $ExtractPath -ChildPath "Symbols"
|
||||
|
||||
[System.IO.Compression.ZipFile]::ExtractToDirectory($PackagePath, $ExtractPath)
|
||||
|
||||
# Makes easier to reference `symbol tool`
|
||||
Push-Location $SymbolToolPath
|
||||
|
||||
Get-ChildItem -Recurse $ExtractPath |
|
||||
Where-Object {$RelevantExtensions -contains $_.Extension} |
|
||||
ForEach-Object {
|
||||
if ($_.FullName -Match "\\ref\\") {
|
||||
Write-Host "`t Ignoring reference assembly file" $_.FullName
|
||||
return
|
||||
}
|
||||
|
||||
$SymbolsOnMSDL = FirstMatchingSymbolDescriptionOrDefault $_.FullName "--microsoft-symbol-server" $SymbolsPath
|
||||
$SymbolsOnSymWeb = FirstMatchingSymbolDescriptionOrDefault $_.FullName "--internal-server" $SymbolsPath
|
||||
|
||||
Write-Host -NoNewLine "`t Checking file" $_.FullName "... "
|
||||
|
||||
if ($SymbolsOnMSDL -ne $null -and $SymbolsOnSymWeb -ne $null) {
|
||||
Write-Host "Symbols found on MSDL (" $SymbolsOnMSDL ") and SymWeb (" $SymbolsOnSymWeb ")"
|
||||
}
|
||||
else {
|
||||
$MissingSymbols++
|
||||
|
||||
if ($SymbolsOnMSDL -eq $null -and $SymbolsOnSymWeb -eq $null) {
|
||||
Write-Host "No symbols found on MSDL or SymWeb!"
|
||||
}
|
||||
else {
|
||||
if ($SymbolsOnMSDL -eq $null) {
|
||||
Write-Host "No symbols found on MSDL!"
|
||||
}
|
||||
else {
|
||||
Write-Host "No symbols found on SymWeb!"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Pop-Location
|
||||
|
||||
return $MissingSymbols
|
||||
}
|
||||
|
||||
function CheckSymbolsAvailable {
|
||||
if (Test-Path $ExtractPath) {
|
||||
Remove-Item $ExtractPath -Force -Recurse -ErrorAction SilentlyContinue
|
||||
}
|
||||
|
||||
Get-ChildItem "$InputPath\*.nupkg" |
|
||||
ForEach-Object {
|
||||
$FileName = $_.Name
|
||||
|
||||
# These packages from Arcade-Services include some native libraries that
|
||||
# our current symbol uploader can't handle. Below is a workaround until
|
||||
# we get issue: https://github.com/dotnet/arcade/issues/2457 sorted.
|
||||
if ($FileName -Match "Microsoft\.DotNet\.Darc\.") {
|
||||
Write-Host "Ignoring Arcade-services file: $FileName"
|
||||
Write-Host
|
||||
return
|
||||
}
|
||||
elseif ($FileName -Match "Microsoft\.DotNet\.Maestro\.Tasks\.") {
|
||||
Write-Host "Ignoring Arcade-services file: $FileName"
|
||||
Write-Host
|
||||
return
|
||||
}
|
||||
|
||||
Write-Host "Validating $FileName "
|
||||
$Status = CountMissingSymbols "$InputPath\$FileName"
|
||||
|
||||
if ($Status -ne 0) {
|
||||
Write-Error "Missing symbols for $Status modules in the package $FileName"
|
||||
}
|
||||
|
||||
Write-Host
|
||||
}
|
||||
}
|
||||
|
||||
CheckSymbolsAvailable
|
||||
@@ -1,11 +0,0 @@
|
||||
@{
|
||||
IncludeRules=@('PSAvoidUsingCmdletAliases',
|
||||
'PSAvoidUsingWMICmdlet',
|
||||
'PSAvoidUsingPositionalParameters',
|
||||
'PSAvoidUsingInvokeExpression',
|
||||
'PSUseDeclaredVarsMoreThanAssignments',
|
||||
'PSUseCmdletCorrectly',
|
||||
'PSStandardDSCFunctionsInResource',
|
||||
'PSUseIdenticalMandatoryParametersForDSC',
|
||||
'PSUseIdenticalParametersForDSC')
|
||||
}
|
||||
@@ -1,83 +0,0 @@
|
||||
<!-- Licensed to the .NET Foundation under one or more agreements. The .NET Foundation licenses this file to you under the MIT license. See the LICENSE file in the project root for more information. -->
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<!--
|
||||
This MSBuild file is intended to be used as the body of the default
|
||||
publishing release pipeline. The release pipeline will use this file
|
||||
to invoke the PushToStaticFeed task that will read the build asset
|
||||
manifest and publish the assets described in the manifest to
|
||||
informed target feeds.
|
||||
-->
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netcoreapp2.1</TargetFramework>
|
||||
</PropertyGroup>
|
||||
|
||||
<Import Project="$(MSBuildThisFileDirectory)DefaultVersions.props" Condition="Exists('$(MSBuildThisFileDirectory)DefaultVersions.props')" />
|
||||
|
||||
<!--
|
||||
This won't be necessary once we solve this issue:
|
||||
https://github.com/dotnet/arcade/issues/2266
|
||||
-->
|
||||
<Import Project="$(MSBuildThisFileDirectory)ArtifactsCategory.props" Condition="Exists('$(MSBuildThisFileDirectory)ArtifactsCategory.props')" />
|
||||
|
||||
<Import Project="$(NuGetPackageRoot)microsoft.dotnet.build.tasks.feed\$(MicrosoftDotNetBuildTasksFeedVersion)\build\Microsoft.DotNet.Build.Tasks.Feed.targets" />
|
||||
|
||||
<Target Name="PublishToFeed">
|
||||
<Error Condition="'$(ArtifactsCategory)' == ''" Text="ArtifactsCategory: The artifacts' category produced by the build wasn't provided." />
|
||||
<Error Condition="'$(AccountKeyToStaticFeed)' == ''" Text="AccountKeyToStaticFeed: Account key for target feed wasn't provided." />
|
||||
<Error Condition="'$(ManifestsBasePath)' == ''" Text="Full path to asset manifests directory wasn't provided." />
|
||||
<Error Condition="'$(BlobBasePath)' == '' AND '$(PackageBasePath)' == ''" Text="A valid full path to BlobBasePath of PackageBasePath is required." />
|
||||
|
||||
<ItemGroup>
|
||||
<!-- Include all manifests found in the manifest folder. -->
|
||||
<ManifestFiles Include="$(ManifestsBasePath)*.xml" />
|
||||
</ItemGroup>
|
||||
|
||||
<Error Condition="'@(ManifestFiles)' == ''" Text="No manifest file was found in the provided path: $(ManifestsBasePath)" />
|
||||
|
||||
<!--
|
||||
For now the type of packages being published will be informed for the whole build.
|
||||
Eventually this will be specified on a per package basis:
|
||||
TODO: https://github.com/dotnet/arcade/issues/2266
|
||||
-->
|
||||
<PropertyGroup>
|
||||
<TargetStaticFeed Condition="'$(ArtifactsCategory.ToUpper())' == '.NETCORE'">https://dotnetfeed.blob.core.windows.net/dotnet-core/index.json</TargetStaticFeed>
|
||||
<TargetStaticFeed Condition="'$(ArtifactsCategory.ToUpper())' == '.NETCOREVALIDATION'">https://dotnetfeed.blob.core.windows.net/arcade-validation/index.json</TargetStaticFeed>
|
||||
<TargetStaticFeed Condition="'$(ArtifactsCategory.ToUpper())' == 'ASPNETCORE'">https://dotnetfeed.blob.core.windows.net/aspnet-aspnetcore/index.json</TargetStaticFeed>
|
||||
<TargetStaticFeed Condition="'$(ArtifactsCategory.ToUpper())' == 'ASPNETCORETOOLING'">https://dotnetfeed.blob.core.windows.net/aspnet-aspnetcore-tooling/index.json</TargetStaticFeed>
|
||||
<TargetStaticFeed Condition="'$(ArtifactsCategory.ToUpper())' == 'ENTITYFRAMEWORKCORE'">https://dotnetfeed.blob.core.windows.net/aspnet-entityframeworkcore/index.json</TargetStaticFeed>
|
||||
<TargetStaticFeed Condition="'$(ArtifactsCategory.ToUpper())' == 'ASPNETEXTENSIONS'">https://dotnetfeed.blob.core.windows.net/aspnet-extensions/index.json</TargetStaticFeed>
|
||||
<TargetStaticFeed Condition="'$(ArtifactsCategory.ToUpper())' == 'CORECLR'">https://dotnetfeed.blob.core.windows.net/dotnet-coreclr/index.json</TargetStaticFeed>
|
||||
<TargetStaticFeed Condition="'$(ArtifactsCategory.ToUpper())' == 'CORESDK'">https://dotnetfeed.blob.core.windows.net/dotnet-sdk/index.json</TargetStaticFeed>
|
||||
<TargetStaticFeed Condition="'$(ArtifactsCategory.ToUpper())' == 'TOOLSINTERNAL'">https://dotnetfeed.blob.core.windows.net/dotnet-tools-internal/index.json</TargetStaticFeed>
|
||||
<TargetStaticFeed Condition="'$(ArtifactsCategory.ToUpper())' == 'TOOLSET'">https://dotnetfeed.blob.core.windows.net/dotnet-toolset/index.json</TargetStaticFeed>
|
||||
<TargetStaticFeed Condition="'$(ArtifactsCategory.ToUpper())' == 'WINDOWSDESKTOP'">https://dotnetfeed.blob.core.windows.net/dotnet-windowsdesktop/index.json</TargetStaticFeed>
|
||||
<TargetStaticFeed Condition="'$(ArtifactsCategory.ToUpper())' == 'NUGETCLIENT'">https://dotnetfeed.blob.core.windows.net/nuget-nugetclient/index.json</TargetStaticFeed>
|
||||
<TargetStaticFeed Condition="'$(ArtifactsCategory.ToUpper())' == 'ASPNETENTITYFRAMEWORK6'">https://dotnetfeed.blob.core.windows.net/aspnet-entityframework6/index.json</TargetStaticFeed>
|
||||
<TargetStaticFeed Condition="'$(ArtifactsCategory.ToUpper())' == 'ASPNETBLAZOR'">https://dotnetfeed.blob.core.windows.net/aspnet-blazor/index.json</TargetStaticFeed>
|
||||
</PropertyGroup>
|
||||
|
||||
<Error
|
||||
Condition="'$(TargetStaticFeed)' == ''"
|
||||
Text="'$(ArtifactsCategory)' wasn't recognized as a valid artifact category. Valid categories are: '.NetCore' and '.NetCoreValidation'" />
|
||||
|
||||
<!-- Iterate publishing assets from each manifest file. -->
|
||||
<PushArtifactsInManifestToFeed
|
||||
ExpectedFeedUrl="$(TargetStaticFeed)"
|
||||
AccountKey="$(AccountKeyToStaticFeed)"
|
||||
BARBuildId="$(BARBuildId)"
|
||||
MaestroApiEndpoint="$(MaestroApiEndpoint)"
|
||||
BuildAssetRegistryToken="$(BuildAssetRegistryToken)"
|
||||
Overwrite="$(OverrideAssetsWithSameName)"
|
||||
PassIfExistingItemIdentical="$(PassIfExistingItemIdentical)"
|
||||
MaxClients="$(MaxParallelUploads)"
|
||||
UploadTimeoutInMinutes="$(MaxUploadTimeoutInMinutes)"
|
||||
AssetManifestPath="%(ManifestFiles.Identity)"
|
||||
BlobAssetsBasePath="$(BlobBasePath)"
|
||||
PackageAssetsBasePath="$(PackageBasePath)"/>
|
||||
</Target>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.DotNet.Build.Tasks.Feed" Version="$(MicrosoftDotNetBuildTasksFeedVersion)" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
@@ -1,84 +0,0 @@
|
||||
<!-- Licensed to the .NET Foundation under one or more agreements. The .NET Foundation licenses this file to you under the MIT license. See the LICENSE file in the project root for more information. -->
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<!--
|
||||
This MSBuild file is intended to be used as the body of the default
|
||||
publishing release pipeline. The release pipeline will use this file
|
||||
to invoke the PublishSymbols tasks to publish symbols to MSDL and SymWeb.
|
||||
|
||||
Parameters:
|
||||
|
||||
- PDBArtifactsDirectory : Full path to directory containing PDB files to be published.
|
||||
- BlobBasePath : Full path containing *.symbols.nupkg packages to be published.
|
||||
- DotNetSymbolServerTokenMsdl : PAT to access MSDL.
|
||||
- DotNetSymbolServerTokenSymWeb : PAT to access SymWeb.
|
||||
- DotNetSymbolExpirationInDays : Expiration days for published packages. Default is 3650.
|
||||
-->
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netcoreapp2.1</TargetFramework>
|
||||
</PropertyGroup>
|
||||
|
||||
<Import Project="$(NuGetPackageRoot)microsoft.symboluploader.build.task\$(SymbolUploaderVersion)\build\PublishSymbols.targets" />
|
||||
|
||||
<Target Name="PublishSymbols">
|
||||
<ItemGroup>
|
||||
<FilesToPublishToSymbolServer Include="$(PDBArtifactsDirectory)\*.pdb"/>
|
||||
<PackagesToPublishToSymbolServer Include="$(BlobBasePath)\*.symbols.nupkg"/>
|
||||
|
||||
<!--
|
||||
These packages from Arcade-Services include some native libraries that
|
||||
our current symbol uploader can't handle. Below is a workaround until
|
||||
we get issue: https://github.com/dotnet/arcade/issues/2457 sorted.
|
||||
-->
|
||||
<PackagesToPublishToSymbolServer Remove="$(BlobBasePath)\Microsoft.DotNet.Darc.*" />
|
||||
<PackagesToPublishToSymbolServer Remove="$(BlobBasePath)\Microsoft.DotNet.Maestro.Tasks.*" />
|
||||
</ItemGroup>
|
||||
|
||||
<PropertyGroup>
|
||||
<DotNetSymbolExpirationInDays Condition="'$(DotNetSymbolExpirationInDays)' == ''">3650</DotNetSymbolExpirationInDays>
|
||||
<PublishToSymbolServer>true</PublishToSymbolServer>
|
||||
<PublishToSymWeb Condition="'$(PublishToSymWeb)' == ''">true</PublishToSymWeb>
|
||||
<PublishToMSDL Condition="'$(PublishToMSDL)' == ''">true</PublishToMSDL>
|
||||
<PublishToSymbolServer Condition="'@(FilesToPublishToSymbolServer)' == '' and '@(PackagesToPublishToSymbolServer)' == ''">false</PublishToSymbolServer>
|
||||
</PropertyGroup>
|
||||
|
||||
<Message
|
||||
Importance="High"
|
||||
Text="No symbol package(s) were found to publish."
|
||||
Condition="$(PublishToSymbolServer) == false" />
|
||||
|
||||
<!-- Symbol Uploader: MSDL -->
|
||||
<Message Importance="High" Text="Publishing symbol packages to MSDL ..." Condition="$(PublishToSymbolServer)" />
|
||||
<PublishSymbols PackagesToPublish="@(PackagesToPublishToSymbolServer)"
|
||||
FilesToPublish="@(FilesToPublishToSymbolServer)"
|
||||
PersonalAccessToken="$(DotNetSymbolServerTokenMsdl)"
|
||||
SymbolServerPath="https://microsoftpublicsymbols.artifacts.visualstudio.com/DefaultCollection"
|
||||
ExpirationInDays="$(DotNetSymbolExpirationInDays)"
|
||||
VerboseLogging="true"
|
||||
DryRun="false"
|
||||
ConvertPortablePdbsToWindowsPdbs="false"
|
||||
PdbConversionTreatAsWarning=""
|
||||
Condition="$(PublishToSymbolServer) and $(PublishToMSDL)"/>
|
||||
|
||||
<!--
|
||||
Symbol Uploader: SymWeb
|
||||
Watson, VS insertion testings and the typical internal dev usage require SymWeb.
|
||||
Currently we need to call the task twice (https://github.com/dotnet/core-eng/issues/3489).
|
||||
-->
|
||||
<Message Importance="High" Text="Publishing symbol packages to SymWeb ..." Condition="$(PublishToSymbolServer)" />
|
||||
<PublishSymbols PackagesToPublish="@(PackagesToPublishToSymbolServer)"
|
||||
FilesToPublish="@(FilesToPublishToSymbolServer)"
|
||||
PersonalAccessToken="$(DotNetSymbolServerTokenSymWeb)"
|
||||
SymbolServerPath="https://microsoft.artifacts.visualstudio.com/DefaultCollection"
|
||||
ExpirationInDays="$(DotNetSymbolExpirationInDays)"
|
||||
VerboseLogging="true"
|
||||
DryRun="false"
|
||||
ConvertPortablePdbsToWindowsPdbs="false"
|
||||
PdbConversionTreatAsWarning=""
|
||||
Condition="$(PublishToSymbolServer) and $(PublishToSymWeb)"/>
|
||||
</Target>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.SymbolUploader.Build.Task" Version="$(SymbolUploaderVersion)" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
@@ -1,28 +0,0 @@
|
||||
# Don't touch this folder
|
||||
|
||||
uuuuuuuuuuuuuuuuuuuu
|
||||
u" uuuuuuuuuuuuuuuuuu "u
|
||||
u" u$$$$$$$$$$$$$$$$$$$$u "u
|
||||
u" u$$$$$$$$$$$$$$$$$$$$$$$$u "u
|
||||
u" u$$$$$$$$$$$$$$$$$$$$$$$$$$$$u "u
|
||||
u" u$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$u "u
|
||||
u" u$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$u "u
|
||||
$ $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ $
|
||||
$ $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ $
|
||||
$ $$$" ... "$... ...$" ... "$$$ ... "$$$ $
|
||||
$ $$$u `"$$$$$$$ $$$ $$$$$ $$ $$$ $$$ $
|
||||
$ $$$$$$uu "$$$$ $$$ $$$$$ $$ """ u$$$ $
|
||||
$ $$$""$$$ $$$$ $$$u "$$$" u$$ $$$$$$$$ $
|
||||
$ $$$$....,$$$$$..$$$$$....,$$$$..$$$$$$$$ $
|
||||
$ $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ $
|
||||
"u "$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$" u"
|
||||
"u "$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$" u"
|
||||
"u "$$$$$$$$$$$$$$$$$$$$$$$$$$$$" u"
|
||||
"u "$$$$$$$$$$$$$$$$$$$$$$$$" u"
|
||||
"u "$$$$$$$$$$$$$$$$$$$$" u"
|
||||
"u """""""""""""""""" u"
|
||||
""""""""""""""""""""
|
||||
|
||||
!!! Changes made in this directory are subject to being overwritten by automation !!!
|
||||
|
||||
The files in this directory are shared by all Arcade repos and managed by automation. If you need to make changes to these files, open an issue or submit a pull request to https://github.com/dotnet/arcade first.
|
||||
@@ -1,127 +0,0 @@
|
||||
# This file is a temporary workaround for internal builds to be able to restore from private AzDO feeds.
|
||||
# This file should be removed as part of this issue: https://github.com/dotnet/arcade/issues/4080
|
||||
#
|
||||
# What the script does is iterate over all package sources in the pointed NuGet.config and add a credential entry
|
||||
# under <packageSourceCredentials> for each Maestro managed private feed. Two additional credential
|
||||
# entries are also added for the two private static internal feeds: dotnet3-internal and dotnet3-internal-transport.
|
||||
#
|
||||
# This script needs to be called in every job that will restore packages and which the base repo has
|
||||
# private AzDO feeds in the NuGet.config.
|
||||
#
|
||||
# See example YAML call for this script below. Note the use of the variable `$(dn-bot-dnceng-artifact-feeds-rw)`
|
||||
# from the AzureDevOps-Artifact-Feeds-Pats variable group.
|
||||
#
|
||||
# - task: PowerShell@2
|
||||
# displayName: Setup Private Feeds Credentials
|
||||
# condition: eq(variables['Agent.OS'], 'Windows_NT')
|
||||
# inputs:
|
||||
# filePath: $(Build.SourcesDirectory)/eng/common/SetupNugetSources.ps1
|
||||
# arguments: -ConfigFile ${Env:BUILD_SOURCESDIRECTORY}/NuGet.config -Password $Env:Token
|
||||
# env:
|
||||
# Token: $(dn-bot-dnceng-artifact-feeds-rw)
|
||||
|
||||
[CmdletBinding()]
|
||||
param (
|
||||
[Parameter(Mandatory = $true)][string]$ConfigFile,
|
||||
[Parameter(Mandatory = $true)][string]$Password
|
||||
)
|
||||
|
||||
$ErrorActionPreference = "Stop"
|
||||
Set-StrictMode -Version 2.0
|
||||
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
|
||||
|
||||
. $PSScriptRoot\tools.ps1
|
||||
|
||||
# Add source entry to PackageSources
|
||||
function AddPackageSource($sources, $SourceName, $SourceEndPoint, $creds, $Username, $Password) {
|
||||
$packageSource = $sources.SelectSingleNode("add[@key='$SourceName']")
|
||||
|
||||
if ($packageSource -eq $null)
|
||||
{
|
||||
$packageSource = $doc.CreateElement("add")
|
||||
$packageSource.SetAttribute("key", $SourceName)
|
||||
$packageSource.SetAttribute("value", $SourceEndPoint)
|
||||
$sources.AppendChild($packageSource) | Out-Null
|
||||
}
|
||||
else {
|
||||
Write-Host "Package source $SourceName already present."
|
||||
}
|
||||
|
||||
AddCredential -Creds $creds -Source $SourceName -Username $Username -Password $Password
|
||||
}
|
||||
|
||||
# Add a credential node for the specified source
|
||||
function AddCredential($creds, $source, $username, $password) {
|
||||
# Looks for credential configuration for the given SourceName. Create it if none is found.
|
||||
$sourceElement = $creds.SelectSingleNode($Source)
|
||||
if ($sourceElement -eq $null)
|
||||
{
|
||||
$sourceElement = $doc.CreateElement($Source)
|
||||
$creds.AppendChild($sourceElement) | Out-Null
|
||||
}
|
||||
|
||||
# Add the <Username> node to the credential if none is found.
|
||||
$usernameElement = $sourceElement.SelectSingleNode("add[@key='Username']")
|
||||
if ($usernameElement -eq $null)
|
||||
{
|
||||
$usernameElement = $doc.CreateElement("add")
|
||||
$usernameElement.SetAttribute("key", "Username")
|
||||
$sourceElement.AppendChild($usernameElement) | Out-Null
|
||||
}
|
||||
$usernameElement.SetAttribute("value", $Username)
|
||||
|
||||
# Add the <ClearTextPassword> to the credential if none is found.
|
||||
# Add it as a clear text because there is no support for encrypted ones in non-windows .Net SDKs.
|
||||
# -> https://github.com/NuGet/Home/issues/5526
|
||||
$passwordElement = $sourceElement.SelectSingleNode("add[@key='ClearTextPassword']")
|
||||
if ($passwordElement -eq $null)
|
||||
{
|
||||
$passwordElement = $doc.CreateElement("add")
|
||||
$passwordElement.SetAttribute("key", "ClearTextPassword")
|
||||
$sourceElement.AppendChild($passwordElement) | Out-Null
|
||||
}
|
||||
$passwordElement.SetAttribute("value", $Password)
|
||||
}
|
||||
|
||||
function InsertMaestroPrivateFeedCredentials($Sources, $Creds, $Password) {
|
||||
$maestroPrivateSources = $Sources.SelectNodes("add[contains(@key,'darc-int')]")
|
||||
|
||||
Write-Host "Inserting credentials for $($maestroPrivateSources.Count) Maestro's private feeds."
|
||||
|
||||
ForEach ($PackageSource in $maestroPrivateSources) {
|
||||
Write-Host "`tInserting credential for Maestro's feed:" $PackageSource.Key
|
||||
AddCredential -Creds $creds -Source $PackageSource.Key -Username $Username -Password $Password
|
||||
}
|
||||
}
|
||||
|
||||
if (!(Test-Path $ConfigFile -PathType Leaf)) {
|
||||
Write-Host "Couldn't find the file NuGet config file: $ConfigFile"
|
||||
ExitWithExitCode 1
|
||||
}
|
||||
|
||||
# Load NuGet.config
|
||||
$doc = New-Object System.Xml.XmlDocument
|
||||
$filename = (Get-Item $ConfigFile).FullName
|
||||
$doc.Load($filename)
|
||||
|
||||
# Get reference to <PackageSources> or create one if none exist already
|
||||
$sources = $doc.DocumentElement.SelectSingleNode("packageSources")
|
||||
if ($sources -eq $null) {
|
||||
$sources = $doc.CreateElement("packageSources")
|
||||
$doc.DocumentElement.AppendChild($sources) | Out-Null
|
||||
}
|
||||
|
||||
# Looks for a <PackageSourceCredentials> node. Create it if none is found.
|
||||
$creds = $doc.DocumentElement.SelectSingleNode("packageSourceCredentials")
|
||||
if ($creds -eq $null) {
|
||||
$creds = $doc.CreateElement("packageSourceCredentials")
|
||||
$doc.DocumentElement.AppendChild($creds) | Out-Null
|
||||
}
|
||||
|
||||
# Insert credential nodes for Maestro's private feeds
|
||||
InsertMaestroPrivateFeedCredentials -Sources $sources -Creds $creds -Password $Password
|
||||
|
||||
AddPackageSource -Sources $sources -SourceName "dotnet3-internal" -SourceEndPoint "https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3-internal/nuget/v2" -Creds $creds -Username "dn-bot" -Password $Password
|
||||
AddPackageSource -Sources $sources -SourceName "dotnet3-internal-transport" -SourceEndPoint "https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3-internal-transport/nuget/v2" -Creds $creds -Username "dn-bot" -Password $Password
|
||||
|
||||
$doc.Save($filename)
|
||||
@@ -1,117 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# This file is a temporary workaround for internal builds to be able to restore from private AzDO feeds.
|
||||
# This file should be removed as part of this issue: https://github.com/dotnet/arcade/issues/4080
|
||||
#
|
||||
# What the script does is iterate over all package sources in the pointed NuGet.config and add a credential entry
|
||||
# under <packageSourceCredentials> for each Maestro's managed private feed. Two additional credential
|
||||
# entries are also added for the two private static internal feeds: dotnet3-internal and dotnet3-internal-transport.
|
||||
#
|
||||
# This script needs to be called in every job that will restore packages and which the base repo has
|
||||
# private AzDO feeds in the NuGet.config.
|
||||
#
|
||||
# See example YAML call for this script below. Note the use of the variable `$(dn-bot-dnceng-artifact-feeds-rw)`
|
||||
# from the AzureDevOps-Artifact-Feeds-Pats variable group.
|
||||
#
|
||||
# - task: Bash@3
|
||||
# displayName: Setup Private Feeds Credentials
|
||||
# inputs:
|
||||
# filePath: $(Build.SourcesDirectory)/eng/common/SetupNugetSources.sh
|
||||
# arguments: $BUILD_SOURCESDIRECTORY/NuGet.config $Token
|
||||
# condition: ne(variables['Agent.OS'], 'Windows_NT')
|
||||
# env:
|
||||
# Token: $(dn-bot-dnceng-artifact-feeds-rw)
|
||||
|
||||
ConfigFile=$1
|
||||
CredToken=$2
|
||||
NL='\n'
|
||||
TB=' '
|
||||
|
||||
source="${BASH_SOURCE[0]}"
|
||||
|
||||
# resolve $source until the file is no longer a symlink
|
||||
while [[ -h "$source" ]]; do
|
||||
scriptroot="$( cd -P "$( dirname "$source" )" && pwd )"
|
||||
source="$(readlink "$source")"
|
||||
# if $source was a relative symlink, we need to resolve it relative to the path where the
|
||||
# symlink file was located
|
||||
[[ $source != /* ]] && source="$scriptroot/$source"
|
||||
done
|
||||
scriptroot="$( cd -P "$( dirname "$source" )" && pwd )"
|
||||
|
||||
. "$scriptroot/tools.sh"
|
||||
|
||||
if [ ! -f "$ConfigFile" ]; then
|
||||
echo "Couldn't find the file NuGet config file: $ConfigFile"
|
||||
ExitWithExitCode 1
|
||||
fi
|
||||
|
||||
if [[ `uname -s` == "Darwin" ]]; then
|
||||
NL=$'\\\n'
|
||||
TB=''
|
||||
fi
|
||||
|
||||
# Ensure there is a <packageSources>...</packageSources> section.
|
||||
grep -i "<packageSources>" $ConfigFile
|
||||
if [ "$?" != "0" ]; then
|
||||
echo "Adding <packageSources>...</packageSources> section."
|
||||
ConfigNodeHeader="<configuration>"
|
||||
PackageSourcesTemplate="${TB}<packageSources>${NL}${TB}</packageSources>"
|
||||
|
||||
sed -i.bak "s|$ConfigNodeHeader|$ConfigNodeHeader${NL}$PackageSourcesTemplate|" NuGet.config
|
||||
fi
|
||||
|
||||
# Ensure there is a <packageSourceCredentials>...</packageSourceCredentials> section.
|
||||
grep -i "<packageSourceCredentials>" $ConfigFile
|
||||
if [ "$?" != "0" ]; then
|
||||
echo "Adding <packageSourceCredentials>...</packageSourceCredentials> section."
|
||||
|
||||
PackageSourcesNodeFooter="</packageSources>"
|
||||
PackageSourceCredentialsTemplate="${TB}<packageSourceCredentials>${NL}${TB}</packageSourceCredentials>"
|
||||
|
||||
sed -i.bak "s|$PackageSourcesNodeFooter|$PackageSourcesNodeFooter${NL}$PackageSourceCredentialsTemplate|" NuGet.config
|
||||
fi
|
||||
|
||||
# Ensure dotnet3-internal and dotnet3-internal-transport is in the packageSources
|
||||
grep -i "<add key=\"dotnet3-internal\">" $ConfigFile
|
||||
if [ "$?" != "0" ]; then
|
||||
echo "Adding dotnet3-internal to the packageSources."
|
||||
|
||||
PackageSourcesNodeFooter="</packageSources>"
|
||||
PackageSourceTemplate="${TB}<add key=\"dotnet3-internal\" value=\"https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3-internal/nuget/v2\" />"
|
||||
|
||||
sed -i.bak "s|$PackageSourcesNodeFooter|$PackageSourceTemplate${NL}$PackageSourcesNodeFooter|" NuGet.config
|
||||
fi
|
||||
|
||||
# Ensure dotnet3-internal and dotnet3-internal-transport is in the packageSources
|
||||
grep -i "<add key=\"dotnet3-internal-transport\">" $ConfigFile
|
||||
if [ "$?" != "0" ]; then
|
||||
echo "Adding dotnet3-internal-transport to the packageSources."
|
||||
|
||||
PackageSourcesNodeFooter="</packageSources>"
|
||||
PackageSourceTemplate="${TB}<add key=\"dotnet3-internal-transport\" value=\"https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3-internal-transport/nuget/v2\" />"
|
||||
|
||||
sed -i.bak "s|$PackageSourcesNodeFooter|$PackageSourceTemplate${NL}$PackageSourcesNodeFooter|" NuGet.config
|
||||
fi
|
||||
|
||||
# I want things split line by line
|
||||
PrevIFS=$IFS
|
||||
IFS=$'\n'
|
||||
PackageSources=$(grep -oh '"darc-int-[^"]*"' $ConfigFile | tr -d '"')
|
||||
IFS=$PrevIFS
|
||||
|
||||
PackageSources+=('dotnet3-internal')
|
||||
PackageSources+=('dotnet3-internal-transport')
|
||||
|
||||
for FeedName in ${PackageSources[@]} ; do
|
||||
# Check if there is no existing credential for this FeedName
|
||||
grep -i "<$FeedName>" $ConfigFile
|
||||
if [ "$?" != "0" ]; then
|
||||
echo "Adding credentials for $FeedName."
|
||||
|
||||
PackageSourceCredentialsNodeFooter="</packageSourceCredentials>"
|
||||
NewCredential="${TB}${TB}<$FeedName>${NL}<add key=\"Username\" value=\"dn-bot\" />${NL}<add key=\"ClearTextPassword\" value=\"$CredToken\" />${NL}</$FeedName>"
|
||||
|
||||
sed -i.bak "s|$PackageSourceCredentialsNodeFooter|$NewCredential${NL}$PackageSourceCredentialsNodeFooter|" NuGet.config
|
||||
fi
|
||||
done
|
||||
@@ -1,83 +0,0 @@
|
||||
<!-- Licensed to the .NET Foundation under one or more agreements. The .NET Foundation licenses this file to you under the MIT license. See the LICENSE file in the project root for more information. -->
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<!--
|
||||
This MSBuild file is intended to be used as the body of the default
|
||||
publishing release pipeline. The release pipeline will use this file
|
||||
to invoke the SignCheck tool to validate that packages about to
|
||||
be published are correctly signed.
|
||||
|
||||
Parameters:
|
||||
|
||||
- PackageBasePath : Directory containing all files that need to be validated.
|
||||
- SignCheckVersion : Version of SignCheck package to be used.
|
||||
- SignValidationExclusionList : ItemGroup containing exclusion list to be forwarded to SignCheck.
|
||||
- EnableJarSigningCheck : Whether .jar files should be validated.
|
||||
- EnableStrongNameCheck : Whether strong name check should be performed.
|
||||
-->
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netcoreapp2.1</TargetFramework>
|
||||
</PropertyGroup>
|
||||
|
||||
<!--
|
||||
From 'Signing.props' we import $(SignValidationExclusionList)
|
||||
-->
|
||||
<Import Project="$(MSBuildThisFileDirectory)Signing.props" Condition="Exists('$(MSBuildThisFileDirectory)Signing.props')" />
|
||||
|
||||
<Target Name="ValidateSigning">
|
||||
<PropertyGroup>
|
||||
<SignCheckToolPath>$(NuGetPackageRoot)Microsoft.DotNet.SignCheck\$(SignCheckVersion)\tools\Microsoft.DotNet.SignCheck.exe</SignCheckToolPath>
|
||||
|
||||
<SignCheckInputDir>$(PackageBasePath)</SignCheckInputDir>
|
||||
<SignCheckLog>signcheck.log</SignCheckLog>
|
||||
<SignCheckErrorLog>signcheck.errors.log</SignCheckErrorLog>
|
||||
<SignCheckExclusionsFile>signcheck.exclusions.txt</SignCheckExclusionsFile>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<!--
|
||||
Documentation for these arguments is available here:
|
||||
https://github.com/dotnet/arcade/tree/master/src/SignCheck
|
||||
-->
|
||||
<SignCheckArgs Include="--recursive" />
|
||||
<SignCheckArgs Include="--traverse-subfolders" />
|
||||
<SignCheckArgs Include="--file-status AllFiles" />
|
||||
<SignCheckArgs Include="--log-file $(SignCheckLog)" />
|
||||
<SignCheckArgs Include="--error-log-file $(SignCheckErrorLog)" />
|
||||
<SignCheckArgs Include="--input-files $(SignCheckInputDir)" />
|
||||
|
||||
<SignCheckArgs Include="--exclusions-file $(SignCheckExclusionsFile)" Condition="'@(SignValidationExclusionList)' != ''" />
|
||||
<SignCheckArgs Include="--verify-jar" Condition="'$(EnableJarSigningCheck)' == 'true'" />
|
||||
<SignCheckArgs Include="--verify-strongname" Condition="'$(EnableStrongNameCheck)' == 'true'" />
|
||||
</ItemGroup>
|
||||
|
||||
<WriteLinesToFile
|
||||
File="$(SignCheckExclusionsFile)"
|
||||
Lines="@(SignValidationExclusionList)"
|
||||
Condition="'@(SignValidationExclusionList)' != ''"
|
||||
Overwrite="true"
|
||||
Encoding="Unicode"/>
|
||||
|
||||
<!--
|
||||
IgnoreExitCode='true' because the tool doesn't return '0' on success.
|
||||
-->
|
||||
<Exec
|
||||
Command=""$(SignCheckToolPath)" @(SignCheckArgs, ' ')"
|
||||
IgnoreExitCode='true'
|
||||
ConsoleToMsBuild="false"
|
||||
StandardErrorImportance="high" />
|
||||
|
||||
<Error
|
||||
Text="Signing validation failed. Check $(SignCheckErrorLog) for more information."
|
||||
Condition="Exists($(SignCheckErrorLog)) and '$([System.IO.File]::ReadAllText($(SignCheckErrorLog)))' != ''" />
|
||||
|
||||
<Message
|
||||
Text="##vso[artifact.upload containerfolder=LogFiles;artifactname=LogFiles]{SignCheckErrorLog}"
|
||||
Condition="Exists($(SignCheckErrorLog)) and '$([System.IO.File]::ReadAllText($(SignCheckErrorLog)))' != ''" />
|
||||
|
||||
</Target>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.DotNet.SignCheck" Version="$(SignCheckVersion)" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
@@ -1,184 +0,0 @@
|
||||
param(
|
||||
[Parameter(Mandatory=$true)][string] $InputPath, # Full path to directory where Symbols.NuGet packages to be checked are stored
|
||||
[Parameter(Mandatory=$true)][string] $ExtractPath, # Full path to directory where the packages will be extracted during validation
|
||||
[Parameter(Mandatory=$true)][string] $SourceLinkToolPath, # Full path to directory where dotnet SourceLink CLI was installed
|
||||
[Parameter(Mandatory=$true)][string] $GHRepoName, # GitHub name of the repo including the Org. E.g., dotnet/arcade
|
||||
[Parameter(Mandatory=$true)][string] $GHCommit # GitHub commit SHA used to build the packages
|
||||
)
|
||||
|
||||
# Cache/HashMap (File -> Exist flag) used to consult whether a file exist
|
||||
# in the repository at a specific commit point. This is populated by inserting
|
||||
# all files present in the repo at a specific commit point.
|
||||
$global:RepoFiles = @{}
|
||||
|
||||
$ValidatePackage = {
|
||||
param(
|
||||
[string] $PackagePath # Full path to a Symbols.NuGet package
|
||||
)
|
||||
|
||||
# Ensure input file exist
|
||||
if (!(Test-Path $PackagePath)) {
|
||||
throw "Input file does not exist: $PackagePath"
|
||||
}
|
||||
|
||||
# Extensions for which we'll look for SourceLink information
|
||||
# For now we'll only care about Portable & Embedded PDBs
|
||||
$RelevantExtensions = @(".dll", ".exe", ".pdb")
|
||||
|
||||
Write-Host -NoNewLine "Validating" ([System.IO.Path]::GetFileName($PackagePath)) "... "
|
||||
|
||||
$PackageId = [System.IO.Path]::GetFileNameWithoutExtension($PackagePath)
|
||||
$ExtractPath = Join-Path -Path $using:ExtractPath -ChildPath $PackageId
|
||||
$FailedFiles = 0
|
||||
|
||||
Add-Type -AssemblyName System.IO.Compression.FileSystem
|
||||
|
||||
[System.IO.Directory]::CreateDirectory($ExtractPath);
|
||||
|
||||
$zip = [System.IO.Compression.ZipFile]::OpenRead($PackagePath)
|
||||
|
||||
$zip.Entries |
|
||||
Where-Object {$RelevantExtensions -contains [System.IO.Path]::GetExtension($_.Name)} |
|
||||
ForEach-Object {
|
||||
$FileName = $_.FullName
|
||||
$Extension = [System.IO.Path]::GetExtension($_.Name)
|
||||
$FakeName = -Join((New-Guid), $Extension)
|
||||
$TargetFile = Join-Path -Path $ExtractPath -ChildPath $FakeName
|
||||
|
||||
# We ignore resource DLLs
|
||||
if ($FileName.EndsWith(".resources.dll")) {
|
||||
return
|
||||
}
|
||||
|
||||
[System.IO.Compression.ZipFileExtensions]::ExtractToFile($_, $TargetFile, $true)
|
||||
|
||||
$ValidateFile = {
|
||||
param(
|
||||
[string] $FullPath, # Full path to the module that has to be checked
|
||||
[string] $RealPath,
|
||||
[ref] $FailedFiles
|
||||
)
|
||||
|
||||
# Makes easier to reference `sourcelink cli`
|
||||
Push-Location $using:SourceLinkToolPath
|
||||
|
||||
$SourceLinkInfos = .\sourcelink.exe print-urls $FullPath | Out-String
|
||||
|
||||
if ($LASTEXITCODE -eq 0 -and -not ([string]::IsNullOrEmpty($SourceLinkInfos))) {
|
||||
$NumFailedLinks = 0
|
||||
|
||||
# We only care about Http addresses
|
||||
$Matches = (Select-String '(http[s]?)(:\/\/)([^\s,]+)' -Input $SourceLinkInfos -AllMatches).Matches
|
||||
|
||||
if ($Matches.Count -ne 0) {
|
||||
$Matches.Value |
|
||||
ForEach-Object {
|
||||
$Link = $_
|
||||
$CommitUrl = -Join("https://raw.githubusercontent.com/", $using:GHRepoName, "/", $using:GHCommit, "/")
|
||||
$FilePath = $Link.Replace($CommitUrl, "")
|
||||
$Status = 200
|
||||
$Cache = $using:RepoFiles
|
||||
|
||||
if ( !($Cache.ContainsKey($FilePath)) ) {
|
||||
try {
|
||||
$Uri = $Link -as [System.URI]
|
||||
|
||||
# Only GitHub links are valid
|
||||
if ($Uri.AbsoluteURI -ne $null -and $Uri.Host -match "github") {
|
||||
$Status = (Invoke-WebRequest -Uri $Link -UseBasicParsing -Method HEAD -TimeoutSec 5).StatusCode
|
||||
}
|
||||
else {
|
||||
$Status = 0
|
||||
}
|
||||
}
|
||||
catch {
|
||||
$Status = 0
|
||||
}
|
||||
}
|
||||
|
||||
if ($Status -ne 200) {
|
||||
if ($NumFailedLinks -eq 0) {
|
||||
if ($FailedFiles.Value -eq 0) {
|
||||
Write-Host
|
||||
}
|
||||
|
||||
Write-Host "`tFile $RealPath has broken links:"
|
||||
}
|
||||
|
||||
Write-Host "`t`tFailed to retrieve $Link"
|
||||
|
||||
$NumFailedLinks++
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ($NumFailedLinks -ne 0) {
|
||||
$FailedFiles.value++
|
||||
$global:LASTEXITCODE = 1
|
||||
}
|
||||
}
|
||||
|
||||
Pop-Location
|
||||
}
|
||||
|
||||
&$ValidateFile $TargetFile $FileName ([ref]$FailedFiles)
|
||||
}
|
||||
|
||||
$zip.Dispose()
|
||||
|
||||
if ($FailedFiles -eq 0) {
|
||||
Write-Host "Passed."
|
||||
}
|
||||
}
|
||||
|
||||
function ValidateSourceLinkLinks {
|
||||
if (!($GHRepoName -Match "^[^\s\/]+/[^\s\/]+$")) {
|
||||
Write-Host "GHRepoName should be in the format <org>/<repo>"
|
||||
$global:LASTEXITCODE = 1
|
||||
return
|
||||
}
|
||||
|
||||
if (!($GHCommit -Match "^[0-9a-fA-F]{40}$")) {
|
||||
Write-Host "GHCommit should be a 40 chars hexadecimal string"
|
||||
$global:LASTEXITCODE = 1
|
||||
return
|
||||
}
|
||||
|
||||
$RepoTreeURL = -Join("https://api.github.com/repos/", $GHRepoName, "/git/trees/", $GHCommit, "?recursive=1")
|
||||
$CodeExtensions = @(".cs", ".vb", ".fs", ".fsi", ".fsx", ".fsscript")
|
||||
|
||||
try {
|
||||
# Retrieve the list of files in the repo at that particular commit point and store them in the RepoFiles hash
|
||||
$Data = Invoke-WebRequest $RepoTreeURL | ConvertFrom-Json | Select-Object -ExpandProperty tree
|
||||
|
||||
foreach ($file in $Data) {
|
||||
$Extension = [System.IO.Path]::GetExtension($file.path)
|
||||
|
||||
if ($CodeExtensions.Contains($Extension)) {
|
||||
$RepoFiles[$file.path] = 1
|
||||
}
|
||||
}
|
||||
}
|
||||
catch {
|
||||
Write-Host "Problems downloading the list of files from the repo. Url used: $RepoTreeURL"
|
||||
$global:LASTEXITCODE = 1
|
||||
return
|
||||
}
|
||||
|
||||
if (Test-Path $ExtractPath) {
|
||||
Remove-Item $ExtractPath -Force -Recurse -ErrorAction SilentlyContinue
|
||||
}
|
||||
|
||||
# Process each NuGet package in parallel
|
||||
$Jobs = @()
|
||||
Get-ChildItem "$InputPath\*.symbols.nupkg" |
|
||||
ForEach-Object {
|
||||
$Jobs += Start-Job -ScriptBlock $ValidatePackage -ArgumentList $_.FullName
|
||||
}
|
||||
|
||||
foreach ($Job in $Jobs) {
|
||||
Wait-Job -Id $Job.Id | Receive-Job
|
||||
}
|
||||
}
|
||||
|
||||
Measure-Command { ValidateSourceLinkLinks }
|
||||
@@ -1,148 +0,0 @@
|
||||
[CmdletBinding(PositionalBinding=$false)]
|
||||
Param(
|
||||
[string][Alias('c')]$configuration = "Debug",
|
||||
[string]$platform = $null,
|
||||
[string] $projects,
|
||||
[string][Alias('v')]$verbosity = "minimal",
|
||||
[string] $msbuildEngine = $null,
|
||||
[bool] $warnAsError = $true,
|
||||
[bool] $nodeReuse = $true,
|
||||
[switch][Alias('r')]$restore,
|
||||
[switch] $deployDeps,
|
||||
[switch][Alias('b')]$build,
|
||||
[switch] $rebuild,
|
||||
[switch] $deploy,
|
||||
[switch][Alias('t')]$test,
|
||||
[switch] $integrationTest,
|
||||
[switch] $performanceTest,
|
||||
[switch] $sign,
|
||||
[switch] $pack,
|
||||
[switch] $publish,
|
||||
[switch] $clean,
|
||||
[switch][Alias('bl')]$binaryLog,
|
||||
[switch] $ci,
|
||||
[switch] $prepareMachine,
|
||||
[switch] $help,
|
||||
[Parameter(ValueFromRemainingArguments=$true)][String[]]$properties
|
||||
)
|
||||
|
||||
. $PSScriptRoot\tools.ps1
|
||||
|
||||
function Print-Usage() {
|
||||
Write-Host "Common settings:"
|
||||
Write-Host " -configuration <value> Build configuration: 'Debug' or 'Release' (short: -c)"
|
||||
Write-Host " -platform <value> Platform configuration: 'x86', 'x64' or any valid Platform value to pass to msbuild"
|
||||
Write-Host " -verbosity <value> Msbuild verbosity: q[uiet], m[inimal], n[ormal], d[etailed], and diag[nostic] (short: -v)"
|
||||
Write-Host " -binaryLog Output binary log (short: -bl)"
|
||||
Write-Host " -help Print help and exit"
|
||||
Write-Host ""
|
||||
|
||||
Write-Host "Actions:"
|
||||
Write-Host " -restore Restore dependencies (short: -r)"
|
||||
Write-Host " -build Build solution (short: -b)"
|
||||
Write-Host " -rebuild Rebuild solution"
|
||||
Write-Host " -deploy Deploy built VSIXes"
|
||||
Write-Host " -deployDeps Deploy dependencies (e.g. VSIXes for integration tests)"
|
||||
Write-Host " -test Run all unit tests in the solution (short: -t)"
|
||||
Write-Host " -integrationTest Run all integration tests in the solution"
|
||||
Write-Host " -performanceTest Run all performance tests in the solution"
|
||||
Write-Host " -pack Package build outputs into NuGet packages and Willow components"
|
||||
Write-Host " -sign Sign build outputs"
|
||||
Write-Host " -publish Publish artifacts (e.g. symbols)"
|
||||
Write-Host " -clean Clean the solution"
|
||||
Write-Host ""
|
||||
|
||||
Write-Host "Advanced settings:"
|
||||
Write-Host " -projects <value> Semi-colon delimited list of sln/proj's to build. Globbing is supported (*.sln)"
|
||||
Write-Host " -ci Set when running on CI server"
|
||||
Write-Host " -prepareMachine Prepare machine for CI run, clean up processes after build"
|
||||
Write-Host " -warnAsError <value> Sets warnaserror msbuild parameter ('true' or 'false')"
|
||||
Write-Host " -msbuildEngine <value> Msbuild engine to use to run build ('dotnet', 'vs', or unspecified)."
|
||||
Write-Host ""
|
||||
|
||||
Write-Host "Command line arguments not listed above are passed thru to msbuild."
|
||||
Write-Host "The above arguments can be shortened as much as to be unambiguous (e.g. -co for configuration, -t for test, etc.)."
|
||||
}
|
||||
|
||||
function InitializeCustomToolset {
|
||||
if (-not $restore) {
|
||||
return
|
||||
}
|
||||
|
||||
$script = Join-Path $EngRoot "restore-toolset.ps1"
|
||||
|
||||
if (Test-Path $script) {
|
||||
. $script
|
||||
}
|
||||
}
|
||||
|
||||
function Build {
|
||||
$toolsetBuildProj = InitializeToolset
|
||||
InitializeCustomToolset
|
||||
|
||||
$bl = if ($binaryLog) { "/bl:" + (Join-Path $LogDir "Build.binlog") } else { "" }
|
||||
$platformArg = if ($platform) { "/p:Platform=$platform" } else { "" }
|
||||
|
||||
if ($projects) {
|
||||
# Re-assign properties to a new variable because PowerShell doesn't let us append properties directly for unclear reasons.
|
||||
# Explicitly set the type as string[] because otherwise PowerShell would make this char[] if $properties is empty.
|
||||
[string[]] $msbuildArgs = $properties
|
||||
|
||||
# Resolve relative project paths into full paths
|
||||
$projects = ($projects.Split(';').ForEach({Resolve-Path $_}) -join ';')
|
||||
|
||||
$msbuildArgs += "/p:Projects=$projects"
|
||||
$properties = $msbuildArgs
|
||||
}
|
||||
|
||||
MSBuild $toolsetBuildProj `
|
||||
$bl `
|
||||
$platformArg `
|
||||
/p:Configuration=$configuration `
|
||||
/p:RepoRoot=$RepoRoot `
|
||||
/p:Restore=$restore `
|
||||
/p:DeployDeps=$deployDeps `
|
||||
/p:Build=$build `
|
||||
/p:Rebuild=$rebuild `
|
||||
/p:Deploy=$deploy `
|
||||
/p:Test=$test `
|
||||
/p:Pack=$pack `
|
||||
/p:IntegrationTest=$integrationTest `
|
||||
/p:PerformanceTest=$performanceTest `
|
||||
/p:Sign=$sign `
|
||||
/p:Publish=$publish `
|
||||
@properties
|
||||
}
|
||||
|
||||
if ($clean) {
|
||||
if(Test-Path $ArtifactsDir) {
|
||||
Remove-Item -Recurse -Force $ArtifactsDir
|
||||
Write-Host "Artifacts directory deleted."
|
||||
}
|
||||
exit 0
|
||||
}
|
||||
|
||||
try {
|
||||
if ($help -or (($null -ne $properties) -and ($properties.Contains("/help") -or $properties.Contains("/?")))) {
|
||||
Print-Usage
|
||||
exit 0
|
||||
}
|
||||
|
||||
if ($ci) {
|
||||
$binaryLog = $true
|
||||
$nodeReuse = $false
|
||||
}
|
||||
|
||||
if ($restore) {
|
||||
InitializeNativeTools
|
||||
}
|
||||
|
||||
Build
|
||||
}
|
||||
catch {
|
||||
Write-Host $_.ScriptStackTrace
|
||||
Write-PipelineTelemetryError -Category "InitializeToolset" -Message $_
|
||||
ExitWithExitCode 1
|
||||
}
|
||||
|
||||
ExitWithExitCode 0
|
||||
@@ -1,216 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Stop script if unbound variable found (use ${var:-} if intentional)
|
||||
set -u
|
||||
|
||||
# Stop script if command returns non-zero exit code.
|
||||
# Prevents hidden errors caused by missing error code propagation.
|
||||
set -e
|
||||
|
||||
usage()
|
||||
{
|
||||
echo "Common settings:"
|
||||
echo " --configuration <value> Build configuration: 'Debug' or 'Release' (short: -c)"
|
||||
echo " --verbosity <value> Msbuild verbosity: q[uiet], m[inimal], n[ormal], d[etailed], and diag[nostic] (short: -v)"
|
||||
echo " --binaryLog Create MSBuild binary log (short: -bl)"
|
||||
echo " --help Print help and exit (short: -h)"
|
||||
echo ""
|
||||
|
||||
echo "Actions:"
|
||||
echo " --restore Restore dependencies (short: -r)"
|
||||
echo " --build Build solution (short: -b)"
|
||||
echo " --rebuild Rebuild solution"
|
||||
echo " --test Run all unit tests in the solution (short: -t)"
|
||||
echo " --integrationTest Run all integration tests in the solution"
|
||||
echo " --performanceTest Run all performance tests in the solution"
|
||||
echo " --pack Package build outputs into NuGet packages and Willow components"
|
||||
echo " --sign Sign build outputs"
|
||||
echo " --publish Publish artifacts (e.g. symbols)"
|
||||
echo " --clean Clean the solution"
|
||||
echo ""
|
||||
|
||||
echo "Advanced settings:"
|
||||
echo " --projects <value> Project or solution file(s) to build"
|
||||
echo " --ci Set when running on CI server"
|
||||
echo " --prepareMachine Prepare machine for CI run, clean up processes after build"
|
||||
echo " --nodeReuse <value> Sets nodereuse msbuild parameter ('true' or 'false')"
|
||||
echo " --warnAsError <value> Sets warnaserror msbuild parameter ('true' or 'false')"
|
||||
echo ""
|
||||
echo "Command line arguments not listed above are passed thru to msbuild."
|
||||
echo "Arguments can also be passed in with a single hyphen."
|
||||
}
|
||||
|
||||
source="${BASH_SOURCE[0]}"
|
||||
|
||||
# resolve $source until the file is no longer a symlink
|
||||
while [[ -h "$source" ]]; do
|
||||
scriptroot="$( cd -P "$( dirname "$source" )" && pwd )"
|
||||
source="$(readlink "$source")"
|
||||
# if $source was a relative symlink, we need to resolve it relative to the path where the
|
||||
# symlink file was located
|
||||
[[ $source != /* ]] && source="$scriptroot/$source"
|
||||
done
|
||||
scriptroot="$( cd -P "$( dirname "$source" )" && pwd )"
|
||||
|
||||
restore=false
|
||||
build=false
|
||||
rebuild=false
|
||||
test=false
|
||||
integration_test=false
|
||||
performance_test=false
|
||||
pack=false
|
||||
publish=false
|
||||
sign=false
|
||||
public=false
|
||||
ci=false
|
||||
clean=false
|
||||
|
||||
warn_as_error=true
|
||||
node_reuse=true
|
||||
binary_log=false
|
||||
pipelines_log=false
|
||||
|
||||
projects=''
|
||||
configuration='Debug'
|
||||
prepare_machine=false
|
||||
verbosity='minimal'
|
||||
|
||||
properties=''
|
||||
|
||||
while [[ $# > 0 ]]; do
|
||||
opt="$(echo "${1/#--/-}" | awk '{print tolower($0)}')"
|
||||
case "$opt" in
|
||||
-help|-h)
|
||||
usage
|
||||
exit 0
|
||||
;;
|
||||
-clean)
|
||||
clean=true
|
||||
;;
|
||||
-configuration|-c)
|
||||
configuration=$2
|
||||
shift
|
||||
;;
|
||||
-verbosity|-v)
|
||||
verbosity=$2
|
||||
shift
|
||||
;;
|
||||
-binarylog|-bl)
|
||||
binary_log=true
|
||||
;;
|
||||
-pipelineslog|-pl)
|
||||
pipelines_log=true
|
||||
;;
|
||||
-restore|-r)
|
||||
restore=true
|
||||
;;
|
||||
-build|-b)
|
||||
build=true
|
||||
;;
|
||||
-rebuild)
|
||||
rebuild=true
|
||||
;;
|
||||
-pack)
|
||||
pack=true
|
||||
;;
|
||||
-test|-t)
|
||||
test=true
|
||||
;;
|
||||
-integrationtest)
|
||||
integration_test=true
|
||||
;;
|
||||
-performancetest)
|
||||
performance_test=true
|
||||
;;
|
||||
-sign)
|
||||
sign=true
|
||||
;;
|
||||
-publish)
|
||||
publish=true
|
||||
;;
|
||||
-preparemachine)
|
||||
prepare_machine=true
|
||||
;;
|
||||
-projects)
|
||||
projects=$2
|
||||
shift
|
||||
;;
|
||||
-ci)
|
||||
ci=true
|
||||
;;
|
||||
-warnaserror)
|
||||
warn_as_error=$2
|
||||
shift
|
||||
;;
|
||||
-nodereuse)
|
||||
node_reuse=$2
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
properties="$properties $1"
|
||||
;;
|
||||
esac
|
||||
|
||||
shift
|
||||
done
|
||||
|
||||
if [[ "$ci" == true ]]; then
|
||||
pipelines_log=true
|
||||
binary_log=true
|
||||
node_reuse=false
|
||||
fi
|
||||
|
||||
. "$scriptroot/tools.sh"
|
||||
|
||||
function InitializeCustomToolset {
|
||||
local script="$eng_root/restore-toolset.sh"
|
||||
|
||||
if [[ -a "$script" ]]; then
|
||||
. "$script"
|
||||
fi
|
||||
}
|
||||
|
||||
function Build {
|
||||
InitializeToolset
|
||||
InitializeCustomToolset
|
||||
|
||||
if [[ ! -z "$projects" ]]; then
|
||||
properties="$properties /p:Projects=$projects"
|
||||
fi
|
||||
|
||||
local bl=""
|
||||
if [[ "$binary_log" == true ]]; then
|
||||
bl="/bl:\"$log_dir/Build.binlog\""
|
||||
fi
|
||||
|
||||
MSBuild $_InitializeToolset \
|
||||
$bl \
|
||||
/p:Configuration=$configuration \
|
||||
/p:RepoRoot="$repo_root" \
|
||||
/p:Restore=$restore \
|
||||
/p:Build=$build \
|
||||
/p:Rebuild=$rebuild \
|
||||
/p:Test=$test \
|
||||
/p:Pack=$pack \
|
||||
/p:IntegrationTest=$integration_test \
|
||||
/p:PerformanceTest=$performance_test \
|
||||
/p:Sign=$sign \
|
||||
/p:Publish=$publish \
|
||||
$properties
|
||||
|
||||
ExitWithExitCode 0
|
||||
}
|
||||
|
||||
if [[ "$clean" == true ]]; then
|
||||
if [ -d "$artifacts_dir" ]; then
|
||||
rm -rf $artifacts_dir
|
||||
echo "Artifacts directory deleted."
|
||||
fi
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if [[ "$restore" == true ]]; then
|
||||
InitializeNativeTools
|
||||
fi
|
||||
|
||||
Build
|
||||
@@ -1,16 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
source="${BASH_SOURCE[0]}"
|
||||
|
||||
# resolve $SOURCE until the file is no longer a symlink
|
||||
while [[ -h $source ]]; do
|
||||
scriptroot="$( cd -P "$( dirname "$source" )" && pwd )"
|
||||
source="$(readlink "$source")"
|
||||
|
||||
# if $source was a relative symlink, we need to resolve it relative to the path where
|
||||
# the symlink file was located
|
||||
[[ $source != /* ]] && source="$scriptroot/$source"
|
||||
done
|
||||
scriptroot="$( cd -P "$( dirname "$source" )" && pwd )"
|
||||
|
||||
. "$scriptroot/build.sh" --restore --build --test --pack --publish --ci $@
|
||||
@@ -1,41 +0,0 @@
|
||||
set(CROSS_NDK_TOOLCHAIN $ENV{ROOTFS_DIR}/../)
|
||||
set(CROSS_ROOTFS ${CROSS_NDK_TOOLCHAIN}/sysroot)
|
||||
set(CLR_CMAKE_PLATFORM_ANDROID "Android")
|
||||
|
||||
set(CMAKE_SYSTEM_NAME Linux)
|
||||
set(CMAKE_SYSTEM_VERSION 1)
|
||||
set(CMAKE_SYSTEM_PROCESSOR arm)
|
||||
|
||||
## Specify the toolchain
|
||||
set(TOOLCHAIN "arm-linux-androideabi")
|
||||
set(CMAKE_PREFIX_PATH ${CROSS_NDK_TOOLCHAIN})
|
||||
set(TOOLCHAIN_PREFIX ${TOOLCHAIN}-)
|
||||
|
||||
find_program(CMAKE_C_COMPILER ${TOOLCHAIN_PREFIX}clang)
|
||||
find_program(CMAKE_CXX_COMPILER ${TOOLCHAIN_PREFIX}clang++)
|
||||
find_program(CMAKE_ASM_COMPILER ${TOOLCHAIN_PREFIX}clang)
|
||||
find_program(CMAKE_AR ${TOOLCHAIN_PREFIX}ar)
|
||||
find_program(CMAKE_LD ${TOOLCHAIN_PREFIX}ar)
|
||||
find_program(CMAKE_OBJCOPY ${TOOLCHAIN_PREFIX}objcopy)
|
||||
find_program(CMAKE_OBJDUMP ${TOOLCHAIN_PREFIX}objdump)
|
||||
|
||||
add_compile_options(--sysroot=${CROSS_ROOTFS})
|
||||
add_compile_options(-fPIE)
|
||||
add_compile_options(-mfloat-abi=soft)
|
||||
include_directories(SYSTEM ${CROSS_NDK_TOOLCHAIN}/include/c++/4.9.x/)
|
||||
include_directories(SYSTEM ${CROSS_NDK_TOOLCHAIN}/include/c++/4.9.x/arm-linux-androideabi/)
|
||||
|
||||
set(CROSS_LINK_FLAGS "${CROSS_LINK_FLAGS} -B ${CROSS_ROOTFS}/usr/lib/gcc/${TOOLCHAIN}")
|
||||
set(CROSS_LINK_FLAGS "${CROSS_LINK_FLAGS} -L${CROSS_ROOTFS}/lib/${TOOLCHAIN}")
|
||||
set(CROSS_LINK_FLAGS "${CROSS_LINK_FLAGS} --sysroot=${CROSS_ROOTFS}")
|
||||
set(CROSS_LINK_FLAGS "${CROSS_LINK_FLAGS} -fPIE -pie")
|
||||
|
||||
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${CROSS_LINK_FLAGS}" CACHE STRING "" FORCE)
|
||||
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} ${CROSS_LINK_FLAGS}" CACHE STRING "" FORCE)
|
||||
set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} ${CROSS_LINK_FLAGS}" CACHE STRING "" FORCE)
|
||||
|
||||
set(CMAKE_FIND_ROOT_PATH "${CROSS_ROOTFS}")
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY)
|
||||
@@ -1,42 +0,0 @@
|
||||
set(CROSS_NDK_TOOLCHAIN $ENV{ROOTFS_DIR}/../)
|
||||
set(CROSS_ROOTFS ${CROSS_NDK_TOOLCHAIN}/sysroot)
|
||||
set(CLR_CMAKE_PLATFORM_ANDROID "Android")
|
||||
|
||||
set(CMAKE_SYSTEM_NAME Linux)
|
||||
set(CMAKE_SYSTEM_VERSION 1)
|
||||
set(CMAKE_SYSTEM_PROCESSOR aarch64)
|
||||
|
||||
## Specify the toolchain
|
||||
set(TOOLCHAIN "aarch64-linux-android")
|
||||
set(CMAKE_PREFIX_PATH ${CROSS_NDK_TOOLCHAIN})
|
||||
set(TOOLCHAIN_PREFIX ${TOOLCHAIN}-)
|
||||
|
||||
find_program(CMAKE_C_COMPILER ${TOOLCHAIN_PREFIX}clang)
|
||||
find_program(CMAKE_CXX_COMPILER ${TOOLCHAIN_PREFIX}clang++)
|
||||
find_program(CMAKE_ASM_COMPILER ${TOOLCHAIN_PREFIX}clang)
|
||||
find_program(CMAKE_AR ${TOOLCHAIN_PREFIX}ar)
|
||||
find_program(CMAKE_LD ${TOOLCHAIN_PREFIX}ar)
|
||||
find_program(CMAKE_OBJCOPY ${TOOLCHAIN_PREFIX}objcopy)
|
||||
find_program(CMAKE_OBJDUMP ${TOOLCHAIN_PREFIX}objdump)
|
||||
|
||||
add_compile_options(--sysroot=${CROSS_ROOTFS})
|
||||
add_compile_options(-fPIE)
|
||||
|
||||
## Needed for Android or bionic specific conditionals
|
||||
add_compile_options(-D__ANDROID__)
|
||||
add_compile_options(-D__BIONIC__)
|
||||
|
||||
set(CROSS_LINK_FLAGS "${CROSS_LINK_FLAGS} -B ${CROSS_ROOTFS}/usr/lib/gcc/${TOOLCHAIN}")
|
||||
set(CROSS_LINK_FLAGS "${CROSS_LINK_FLAGS} -L${CROSS_ROOTFS}/lib/${TOOLCHAIN}")
|
||||
set(CROSS_LINK_FLAGS "${CROSS_LINK_FLAGS} --sysroot=${CROSS_ROOTFS}")
|
||||
set(CROSS_LINK_FLAGS "${CROSS_LINK_FLAGS} -fPIE -pie")
|
||||
|
||||
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${CROSS_LINK_FLAGS}" CACHE STRING "" FORCE)
|
||||
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} ${CROSS_LINK_FLAGS}" CACHE STRING "" FORCE)
|
||||
set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} ${CROSS_LINK_FLAGS}" CACHE STRING "" FORCE)
|
||||
|
||||
set(CMAKE_FIND_ROOT_PATH "${CROSS_ROOTFS}")
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY)
|
||||
@@ -1,11 +0,0 @@
|
||||
deb http://ports.ubuntu.com/ubuntu-ports/ bionic main restricted universe
|
||||
deb-src http://ports.ubuntu.com/ubuntu-ports/ bionic main restricted universe
|
||||
|
||||
deb http://ports.ubuntu.com/ubuntu-ports/ bionic-updates main restricted universe
|
||||
deb-src http://ports.ubuntu.com/ubuntu-ports/ bionic-updates main restricted universe
|
||||
|
||||
deb http://ports.ubuntu.com/ubuntu-ports/ bionic-backports main restricted
|
||||
deb-src http://ports.ubuntu.com/ubuntu-ports/ bionic-backports main restricted
|
||||
|
||||
deb http://ports.ubuntu.com/ubuntu-ports/ bionic-security main restricted universe multiverse
|
||||
deb-src http://ports.ubuntu.com/ubuntu-ports/ bionic-security main restricted universe multiverse
|
||||
@@ -1,3 +0,0 @@
|
||||
# Debian (sid) # UNSTABLE
|
||||
deb http://ftp.debian.org/debian/ sid main contrib non-free
|
||||
deb-src http://ftp.debian.org/debian/ sid main contrib non-free
|
||||
@@ -1,11 +0,0 @@
|
||||
deb http://ports.ubuntu.com/ubuntu-ports/ trusty main restricted universe
|
||||
deb-src http://ports.ubuntu.com/ubuntu-ports/ trusty main restricted universe
|
||||
|
||||
deb http://ports.ubuntu.com/ubuntu-ports/ trusty-updates main restricted universe
|
||||
deb-src http://ports.ubuntu.com/ubuntu-ports/ trusty-updates main restricted universe
|
||||
|
||||
deb http://ports.ubuntu.com/ubuntu-ports/ trusty-backports main restricted
|
||||
deb-src http://ports.ubuntu.com/ubuntu-ports/ trusty-backports main restricted
|
||||
|
||||
deb http://ports.ubuntu.com/ubuntu-ports/ trusty-security main restricted universe multiverse
|
||||
deb-src http://ports.ubuntu.com/ubuntu-ports/ trusty-security main restricted universe multiverse
|
||||
@@ -1,11 +0,0 @@
|
||||
deb http://ports.ubuntu.com/ubuntu-ports/ xenial main restricted universe
|
||||
deb-src http://ports.ubuntu.com/ubuntu-ports/ xenial main restricted universe
|
||||
|
||||
deb http://ports.ubuntu.com/ubuntu-ports/ xenial-updates main restricted universe
|
||||
deb-src http://ports.ubuntu.com/ubuntu-ports/ xenial-updates main restricted universe
|
||||
|
||||
deb http://ports.ubuntu.com/ubuntu-ports/ xenial-backports main restricted
|
||||
deb-src http://ports.ubuntu.com/ubuntu-ports/ xenial-backports main restricted
|
||||
|
||||
deb http://ports.ubuntu.com/ubuntu-ports/ xenial-security main restricted universe multiverse
|
||||
deb-src http://ports.ubuntu.com/ubuntu-ports/ xenial-security main restricted universe multiverse
|
||||
@@ -1,11 +0,0 @@
|
||||
deb http://ports.ubuntu.com/ubuntu-ports/ zesty main restricted universe
|
||||
deb-src http://ports.ubuntu.com/ubuntu-ports/ zesty main restricted universe
|
||||
|
||||
deb http://ports.ubuntu.com/ubuntu-ports/ zesty-updates main restricted universe
|
||||
deb-src http://ports.ubuntu.com/ubuntu-ports/ zesty-updates main restricted universe
|
||||
|
||||
deb http://ports.ubuntu.com/ubuntu-ports/ zesty-backports main restricted
|
||||
deb-src http://ports.ubuntu.com/ubuntu-ports/ zesty-backports main restricted
|
||||
|
||||
deb http://ports.ubuntu.com/ubuntu-ports/ zesty-security main restricted universe multiverse
|
||||
deb-src http://ports.ubuntu.com/ubuntu-ports/ zesty-security main restricted universe multiverse
|
||||
@@ -1,71 +0,0 @@
|
||||
From e72c9d7ead60e3317bd6d1fade995c07021c947b Mon Sep 17 00:00:00 2001
|
||||
From: Mathieu Desnoyers <[email protected]>
|
||||
Date: Thu, 7 May 2015 13:25:04 -0400
|
||||
Subject: [PATCH] Fix: building probe providers with C++ compiler
|
||||
|
||||
Robert Daniels wrote:
|
||||
> > I'm attempting to use lttng userspace tracing with a C++ application
|
||||
> > on an ARM platform. I'm using GCC 4.8.4 on Linux 3.14 with the 2.6
|
||||
> > release of lttng. I've compiled lttng-modules, lttng-ust, and
|
||||
> > lttng-tools and have been able to get a simple test working with C
|
||||
> > code. When I attempt to run the hello.cxx test on my target it will
|
||||
> > segfault.
|
||||
>
|
||||
>
|
||||
> I spent a little time digging into this issue and finally discovered the
|
||||
> cause of my segfault with ARM C++ tracepoints.
|
||||
>
|
||||
> There is a struct called 'lttng_event' in ust-events.h which contains an
|
||||
> empty union 'u'. This was the cause of my issue. Under C, this empty union
|
||||
> compiles to a zero byte member while under C++ it compiles to a one byte
|
||||
> member, and in my case was four-byte aligned which caused my C++ code to
|
||||
> have the 'cds_list_head node' offset incorrectly by four bytes. This lead
|
||||
> to an incorrect linked list structure which caused my issue.
|
||||
>
|
||||
> Since this union is empty, I simply removed it from the struct and everything
|
||||
> worked correctly.
|
||||
>
|
||||
> I don't know the history or purpose behind this empty union so I'd like to
|
||||
> know if this is a safe fix. If it is I can submit a patch with the union
|
||||
> removed.
|
||||
|
||||
That's a very nice catch!
|
||||
|
||||
We do not support building tracepoint probe provider with
|
||||
g++ yet, as stated in lttng-ust(3):
|
||||
|
||||
"- Note for C++ support: although an application instrumented with
|
||||
tracepoints can be compiled with g++, tracepoint probes should be
|
||||
compiled with gcc (only tested with gcc so far)."
|
||||
|
||||
However, if it works fine with this fix, then I'm tempted to take it,
|
||||
especially because removing the empty union does not appear to affect
|
||||
the layout of struct lttng_event as seen from liblttng-ust, which must
|
||||
be compiled with a C compiler, and from probe providers compiled with
|
||||
a C compiler. So all we are changing is the layout of a probe provider
|
||||
compiled with a C++ compiler, which is anyway buggy at the moment,
|
||||
because it is not compatible with the layout expected by liblttng-ust
|
||||
compiled with a C compiler.
|
||||
|
||||
Reported-by: Robert Daniels <[email protected]>
|
||||
Signed-off-by: Mathieu Desnoyers <[email protected]>
|
||||
---
|
||||
include/lttng/ust-events.h | 2 --
|
||||
1 file changed, 2 deletions(-)
|
||||
|
||||
diff --git a/usr/include/lttng/ust-events.h b/usr/include/lttng/ust-events.h
|
||||
index 328a875..3d7a274 100644
|
||||
--- a/usr/include/lttng/ust-events.h
|
||||
+++ b/usr/include/lttng/ust-events.h
|
||||
@@ -407,8 +407,6 @@ struct lttng_event {
|
||||
void *_deprecated1;
|
||||
struct lttng_ctx *ctx;
|
||||
enum lttng_ust_instrumentation instrumentation;
|
||||
- union {
|
||||
- } u;
|
||||
struct cds_list_head node; /* Event list in session */
|
||||
struct cds_list_head _deprecated2;
|
||||
void *_deprecated3;
|
||||
--
|
||||
2.7.4
|
||||
|
||||
@@ -1,97 +0,0 @@
|
||||
diff -u -r a/usr/include/urcu/uatomic/generic.h b/usr/include/urcu/uatomic/generic.h
|
||||
--- a/usr/include/urcu/uatomic/generic.h 2014-03-28 06:04:42.000000000 +0900
|
||||
+++ b/usr/include/urcu/uatomic/generic.h 2017-02-13 10:35:21.189927116 +0900
|
||||
@@ -65,17 +65,17 @@
|
||||
switch (len) {
|
||||
#ifdef UATOMIC_HAS_ATOMIC_BYTE
|
||||
case 1:
|
||||
- return __sync_val_compare_and_swap_1(addr, old, _new);
|
||||
+ return __sync_val_compare_and_swap_1((uint8_t *) addr, old, _new);
|
||||
#endif
|
||||
#ifdef UATOMIC_HAS_ATOMIC_SHORT
|
||||
case 2:
|
||||
- return __sync_val_compare_and_swap_2(addr, old, _new);
|
||||
+ return __sync_val_compare_and_swap_2((uint16_t *) addr, old, _new);
|
||||
#endif
|
||||
case 4:
|
||||
- return __sync_val_compare_and_swap_4(addr, old, _new);
|
||||
+ return __sync_val_compare_and_swap_4((uint32_t *) addr, old, _new);
|
||||
#if (CAA_BITS_PER_LONG == 64)
|
||||
case 8:
|
||||
- return __sync_val_compare_and_swap_8(addr, old, _new);
|
||||
+ return __sync_val_compare_and_swap_8((uint64_t *) addr, old, _new);
|
||||
#endif
|
||||
}
|
||||
_uatomic_link_error();
|
||||
@@ -100,20 +100,20 @@
|
||||
switch (len) {
|
||||
#ifdef UATOMIC_HAS_ATOMIC_BYTE
|
||||
case 1:
|
||||
- __sync_and_and_fetch_1(addr, val);
|
||||
+ __sync_and_and_fetch_1((uint8_t *) addr, val);
|
||||
return;
|
||||
#endif
|
||||
#ifdef UATOMIC_HAS_ATOMIC_SHORT
|
||||
case 2:
|
||||
- __sync_and_and_fetch_2(addr, val);
|
||||
+ __sync_and_and_fetch_2((uint16_t *) addr, val);
|
||||
return;
|
||||
#endif
|
||||
case 4:
|
||||
- __sync_and_and_fetch_4(addr, val);
|
||||
+ __sync_and_and_fetch_4((uint32_t *) addr, val);
|
||||
return;
|
||||
#if (CAA_BITS_PER_LONG == 64)
|
||||
case 8:
|
||||
- __sync_and_and_fetch_8(addr, val);
|
||||
+ __sync_and_and_fetch_8((uint64_t *) addr, val);
|
||||
return;
|
||||
#endif
|
||||
}
|
||||
@@ -139,20 +139,20 @@
|
||||
switch (len) {
|
||||
#ifdef UATOMIC_HAS_ATOMIC_BYTE
|
||||
case 1:
|
||||
- __sync_or_and_fetch_1(addr, val);
|
||||
+ __sync_or_and_fetch_1((uint8_t *) addr, val);
|
||||
return;
|
||||
#endif
|
||||
#ifdef UATOMIC_HAS_ATOMIC_SHORT
|
||||
case 2:
|
||||
- __sync_or_and_fetch_2(addr, val);
|
||||
+ __sync_or_and_fetch_2((uint16_t *) addr, val);
|
||||
return;
|
||||
#endif
|
||||
case 4:
|
||||
- __sync_or_and_fetch_4(addr, val);
|
||||
+ __sync_or_and_fetch_4((uint32_t *) addr, val);
|
||||
return;
|
||||
#if (CAA_BITS_PER_LONG == 64)
|
||||
case 8:
|
||||
- __sync_or_and_fetch_8(addr, val);
|
||||
+ __sync_or_and_fetch_8((uint64_t *) addr, val);
|
||||
return;
|
||||
#endif
|
||||
}
|
||||
@@ -180,17 +180,17 @@
|
||||
switch (len) {
|
||||
#ifdef UATOMIC_HAS_ATOMIC_BYTE
|
||||
case 1:
|
||||
- return __sync_add_and_fetch_1(addr, val);
|
||||
+ return __sync_add_and_fetch_1((uint8_t *) addr, val);
|
||||
#endif
|
||||
#ifdef UATOMIC_HAS_ATOMIC_SHORT
|
||||
case 2:
|
||||
- return __sync_add_and_fetch_2(addr, val);
|
||||
+ return __sync_add_and_fetch_2((uint16_t *) addr, val);
|
||||
#endif
|
||||
case 4:
|
||||
- return __sync_add_and_fetch_4(addr, val);
|
||||
+ return __sync_add_and_fetch_4((uint32_t *) addr, val);
|
||||
#if (CAA_BITS_PER_LONG == 64)
|
||||
case 8:
|
||||
- return __sync_add_and_fetch_8(addr, val);
|
||||
+ return __sync_add_and_fetch_8((uint64_t *) addr, val);
|
||||
#endif
|
||||
}
|
||||
_uatomic_link_error();
|
||||
@@ -1,11 +0,0 @@
|
||||
deb http://ports.ubuntu.com/ubuntu-ports/ bionic main restricted universe
|
||||
deb-src http://ports.ubuntu.com/ubuntu-ports/ bionic main restricted universe
|
||||
|
||||
deb http://ports.ubuntu.com/ubuntu-ports/ bionic-updates main restricted universe
|
||||
deb-src http://ports.ubuntu.com/ubuntu-ports/ bionic-updates main restricted universe
|
||||
|
||||
deb http://ports.ubuntu.com/ubuntu-ports/ bionic-backports main restricted
|
||||
deb-src http://ports.ubuntu.com/ubuntu-ports/ bionic-backports main restricted
|
||||
|
||||
deb http://ports.ubuntu.com/ubuntu-ports/ bionic-security main restricted universe multiverse
|
||||
deb-src http://ports.ubuntu.com/ubuntu-ports/ bionic-security main restricted universe multiverse
|
||||
@@ -1,11 +0,0 @@
|
||||
deb http://deb.debian.org/debian buster main
|
||||
deb-src http://deb.debian.org/debian buster main
|
||||
|
||||
deb http://deb.debian.org/debian-security/ buster/updates main
|
||||
deb-src http://deb.debian.org/debian-security/ buster/updates main
|
||||
|
||||
deb http://deb.debian.org/debian buster-updates main
|
||||
deb-src http://deb.debian.org/debian buster-updates main
|
||||
|
||||
deb http://deb.debian.org/debian buster-backports main contrib non-free
|
||||
deb-src http://deb.debian.org/debian buster-backports main contrib non-free
|
||||
@@ -1,12 +0,0 @@
|
||||
deb http://deb.debian.org/debian stretch main
|
||||
deb-src http://deb.debian.org/debian stretch main
|
||||
|
||||
deb http://deb.debian.org/debian-security/ stretch/updates main
|
||||
deb-src http://deb.debian.org/debian-security/ stretch/updates main
|
||||
|
||||
deb http://deb.debian.org/debian stretch-updates main
|
||||
deb-src http://deb.debian.org/debian stretch-updates main
|
||||
|
||||
deb http://deb.debian.org/debian stretch-backports main contrib non-free
|
||||
deb-src http://deb.debian.org/debian stretch-backports main contrib non-free
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
deb http://ports.ubuntu.com/ubuntu-ports/ trusty main restricted universe
|
||||
deb-src http://ports.ubuntu.com/ubuntu-ports/ trusty main restricted universe
|
||||
|
||||
deb http://ports.ubuntu.com/ubuntu-ports/ trusty-updates main restricted universe
|
||||
deb-src http://ports.ubuntu.com/ubuntu-ports/ trusty-updates main restricted universe
|
||||
|
||||
deb http://ports.ubuntu.com/ubuntu-ports/ trusty-backports main restricted
|
||||
deb-src http://ports.ubuntu.com/ubuntu-ports/ trusty-backports main restricted
|
||||
|
||||
deb http://ports.ubuntu.com/ubuntu-ports/ trusty-security main restricted universe multiverse
|
||||
deb-src http://ports.ubuntu.com/ubuntu-ports/ trusty-security main restricted universe multiverse
|
||||
@@ -1,11 +0,0 @@
|
||||
deb http://ports.ubuntu.com/ubuntu-ports/ xenial main restricted universe
|
||||
deb-src http://ports.ubuntu.com/ubuntu-ports/ xenial main restricted universe
|
||||
|
||||
deb http://ports.ubuntu.com/ubuntu-ports/ xenial-updates main restricted universe
|
||||
deb-src http://ports.ubuntu.com/ubuntu-ports/ xenial-updates main restricted universe
|
||||
|
||||
deb http://ports.ubuntu.com/ubuntu-ports/ xenial-backports main restricted
|
||||
deb-src http://ports.ubuntu.com/ubuntu-ports/ xenial-backports main restricted
|
||||
|
||||
deb http://ports.ubuntu.com/ubuntu-ports/ xenial-security main restricted universe multiverse
|
||||
deb-src http://ports.ubuntu.com/ubuntu-ports/ xenial-security main restricted universe multiverse
|
||||
@@ -1,11 +0,0 @@
|
||||
deb http://ports.ubuntu.com/ubuntu-ports/ zesty main restricted universe
|
||||
deb-src http://ports.ubuntu.com/ubuntu-ports/ zesty main restricted universe
|
||||
|
||||
deb http://ports.ubuntu.com/ubuntu-ports/ zesty-updates main restricted universe
|
||||
deb-src http://ports.ubuntu.com/ubuntu-ports/ zesty-updates main restricted universe
|
||||
|
||||
deb http://ports.ubuntu.com/ubuntu-ports/ zesty-backports main restricted
|
||||
deb-src http://ports.ubuntu.com/ubuntu-ports/ zesty-backports main restricted
|
||||
|
||||
deb http://ports.ubuntu.com/ubuntu-ports/ zesty-security main restricted universe multiverse
|
||||
deb-src http://ports.ubuntu.com/ubuntu-ports/ zesty-security main restricted universe multiverse
|
||||
@@ -1,3 +0,0 @@
|
||||
# Debian (jessie) # Stable
|
||||
deb http://ftp.debian.org/debian/ jessie main contrib non-free
|
||||
deb-src http://ftp.debian.org/debian/ jessie main contrib non-free
|
||||
@@ -1,44 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
set -e
|
||||
|
||||
__ARM_SOFTFP_CrossDir=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
|
||||
__TIZEN_CROSSDIR="$__ARM_SOFTFP_CrossDir/tizen"
|
||||
|
||||
if [[ -z "$ROOTFS_DIR" ]]; then
|
||||
echo "ROOTFS_DIR is not defined."
|
||||
exit 1;
|
||||
fi
|
||||
|
||||
# Clean-up (TODO-Cleanup: We may already delete $ROOTFS_DIR at ./cross/build-rootfs.sh.)
|
||||
# hk0110
|
||||
if [ -d "$ROOTFS_DIR" ]; then
|
||||
umount $ROOTFS_DIR/*
|
||||
rm -rf $ROOTFS_DIR
|
||||
fi
|
||||
|
||||
TIZEN_TMP_DIR=$ROOTFS_DIR/tizen_tmp
|
||||
mkdir -p $TIZEN_TMP_DIR
|
||||
|
||||
# Download files
|
||||
echo ">>Start downloading files"
|
||||
VERBOSE=1 $__ARM_SOFTFP_CrossDir/tizen-fetch.sh $TIZEN_TMP_DIR
|
||||
echo "<<Finish downloading files"
|
||||
|
||||
echo ">>Start constructing Tizen rootfs"
|
||||
TIZEN_RPM_FILES=`ls $TIZEN_TMP_DIR/*.rpm`
|
||||
cd $ROOTFS_DIR
|
||||
for f in $TIZEN_RPM_FILES; do
|
||||
rpm2cpio $f | cpio -idm --quiet
|
||||
done
|
||||
echo "<<Finish constructing Tizen rootfs"
|
||||
|
||||
# Cleanup tmp
|
||||
rm -rf $TIZEN_TMP_DIR
|
||||
|
||||
# Configure Tizen rootfs
|
||||
echo ">>Start configuring Tizen rootfs"
|
||||
rm ./usr/lib/libunwind.so
|
||||
ln -s libunwind.so.8 ./usr/lib/libunwind.so
|
||||
ln -sfn asm-arm ./usr/include/asm
|
||||
patch -p1 < $__TIZEN_CROSSDIR/tizen.patch
|
||||
echo "<<Finish configuring Tizen rootfs"
|
||||
@@ -1,171 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
set -e
|
||||
|
||||
if [[ -z "${VERBOSE// }" ]] || [ "$VERBOSE" -ne "$VERBOSE" ] 2>/dev/null; then
|
||||
VERBOSE=0
|
||||
fi
|
||||
|
||||
Log()
|
||||
{
|
||||
if [ $VERBOSE -ge $1 ]; then
|
||||
echo ${@:2}
|
||||
fi
|
||||
}
|
||||
|
||||
Inform()
|
||||
{
|
||||
Log 1 -e "\x1B[0;34m$@\x1B[m"
|
||||
}
|
||||
|
||||
Debug()
|
||||
{
|
||||
Log 2 -e "\x1B[0;32m$@\x1B[m"
|
||||
}
|
||||
|
||||
Error()
|
||||
{
|
||||
>&2 Log 0 -e "\x1B[0;31m$@\x1B[m"
|
||||
}
|
||||
|
||||
Fetch()
|
||||
{
|
||||
URL=$1
|
||||
FILE=$2
|
||||
PROGRESS=$3
|
||||
if [ $VERBOSE -ge 1 ] && [ $PROGRESS ]; then
|
||||
CURL_OPT="--progress-bar"
|
||||
else
|
||||
CURL_OPT="--silent"
|
||||
fi
|
||||
curl $CURL_OPT $URL > $FILE
|
||||
}
|
||||
|
||||
hash curl 2> /dev/null || { Error "Require 'curl' Aborting."; exit 1; }
|
||||
hash xmllint 2> /dev/null || { Error "Require 'xmllint' Aborting."; exit 1; }
|
||||
hash sha256sum 2> /dev/null || { Error "Require 'sha256sum' Aborting."; exit 1; }
|
||||
|
||||
TMPDIR=$1
|
||||
if [ ! -d $TMPDIR ]; then
|
||||
TMPDIR=./tizen_tmp
|
||||
Debug "Create temporary directory : $TMPDIR"
|
||||
mkdir -p $TMPDIR
|
||||
fi
|
||||
|
||||
TIZEN_URL=http://download.tizen.org/releases/milestone/tizen
|
||||
BUILD_XML=build.xml
|
||||
REPOMD_XML=repomd.xml
|
||||
PRIMARY_XML=primary.xml
|
||||
TARGET_URL="http://__not_initialized"
|
||||
|
||||
Xpath_get()
|
||||
{
|
||||
XPATH_RESULT=''
|
||||
XPATH=$1
|
||||
XML_FILE=$2
|
||||
RESULT=$(xmllint --xpath $XPATH $XML_FILE)
|
||||
if [[ -z ${RESULT// } ]]; then
|
||||
Error "Can not find target from $XML_FILE"
|
||||
Debug "Xpath = $XPATH"
|
||||
exit 1
|
||||
fi
|
||||
XPATH_RESULT=$RESULT
|
||||
}
|
||||
|
||||
fetch_tizen_pkgs_init()
|
||||
{
|
||||
TARGET=$1
|
||||
PROFILE=$2
|
||||
Debug "Initialize TARGET=$TARGET, PROFILE=$PROFILE"
|
||||
|
||||
TMP_PKG_DIR=$TMPDIR/tizen_${PROFILE}_pkgs
|
||||
if [ -d $TMP_PKG_DIR ]; then rm -rf $TMP_PKG_DIR; fi
|
||||
mkdir -p $TMP_PKG_DIR
|
||||
|
||||
PKG_URL=$TIZEN_URL/$PROFILE/latest
|
||||
|
||||
BUILD_XML_URL=$PKG_URL/$BUILD_XML
|
||||
TMP_BUILD=$TMP_PKG_DIR/$BUILD_XML
|
||||
TMP_REPOMD=$TMP_PKG_DIR/$REPOMD_XML
|
||||
TMP_PRIMARY=$TMP_PKG_DIR/$PRIMARY_XML
|
||||
TMP_PRIMARYGZ=${TMP_PRIMARY}.gz
|
||||
|
||||
Fetch $BUILD_XML_URL $TMP_BUILD
|
||||
|
||||
Debug "fetch $BUILD_XML_URL to $TMP_BUILD"
|
||||
|
||||
TARGET_XPATH="//build/buildtargets/buildtarget[@name=\"$TARGET\"]/repo[@type=\"binary\"]/text()"
|
||||
Xpath_get $TARGET_XPATH $TMP_BUILD
|
||||
TARGET_PATH=$XPATH_RESULT
|
||||
TARGET_URL=$PKG_URL/$TARGET_PATH
|
||||
|
||||
REPOMD_URL=$TARGET_URL/repodata/repomd.xml
|
||||
PRIMARY_XPATH='string(//*[local-name()="data"][@type="primary"]/*[local-name()="location"]/@href)'
|
||||
|
||||
Fetch $REPOMD_URL $TMP_REPOMD
|
||||
|
||||
Debug "fetch $REPOMD_URL to $TMP_REPOMD"
|
||||
|
||||
Xpath_get $PRIMARY_XPATH $TMP_REPOMD
|
||||
PRIMARY_XML_PATH=$XPATH_RESULT
|
||||
PRIMARY_URL=$TARGET_URL/$PRIMARY_XML_PATH
|
||||
|
||||
Fetch $PRIMARY_URL $TMP_PRIMARYGZ
|
||||
|
||||
Debug "fetch $PRIMARY_URL to $TMP_PRIMARYGZ"
|
||||
|
||||
gunzip $TMP_PRIMARYGZ
|
||||
|
||||
Debug "unzip $TMP_PRIMARYGZ to $TMP_PRIMARY"
|
||||
}
|
||||
|
||||
fetch_tizen_pkgs()
|
||||
{
|
||||
ARCH=$1
|
||||
PACKAGE_XPATH_TPL='string(//*[local-name()="metadata"]/*[local-name()="package"][*[local-name()="name"][text()="_PKG_"]][*[local-name()="arch"][text()="_ARCH_"]]/*[local-name()="location"]/@href)'
|
||||
|
||||
PACKAGE_CHECKSUM_XPATH_TPL='string(//*[local-name()="metadata"]/*[local-name()="package"][*[local-name()="name"][text()="_PKG_"]][*[local-name()="arch"][text()="_ARCH_"]]/*[local-name()="checksum"]/text())'
|
||||
|
||||
for pkg in ${@:2}
|
||||
do
|
||||
Inform "Fetching... $pkg"
|
||||
XPATH=${PACKAGE_XPATH_TPL/_PKG_/$pkg}
|
||||
XPATH=${XPATH/_ARCH_/$ARCH}
|
||||
Xpath_get $XPATH $TMP_PRIMARY
|
||||
PKG_PATH=$XPATH_RESULT
|
||||
|
||||
XPATH=${PACKAGE_CHECKSUM_XPATH_TPL/_PKG_/$pkg}
|
||||
XPATH=${XPATH/_ARCH_/$ARCH}
|
||||
Xpath_get $XPATH $TMP_PRIMARY
|
||||
CHECKSUM=$XPATH_RESULT
|
||||
|
||||
PKG_URL=$TARGET_URL/$PKG_PATH
|
||||
PKG_FILE=$(basename $PKG_PATH)
|
||||
PKG_PATH=$TMPDIR/$PKG_FILE
|
||||
|
||||
Debug "Download $PKG_URL to $PKG_PATH"
|
||||
Fetch $PKG_URL $PKG_PATH true
|
||||
|
||||
echo "$CHECKSUM $PKG_PATH" | sha256sum -c - > /dev/null
|
||||
if [ $? -ne 0 ]; then
|
||||
Error "Fail to fetch $PKG_URL to $PKG_PATH"
|
||||
Debug "Checksum = $CHECKSUM"
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
Inform "Initialize arm base"
|
||||
fetch_tizen_pkgs_init standard base
|
||||
Inform "fetch common packages"
|
||||
fetch_tizen_pkgs armv7l gcc glibc glibc-devel libicu libicu-devel libatomic
|
||||
fetch_tizen_pkgs noarch linux-glibc-devel
|
||||
Inform "fetch coreclr packages"
|
||||
fetch_tizen_pkgs armv7l lldb lldb-devel libgcc libstdc++ libstdc++-devel libunwind libunwind-devel lttng-ust-devel lttng-ust userspace-rcu-devel userspace-rcu
|
||||
Inform "fetch corefx packages"
|
||||
fetch_tizen_pkgs armv7l libcom_err libcom_err-devel zlib zlib-devel libopenssl libopenssl-devel krb5 krb5-devel libcurl libcurl-devel
|
||||
|
||||
Inform "Initialize standard unified"
|
||||
fetch_tizen_pkgs_init standard unified
|
||||
Inform "fetch corefx packages"
|
||||
fetch_tizen_pkgs armv7l gssdp gssdp-devel tizen-release
|
||||
|
||||
@@ -1,50 +0,0 @@
|
||||
lang en_US.UTF-8
|
||||
keyboard us
|
||||
timezone --utc Asia/Seoul
|
||||
|
||||
part / --fstype="ext4" --size=3500 --ondisk=mmcblk0 --label rootfs --fsoptions=defaults,noatime
|
||||
|
||||
rootpw tizen
|
||||
desktop --autologinuser=root
|
||||
user --name root --groups audio,video --password 'tizen'
|
||||
|
||||
repo --name=standard --baseurl=http://download.tizen.org/releases/milestone/tizen/unified/latest/repos/standard/packages/ --ssl_verify=no
|
||||
repo --name=base --baseurl=http://download.tizen.org/releases/milestone/tizen/base/latest/repos/standard/packages/ --ssl_verify=no
|
||||
|
||||
%packages
|
||||
tar
|
||||
gzip
|
||||
|
||||
sed
|
||||
grep
|
||||
gawk
|
||||
perl
|
||||
|
||||
binutils
|
||||
findutils
|
||||
util-linux
|
||||
lttng-ust
|
||||
userspace-rcu
|
||||
procps-ng
|
||||
tzdata
|
||||
ca-certificates
|
||||
|
||||
|
||||
### Core FX
|
||||
libicu
|
||||
libunwind
|
||||
iputils
|
||||
zlib
|
||||
krb5
|
||||
libcurl
|
||||
libopenssl
|
||||
|
||||
%end
|
||||
|
||||
%post
|
||||
|
||||
### Update /tmp privilege
|
||||
chmod 777 /tmp
|
||||
####################################
|
||||
|
||||
%end
|
||||
@@ -1,18 +0,0 @@
|
||||
diff -u -r a/usr/lib/libc.so b/usr/lib/libc.so
|
||||
--- a/usr/lib/libc.so 2016-12-30 23:00:08.284951863 +0900
|
||||
+++ b/usr/lib/libc.so 2016-12-30 23:00:32.140951815 +0900
|
||||
@@ -2,4 +2,4 @@
|
||||
Use the shared library, but some functions are only in
|
||||
the static library, so try that secondarily. */
|
||||
OUTPUT_FORMAT(elf32-littlearm)
|
||||
-GROUP ( /lib/libc.so.6 /usr/lib/libc_nonshared.a AS_NEEDED ( /lib/ld-linux.so.3 ) )
|
||||
+GROUP ( libc.so.6 libc_nonshared.a AS_NEEDED ( ld-linux.so.3 ) )
|
||||
diff -u -r a/usr/lib/libpthread.so b/usr/lib/libpthread.so
|
||||
--- a/usr/lib/libpthread.so 2016-12-30 23:00:19.408951841 +0900
|
||||
+++ b/usr/lib/libpthread.so 2016-12-30 23:00:39.068951801 +0900
|
||||
@@ -2,4 +2,4 @@
|
||||
Use the shared library, but some functions are only in
|
||||
the static library, so try that secondarily. */
|
||||
OUTPUT_FORMAT(elf32-littlearm)
|
||||
-GROUP ( /lib/libpthread.so.0 /usr/lib/libpthread_nonshared.a )
|
||||
+GROUP ( libpthread.so.0 libpthread_nonshared.a )
|
||||
@@ -1,137 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
set -e
|
||||
__NDK_Version=r14
|
||||
|
||||
usage()
|
||||
{
|
||||
echo "Creates a toolchain and sysroot used for cross-compiling for Android."
|
||||
echo.
|
||||
echo "Usage: $0 [BuildArch] [ApiLevel]"
|
||||
echo.
|
||||
echo "BuildArch is the target architecture of Android. Currently only arm64 is supported."
|
||||
echo "ApiLevel is the target Android API level. API levels usually match to Android releases. See https://source.android.com/source/build-numbers.html"
|
||||
echo.
|
||||
echo "By default, the toolchain and sysroot will be generated in cross/android-rootfs/toolchain/[BuildArch]. You can change this behavior"
|
||||
echo "by setting the TOOLCHAIN_DIR environment variable"
|
||||
echo.
|
||||
echo "By default, the NDK will be downloaded into the cross/android-rootfs/android-ndk-$__NDK_Version directory. If you already have an NDK installation,"
|
||||
echo "you can set the NDK_DIR environment variable to have this script use that installation of the NDK."
|
||||
echo "By default, this script will generate a file, android_platform, in the root of the ROOTFS_DIR directory that contains the RID for the supported and tested Android build: android.21-arm64. This file is to replace '/etc/os-release', which is not available for Android."
|
||||
exit 1
|
||||
}
|
||||
|
||||
__ApiLevel=21 # The minimum platform for arm64 is API level 21
|
||||
__BuildArch=arm64
|
||||
__AndroidArch=aarch64
|
||||
__AndroidToolchain=aarch64-linux-android
|
||||
|
||||
for i in "$@"
|
||||
do
|
||||
lowerI="$(echo $i | awk '{print tolower($0)}')"
|
||||
case $lowerI in
|
||||
-?|-h|--help)
|
||||
usage
|
||||
exit 1
|
||||
;;
|
||||
arm64)
|
||||
__BuildArch=arm64
|
||||
__AndroidArch=aarch64
|
||||
__AndroidToolchain=aarch64-linux-android
|
||||
;;
|
||||
arm)
|
||||
__BuildArch=arm
|
||||
__AndroidArch=arm
|
||||
__AndroidToolchain=arm-linux-androideabi
|
||||
;;
|
||||
*[0-9])
|
||||
__ApiLevel=$i
|
||||
;;
|
||||
*)
|
||||
__UnprocessedBuildArgs="$__UnprocessedBuildArgs $i"
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
# Obtain the location of the bash script to figure out where the root of the repo is.
|
||||
__CrossDir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
|
||||
__Android_Cross_Dir="$__CrossDir/android-rootfs"
|
||||
__NDK_Dir="$__Android_Cross_Dir/android-ndk-$__NDK_Version"
|
||||
__libunwind_Dir="$__Android_Cross_Dir/libunwind"
|
||||
__lldb_Dir="$__Android_Cross_Dir/lldb"
|
||||
__ToolchainDir="$__Android_Cross_Dir/toolchain/$__BuildArch"
|
||||
|
||||
if [[ -n "$TOOLCHAIN_DIR" ]]; then
|
||||
__ToolchainDir=$TOOLCHAIN_DIR
|
||||
fi
|
||||
|
||||
if [[ -n "$NDK_DIR" ]]; then
|
||||
__NDK_Dir=$NDK_DIR
|
||||
fi
|
||||
|
||||
echo "Target API level: $__ApiLevel"
|
||||
echo "Target architecture: $__BuildArch"
|
||||
echo "NDK location: $__NDK_Dir"
|
||||
echo "Target Toolchain location: $__ToolchainDir"
|
||||
|
||||
# Download the NDK if required
|
||||
if [ ! -d $__NDK_Dir ]; then
|
||||
echo Downloading the NDK into $__NDK_Dir
|
||||
mkdir -p $__NDK_Dir
|
||||
wget -nv -nc --show-progress https://dl.google.com/android/repository/android-ndk-$__NDK_Version-linux-x86_64.zip -O $__Android_Cross_Dir/android-ndk-$__NDK_Version-linux-x86_64.zip
|
||||
unzip -q $__Android_Cross_Dir/android-ndk-$__NDK_Version-linux-x86_64.zip -d $__Android_Cross_Dir
|
||||
fi
|
||||
|
||||
if [ ! -d $__lldb_Dir ]; then
|
||||
mkdir -p $__lldb_Dir
|
||||
echo Downloading LLDB into $__lldb_Dir
|
||||
wget -nv -nc --show-progress https://dl.google.com/android/repository/lldb-2.3.3614996-linux-x86_64.zip -O $__Android_Cross_Dir/lldb-2.3.3614996-linux-x86_64.zip
|
||||
unzip -q $__Android_Cross_Dir/lldb-2.3.3614996-linux-x86_64.zip -d $__lldb_Dir
|
||||
fi
|
||||
|
||||
# Create the RootFS for both arm64 as well as aarch
|
||||
rm -rf $__Android_Cross_Dir/toolchain
|
||||
|
||||
echo Generating the $__BuildArch toolchain
|
||||
$__NDK_Dir/build/tools/make_standalone_toolchain.py --arch $__BuildArch --api $__ApiLevel --install-dir $__ToolchainDir
|
||||
|
||||
# Install the required packages into the toolchain
|
||||
# TODO: Add logic to get latest pkg version instead of specific version number
|
||||
rm -rf $__Android_Cross_Dir/deb/
|
||||
rm -rf $__Android_Cross_Dir/tmp
|
||||
|
||||
mkdir -p $__Android_Cross_Dir/deb/
|
||||
mkdir -p $__Android_Cross_Dir/tmp/$arch/
|
||||
wget -nv -nc http://termux.net/dists/stable/main/binary-$__AndroidArch/libicu_60.2_$__AndroidArch.deb -O $__Android_Cross_Dir/deb/libicu_60.2_$__AndroidArch.deb
|
||||
wget -nv -nc http://termux.net/dists/stable/main/binary-$__AndroidArch/libicu-dev_60.2_$__AndroidArch.deb -O $__Android_Cross_Dir/deb/libicu-dev_60.2_$__AndroidArch.deb
|
||||
|
||||
wget -nv -nc http://termux.net/dists/stable/main/binary-$__AndroidArch/libandroid-glob-dev_0.4_$__AndroidArch.deb -O $__Android_Cross_Dir/deb/libandroid-glob-dev_0.4_$__AndroidArch.deb
|
||||
wget -nv -nc http://termux.net/dists/stable/main/binary-$__AndroidArch/libandroid-glob_0.4_$__AndroidArch.deb -O $__Android_Cross_Dir/deb/libandroid-glob_0.4_$__AndroidArch.deb
|
||||
wget -nv -nc http://termux.net/dists/stable/main/binary-$__AndroidArch/libandroid-support-dev_22_$__AndroidArch.deb -O $__Android_Cross_Dir/deb/libandroid-support-dev_22_$__AndroidArch.deb
|
||||
wget -nv -nc http://termux.net/dists/stable/main/binary-$__AndroidArch/libandroid-support_22_$__AndroidArch.deb -O $__Android_Cross_Dir/deb/libandroid-support_22_$__AndroidArch.deb
|
||||
wget -nv -nc http://termux.net/dists/stable/main/binary-$__AndroidArch/liblzma-dev_5.2.3_$__AndroidArch.deb -O $__Android_Cross_Dir/deb/liblzma-dev_5.2.3_$__AndroidArch.deb
|
||||
wget -nv -nc http://termux.net/dists/stable/main/binary-$__AndroidArch/liblzma_5.2.3_$__AndroidArch.deb -O $__Android_Cross_Dir/deb/liblzma_5.2.3_$__AndroidArch.deb
|
||||
wget -nv -nc http://termux.net/dists/stable/main/binary-$__AndroidArch/libunwind-dev_1.2.20170304_$__AndroidArch.deb -O $__Android_Cross_Dir/deb/libunwind-dev_1.2.20170304_$__AndroidArch.deb
|
||||
wget -nv -nc http://termux.net/dists/stable/main/binary-$__AndroidArch/libunwind_1.2.20170304_$__AndroidArch.deb -O $__Android_Cross_Dir/deb/libunwind_1.2.20170304_$__AndroidArch.deb
|
||||
|
||||
echo Unpacking Termux packages
|
||||
dpkg -x $__Android_Cross_Dir/deb/libicu_60.2_$__AndroidArch.deb $__Android_Cross_Dir/tmp/$__AndroidArch/
|
||||
dpkg -x $__Android_Cross_Dir/deb/libicu-dev_60.2_$__AndroidArch.deb $__Android_Cross_Dir/tmp/$__AndroidArch/
|
||||
dpkg -x $__Android_Cross_Dir/deb/libandroid-glob-dev_0.4_$__AndroidArch.deb $__Android_Cross_Dir/tmp/$__AndroidArch/
|
||||
dpkg -x $__Android_Cross_Dir/deb/libandroid-glob_0.4_$__AndroidArch.deb $__Android_Cross_Dir/tmp/$__AndroidArch/
|
||||
dpkg -x $__Android_Cross_Dir/deb/libandroid-support-dev_22_$__AndroidArch.deb $__Android_Cross_Dir/tmp/$__AndroidArch/
|
||||
dpkg -x $__Android_Cross_Dir/deb/libandroid-support_22_$__AndroidArch.deb $__Android_Cross_Dir/tmp/$__AndroidArch/
|
||||
dpkg -x $__Android_Cross_Dir/deb/liblzma-dev_5.2.3_$__AndroidArch.deb $__Android_Cross_Dir/tmp/$__AndroidArch/
|
||||
dpkg -x $__Android_Cross_Dir/deb/liblzma_5.2.3_$__AndroidArch.deb $__Android_Cross_Dir/tmp/$__AndroidArch/
|
||||
dpkg -x $__Android_Cross_Dir/deb/libunwind-dev_1.2.20170304_$__AndroidArch.deb $__Android_Cross_Dir/tmp/$__AndroidArch/
|
||||
dpkg -x $__Android_Cross_Dir/deb/libunwind_1.2.20170304_$__AndroidArch.deb $__Android_Cross_Dir/tmp/$__AndroidArch/
|
||||
|
||||
cp -R $__Android_Cross_Dir/tmp/$__AndroidArch/data/data/com.termux/files/usr/* $__ToolchainDir/sysroot/usr/
|
||||
|
||||
# Generate platform file for build.sh script to assign to __DistroRid
|
||||
echo "Generating platform file..."
|
||||
|
||||
echo "RID=android.21-arm64" > $__ToolchainDir/sysroot/android_platform
|
||||
echo Now run:
|
||||
echo CONFIG_DIR=\`realpath cross/android/$__BuildArch\` ROOTFS_DIR=\`realpath $__ToolchainDir/sysroot\` ./build.sh cross $__BuildArch skipgenerateversion skipnuget cmakeargs -DENABLE_LLDBPLUGIN=0
|
||||
|
||||
@@ -1,234 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
usage()
|
||||
{
|
||||
echo "Usage: $0 [BuildArch] [LinuxCodeName] [lldbx.y] [--skipunmount] --rootfsdir <directory>]"
|
||||
echo "BuildArch can be: arm(default), armel, arm64, x86"
|
||||
echo "LinuxCodeName - optional, Code name for Linux, can be: trusty, xenial(default), zesty, bionic, alpine. If BuildArch is armel, LinuxCodeName is jessie(default) or tizen."
|
||||
echo "lldbx.y - optional, LLDB version, can be: lldb3.9(default), lldb4.0, lldb5.0, lldb6.0 no-lldb. Ignored for alpine"
|
||||
echo "--skipunmount - optional, will skip the unmount of rootfs folder."
|
||||
exit 1
|
||||
}
|
||||
|
||||
__LinuxCodeName=xenial
|
||||
__CrossDir=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
|
||||
__InitialDir=$PWD
|
||||
__BuildArch=arm
|
||||
__UbuntuArch=armhf
|
||||
__UbuntuRepo="http://ports.ubuntu.com/"
|
||||
__LLDB_Package="liblldb-3.9-dev"
|
||||
__SkipUnmount=0
|
||||
|
||||
# base development support
|
||||
__UbuntuPackages="build-essential"
|
||||
|
||||
__AlpinePackages="alpine-base"
|
||||
__AlpinePackages+=" build-base"
|
||||
__AlpinePackages+=" linux-headers"
|
||||
__AlpinePackages+=" lldb-dev"
|
||||
__AlpinePackages+=" llvm-dev"
|
||||
|
||||
# symlinks fixer
|
||||
__UbuntuPackages+=" symlinks"
|
||||
|
||||
# CoreCLR and CoreFX dependencies
|
||||
__UbuntuPackages+=" libicu-dev"
|
||||
__UbuntuPackages+=" liblttng-ust-dev"
|
||||
__UbuntuPackages+=" libunwind8-dev"
|
||||
|
||||
__AlpinePackages+=" gettext-dev"
|
||||
__AlpinePackages+=" icu-dev"
|
||||
__AlpinePackages+=" libunwind-dev"
|
||||
__AlpinePackages+=" lttng-ust-dev"
|
||||
|
||||
# CoreFX dependencies
|
||||
__UbuntuPackages+=" libcurl4-openssl-dev"
|
||||
__UbuntuPackages+=" libkrb5-dev"
|
||||
__UbuntuPackages+=" libssl-dev"
|
||||
__UbuntuPackages+=" zlib1g-dev"
|
||||
|
||||
__AlpinePackages+=" curl-dev"
|
||||
__AlpinePackages+=" krb5-dev"
|
||||
__AlpinePackages+=" openssl-dev"
|
||||
__AlpinePackages+=" zlib-dev"
|
||||
|
||||
__UnprocessedBuildArgs=
|
||||
while :; do
|
||||
if [ $# -le 0 ]; then
|
||||
break
|
||||
fi
|
||||
|
||||
lowerI="$(echo $1 | awk '{print tolower($0)}')"
|
||||
case $lowerI in
|
||||
-?|-h|--help)
|
||||
usage
|
||||
exit 1
|
||||
;;
|
||||
arm)
|
||||
__BuildArch=arm
|
||||
__UbuntuArch=armhf
|
||||
__AlpineArch=armhf
|
||||
__QEMUArch=arm
|
||||
;;
|
||||
arm64)
|
||||
__BuildArch=arm64
|
||||
__UbuntuArch=arm64
|
||||
__AlpineArch=aarch64
|
||||
__QEMUArch=aarch64
|
||||
;;
|
||||
armel)
|
||||
__BuildArch=armel
|
||||
__UbuntuArch=armel
|
||||
__UbuntuRepo="http://ftp.debian.org/debian/"
|
||||
__LinuxCodeName=jessie
|
||||
;;
|
||||
x86)
|
||||
__BuildArch=x86
|
||||
__UbuntuArch=i386
|
||||
__UbuntuRepo="http://archive.ubuntu.com/ubuntu/"
|
||||
;;
|
||||
lldb3.6)
|
||||
__LLDB_Package="lldb-3.6-dev"
|
||||
;;
|
||||
lldb3.8)
|
||||
__LLDB_Package="lldb-3.8-dev"
|
||||
;;
|
||||
lldb3.9)
|
||||
__LLDB_Package="liblldb-3.9-dev"
|
||||
;;
|
||||
lldb4.0)
|
||||
__LLDB_Package="liblldb-4.0-dev"
|
||||
;;
|
||||
lldb5.0)
|
||||
__LLDB_Package="liblldb-5.0-dev"
|
||||
;;
|
||||
lldb6.0)
|
||||
__LLDB_Package="liblldb-6.0-dev"
|
||||
;;
|
||||
no-lldb)
|
||||
unset __LLDB_Package
|
||||
;;
|
||||
trusty) # Ubuntu 14.04
|
||||
if [ "$__LinuxCodeName" != "jessie" ]; then
|
||||
__LinuxCodeName=trusty
|
||||
fi
|
||||
;;
|
||||
xenial) # Ubuntu 16.04
|
||||
if [ "$__LinuxCodeName" != "jessie" ]; then
|
||||
__LinuxCodeName=xenial
|
||||
fi
|
||||
;;
|
||||
zesty) # Ubuntu 17.04
|
||||
if [ "$__LinuxCodeName" != "jessie" ]; then
|
||||
__LinuxCodeName=zesty
|
||||
fi
|
||||
;;
|
||||
bionic) # Ubuntu 18.04
|
||||
if [ "$__LinuxCodeName" != "jessie" ]; then
|
||||
__LinuxCodeName=bionic
|
||||
fi
|
||||
;;
|
||||
jessie) # Debian 8
|
||||
__LinuxCodeName=jessie
|
||||
__UbuntuRepo="http://ftp.debian.org/debian/"
|
||||
;;
|
||||
stretch) # Debian 9
|
||||
__LinuxCodeName=stretch
|
||||
__UbuntuRepo="http://ftp.debian.org/debian/"
|
||||
__LLDB_Package="liblldb-6.0-dev"
|
||||
;;
|
||||
buster) # Debian 10
|
||||
__LinuxCodeName=buster
|
||||
__UbuntuRepo="http://ftp.debian.org/debian/"
|
||||
__LLDB_Package="liblldb-6.0-dev"
|
||||
;;
|
||||
tizen)
|
||||
if [ "$__BuildArch" != "armel" ]; then
|
||||
echo "Tizen is available only for armel."
|
||||
usage;
|
||||
exit 1;
|
||||
fi
|
||||
__LinuxCodeName=
|
||||
__UbuntuRepo=
|
||||
__Tizen=tizen
|
||||
;;
|
||||
alpine)
|
||||
__LinuxCodeName=alpine
|
||||
__UbuntuRepo=
|
||||
;;
|
||||
--skipunmount)
|
||||
__SkipUnmount=1
|
||||
;;
|
||||
--rootfsdir|-rootfsdir)
|
||||
shift
|
||||
__RootfsDir=$1
|
||||
;;
|
||||
*)
|
||||
__UnprocessedBuildArgs="$__UnprocessedBuildArgs $1"
|
||||
;;
|
||||
esac
|
||||
|
||||
shift
|
||||
done
|
||||
|
||||
if [ "$__BuildArch" == "armel" ]; then
|
||||
__LLDB_Package="lldb-3.5-dev"
|
||||
fi
|
||||
__UbuntuPackages+=" ${__LLDB_Package:-}"
|
||||
|
||||
if [ -z "$__RootfsDir" ] && [ ! -z "$ROOTFS_DIR" ]; then
|
||||
__RootfsDir=$ROOTFS_DIR
|
||||
fi
|
||||
|
||||
if [ -z "$__RootfsDir" ]; then
|
||||
__RootfsDir="$__CrossDir/../../../.tools/rootfs/$__BuildArch"
|
||||
fi
|
||||
|
||||
if [ -d "$__RootfsDir" ]; then
|
||||
if [ $__SkipUnmount == 0 ]; then
|
||||
umount $__RootfsDir/*
|
||||
fi
|
||||
rm -rf $__RootfsDir
|
||||
fi
|
||||
|
||||
if [[ "$__LinuxCodeName" == "alpine" ]]; then
|
||||
__ApkToolsVersion=2.9.1
|
||||
__AlpineVersion=3.7
|
||||
__ApkToolsDir=$(mktemp -d)
|
||||
wget https://github.com/alpinelinux/apk-tools/releases/download/v$__ApkToolsVersion/apk-tools-$__ApkToolsVersion-x86_64-linux.tar.gz -P $__ApkToolsDir
|
||||
tar -xf $__ApkToolsDir/apk-tools-$__ApkToolsVersion-x86_64-linux.tar.gz -C $__ApkToolsDir
|
||||
mkdir -p $__RootfsDir/usr/bin
|
||||
cp -v /usr/bin/qemu-$__QEMUArch-static $__RootfsDir/usr/bin
|
||||
$__ApkToolsDir/apk-tools-$__ApkToolsVersion/apk \
|
||||
-X http://dl-cdn.alpinelinux.org/alpine/v$__AlpineVersion/main \
|
||||
-X http://dl-cdn.alpinelinux.org/alpine/v$__AlpineVersion/community \
|
||||
-X http://dl-cdn.alpinelinux.org/alpine/edge/testing \
|
||||
-X http://dl-cdn.alpinelinux.org/alpine/edge/main \
|
||||
-U --allow-untrusted --root $__RootfsDir --arch $__AlpineArch --initdb \
|
||||
add $__AlpinePackages
|
||||
rm -r $__ApkToolsDir
|
||||
elif [[ -n $__LinuxCodeName ]]; then
|
||||
qemu-debootstrap --arch $__UbuntuArch $__LinuxCodeName $__RootfsDir $__UbuntuRepo
|
||||
cp $__CrossDir/$__BuildArch/sources.list.$__LinuxCodeName $__RootfsDir/etc/apt/sources.list
|
||||
chroot $__RootfsDir apt-get update
|
||||
chroot $__RootfsDir apt-get -f -y install
|
||||
chroot $__RootfsDir apt-get -y install $__UbuntuPackages
|
||||
chroot $__RootfsDir symlinks -cr /usr
|
||||
|
||||
if [ $__SkipUnmount == 0 ]; then
|
||||
umount $__RootfsDir/*
|
||||
fi
|
||||
|
||||
if [[ "$__BuildArch" == "arm" && "$__LinuxCodeName" == "trusty" ]]; then
|
||||
pushd $__RootfsDir
|
||||
patch -p1 < $__CrossDir/$__BuildArch/trusty.patch
|
||||
patch -p1 < $__CrossDir/$__BuildArch/trusty-lttng-2.4.patch
|
||||
popd
|
||||
fi
|
||||
elif [ "$__Tizen" == "tizen" ]; then
|
||||
ROOTFS_DIR=$__RootfsDir $__CrossDir/$__BuildArch/tizen-build-rootfs.sh
|
||||
else
|
||||
echo "Unsupported target platform."
|
||||
usage;
|
||||
exit 1
|
||||
fi
|
||||
@@ -1,119 +0,0 @@
|
||||
set(CROSS_ROOTFS $ENV{ROOTFS_DIR})
|
||||
|
||||
set(TARGET_ARCH_NAME $ENV{TARGET_BUILD_ARCH})
|
||||
set(CMAKE_SYSTEM_NAME Linux)
|
||||
set(CMAKE_SYSTEM_VERSION 1)
|
||||
|
||||
if(TARGET_ARCH_NAME STREQUAL "armel")
|
||||
set(CMAKE_SYSTEM_PROCESSOR armv7l)
|
||||
set(TOOLCHAIN "arm-linux-gnueabi")
|
||||
if("$ENV{__DistroRid}" MATCHES "tizen.*")
|
||||
set(TIZEN_TOOLCHAIN "armv7l-tizen-linux-gnueabi/6.2.1")
|
||||
endif()
|
||||
elseif(TARGET_ARCH_NAME STREQUAL "arm")
|
||||
set(CMAKE_SYSTEM_PROCESSOR armv7l)
|
||||
if(EXISTS ${CROSS_ROOTFS}/usr/lib/gcc/armv6-alpine-linux-musleabihf)
|
||||
set(TOOLCHAIN "armv6-alpine-linux-musleabihf")
|
||||
else()
|
||||
set(TOOLCHAIN "arm-linux-gnueabihf")
|
||||
endif()
|
||||
elseif(TARGET_ARCH_NAME STREQUAL "arm64")
|
||||
set(CMAKE_SYSTEM_PROCESSOR aarch64)
|
||||
if(EXISTS ${CROSS_ROOTFS}/usr/lib/gcc/aarch64-alpine-linux-musl)
|
||||
set(TOOLCHAIN "aarch64-alpine-linux-musl")
|
||||
else()
|
||||
set(TOOLCHAIN "aarch64-linux-gnu")
|
||||
endif()
|
||||
elseif(TARGET_ARCH_NAME STREQUAL "x86")
|
||||
set(CMAKE_SYSTEM_PROCESSOR i686)
|
||||
set(TOOLCHAIN "i686-linux-gnu")
|
||||
else()
|
||||
message(FATAL_ERROR "Arch is ${TARGET_ARCH_NAME}. Only armel, arm, arm64 and x86 are supported!")
|
||||
endif()
|
||||
|
||||
if(DEFINED ENV{TOOLCHAIN})
|
||||
set(TOOLCHAIN $ENV{TOOLCHAIN})
|
||||
endif()
|
||||
|
||||
# Specify include paths
|
||||
if(TARGET_ARCH_NAME STREQUAL "armel")
|
||||
if(DEFINED TIZEN_TOOLCHAIN)
|
||||
include_directories(SYSTEM ${CROSS_ROOTFS}/usr/lib/gcc/${TIZEN_TOOLCHAIN}/include/c++/)
|
||||
include_directories(SYSTEM ${CROSS_ROOTFS}/usr/lib/gcc/${TIZEN_TOOLCHAIN}/include/c++/armv7l-tizen-linux-gnueabi)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
set(CMAKE_SYSROOT "${CROSS_ROOTFS}")
|
||||
set(CMAKE_C_COMPILER_EXTERNAL_TOOLCHAIN "${CROSS_ROOTFS}/usr")
|
||||
set(CMAKE_CXX_COMPILER_EXTERNAL_TOOLCHAIN "${CROSS_ROOTFS}/usr")
|
||||
set(CMAKE_ASM_COMPILER_EXTERNAL_TOOLCHAIN "${CROSS_ROOTFS}/usr")
|
||||
|
||||
# Specify link flags
|
||||
|
||||
if(TARGET_ARCH_NAME STREQUAL "armel")
|
||||
if(DEFINED TIZEN_TOOLCHAIN) # For Tizen only
|
||||
add_link_options("-B${CROSS_ROOTFS}/usr/lib/gcc/${TIZEN_TOOLCHAIN}")
|
||||
add_link_options("-L${CROSS_ROOTFS}/lib")
|
||||
add_link_options("-L${CROSS_ROOTFS}/usr/lib")
|
||||
add_link_options("-L${CROSS_ROOTFS}/usr/lib/gcc/${TIZEN_TOOLCHAIN}")
|
||||
endif()
|
||||
elseif(TARGET_ARCH_NAME STREQUAL "x86")
|
||||
add_link_options(-m32)
|
||||
endif()
|
||||
|
||||
# Specify compile options
|
||||
|
||||
if(TARGET_ARCH_NAME MATCHES "^(arm|armel|arm64)$")
|
||||
set(CMAKE_C_COMPILER_TARGET ${TOOLCHAIN})
|
||||
set(CMAKE_CXX_COMPILER_TARGET ${TOOLCHAIN})
|
||||
set(CMAKE_ASM_COMPILER_TARGET ${TOOLCHAIN})
|
||||
endif()
|
||||
|
||||
if(TARGET_ARCH_NAME MATCHES "^(arm|armel)$")
|
||||
add_compile_options(-mthumb)
|
||||
add_compile_options(-mfpu=vfpv3)
|
||||
if(TARGET_ARCH_NAME STREQUAL "armel")
|
||||
add_compile_options(-mfloat-abi=softfp)
|
||||
if(DEFINED TIZEN_TOOLCHAIN)
|
||||
add_compile_options(-Wno-deprecated-declarations) # compile-time option
|
||||
add_compile_options(-D__extern_always_inline=inline) # compile-time option
|
||||
endif()
|
||||
endif()
|
||||
elseif(TARGET_ARCH_NAME STREQUAL "x86")
|
||||
add_compile_options(-m32)
|
||||
add_compile_options(-Wno-error=unused-command-line-argument)
|
||||
endif()
|
||||
|
||||
# Set LLDB include and library paths for builds that need lldb.
|
||||
if(TARGET_ARCH_NAME MATCHES "^(arm|armel|x86)$")
|
||||
if(TARGET_ARCH_NAME STREQUAL "x86")
|
||||
set(LLVM_CROSS_DIR "$ENV{LLVM_CROSS_HOME}")
|
||||
else() # arm/armel case
|
||||
set(LLVM_CROSS_DIR "$ENV{LLVM_ARM_HOME}")
|
||||
endif()
|
||||
if(LLVM_CROSS_DIR)
|
||||
set(WITH_LLDB_LIBS "${LLVM_CROSS_DIR}/lib/" CACHE STRING "")
|
||||
set(WITH_LLDB_INCLUDES "${LLVM_CROSS_DIR}/include" CACHE STRING "")
|
||||
set(LLDB_H "${WITH_LLDB_INCLUDES}" CACHE STRING "")
|
||||
set(LLDB "${LLVM_CROSS_DIR}/lib/liblldb.so" CACHE STRING "")
|
||||
else()
|
||||
if(TARGET_ARCH_NAME STREQUAL "x86")
|
||||
set(WITH_LLDB_LIBS "${CROSS_ROOTFS}/usr/lib/i386-linux-gnu" CACHE STRING "")
|
||||
set(CHECK_LLVM_DIR "${CROSS_ROOTFS}/usr/lib/llvm-3.8/include")
|
||||
if(EXISTS "${CHECK_LLVM_DIR}" AND IS_DIRECTORY "${CHECK_LLVM_DIR}")
|
||||
set(WITH_LLDB_INCLUDES "${CHECK_LLVM_DIR}")
|
||||
else()
|
||||
set(WITH_LLDB_INCLUDES "${CROSS_ROOTFS}/usr/lib/llvm-3.6/include")
|
||||
endif()
|
||||
else() # arm/armel case
|
||||
set(WITH_LLDB_LIBS "${CROSS_ROOTFS}/usr/lib/${TOOLCHAIN}" CACHE STRING "")
|
||||
set(WITH_LLDB_INCLUDES "${CROSS_ROOTFS}/usr/lib/llvm-3.6/include" CACHE STRING "")
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY)
|
||||
@@ -1,11 +0,0 @@
|
||||
deb http://archive.ubuntu.com/ubuntu/ bionic main restricted universe
|
||||
deb-src http://archive.ubuntu.com/ubuntu/ bionic main restricted universe
|
||||
|
||||
deb http://archive.ubuntu.com/ubuntu/ bionic-updates main restricted universe
|
||||
deb-src http://archive.ubuntu.com/ubuntu/ bionic-updates main restricted universe
|
||||
|
||||
deb http://archive.ubuntu.com/ubuntu/ bionic-backports main restricted
|
||||
deb-src http://archive.ubuntu.com/ubuntu/ bionic-backports main restricted
|
||||
|
||||
deb http://archive.ubuntu.com/ubuntu/ bionic-security main restricted universe multiverse
|
||||
deb-src http://archive.ubuntu.com/ubuntu/ bionic-security main restricted universe multiverse
|
||||
@@ -1,11 +0,0 @@
|
||||
deb http://archive.ubuntu.com/ubuntu/ trusty main restricted universe
|
||||
deb-src http://archive.ubuntu.com/ubuntu/ trusty main restricted universe
|
||||
|
||||
deb http://archive.ubuntu.com/ubuntu/ trusty-updates main restricted universe
|
||||
deb-src http://archive.ubuntu.com/ubuntu/ trusty-updates main restricted universe
|
||||
|
||||
deb http://archive.ubuntu.com/ubuntu/ trusty-backports main restricted
|
||||
deb-src http://archive.ubuntu.com/ubuntu/ trusty-backports main restricted
|
||||
|
||||
deb http://archive.ubuntu.com/ubuntu/ trusty-security main restricted universe multiverse
|
||||
deb-src http://archive.ubuntu.com/ubuntu/ trusty-security main restricted universe multiverse
|
||||
@@ -1,11 +0,0 @@
|
||||
deb http://archive.ubuntu.com/ubuntu/ xenial main restricted universe
|
||||
deb-src http://archive.ubuntu.com/ubuntu/ xenial main restricted universe
|
||||
|
||||
deb http://archive.ubuntu.com/ubuntu/ xenial-updates main restricted universe
|
||||
deb-src http://archive.ubuntu.com/ubuntu/ xenial-updates main restricted universe
|
||||
|
||||
deb http://archive.ubuntu.com/ubuntu/ xenial-backports main restricted
|
||||
deb-src http://archive.ubuntu.com/ubuntu/ xenial-backports main restricted
|
||||
|
||||
deb http://archive.ubuntu.com/ubuntu/ xenial-security main restricted universe multiverse
|
||||
deb-src http://archive.ubuntu.com/ubuntu/ xenial-security main restricted universe multiverse
|
||||
@@ -1,38 +0,0 @@
|
||||
param (
|
||||
$darcVersion = $null,
|
||||
$versionEndpoint = "https://maestro-prod.westus2.cloudapp.azure.com/api/assets/darc-version?api-version=2019-01-16",
|
||||
$verbosity = "m",
|
||||
$toolpath = $null
|
||||
)
|
||||
|
||||
. $PSScriptRoot\tools.ps1
|
||||
|
||||
function InstallDarcCli ($darcVersion) {
|
||||
$darcCliPackageName = "microsoft.dotnet.darc"
|
||||
|
||||
$dotnetRoot = InitializeDotNetCli -install:$true
|
||||
$dotnet = "$dotnetRoot\dotnet.exe"
|
||||
$toolList = & "$dotnet" tool list -g
|
||||
|
||||
if ($toolList -like "*$darcCliPackageName*") {
|
||||
& "$dotnet" tool uninstall $darcCliPackageName -g
|
||||
}
|
||||
|
||||
# If the user didn't explicitly specify the darc version,
|
||||
# query the Maestro API for the correct version of darc to install.
|
||||
if (-not $darcVersion) {
|
||||
$darcVersion = $(Invoke-WebRequest -Uri $versionEndpoint -UseBasicParsing).Content
|
||||
}
|
||||
|
||||
$arcadeServicesSource = 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json'
|
||||
|
||||
Write-Host "Installing Darc CLI version $darcVersion..."
|
||||
Write-Host "You may need to restart your command window if this is the first dotnet tool you have installed."
|
||||
if (-not $toolpath) {
|
||||
& "$dotnet" tool install $darcCliPackageName --version $darcVersion --add-source "$arcadeServicesSource" -v $verbosity -g
|
||||
}else {
|
||||
& "$dotnet" tool install $darcCliPackageName --version $darcVersion --add-source "$arcadeServicesSource" -v $verbosity --tool-path "$toolpath"
|
||||
}
|
||||
}
|
||||
|
||||
InstallDarcCli $darcVersion
|
||||
@@ -1,82 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
source="${BASH_SOURCE[0]}"
|
||||
darcVersion=''
|
||||
versionEndpoint="https://maestro-prod.westus2.cloudapp.azure.com/api/assets/darc-version?api-version=2019-01-16"
|
||||
verbosity=m
|
||||
|
||||
while [[ $# > 0 ]]; do
|
||||
opt="$(echo "$1" | awk '{print tolower($0)}')"
|
||||
case "$opt" in
|
||||
--darcversion)
|
||||
darcVersion=$2
|
||||
shift
|
||||
;;
|
||||
--versionendpoint)
|
||||
versionEndpoint=$2
|
||||
shift
|
||||
;;
|
||||
--verbosity)
|
||||
verbosity=$2
|
||||
shift
|
||||
;;
|
||||
--toolpath)
|
||||
toolpath=$2
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
echo "Invalid argument: $1"
|
||||
usage
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
shift
|
||||
done
|
||||
|
||||
# resolve $source until the file is no longer a symlink
|
||||
while [[ -h "$source" ]]; do
|
||||
scriptroot="$( cd -P "$( dirname "$source" )" && pwd )"
|
||||
source="$(readlink "$source")"
|
||||
# if $source was a relative symlink, we need to resolve it relative to the path where the
|
||||
# symlink file was located
|
||||
[[ $source != /* ]] && source="$scriptroot/$source"
|
||||
done
|
||||
scriptroot="$( cd -P "$( dirname "$source" )" && pwd )"
|
||||
|
||||
. "$scriptroot/tools.sh"
|
||||
|
||||
if [ -z "$darcVersion" ]; then
|
||||
darcVersion=$(curl -X GET "$versionEndpoint" -H "accept: text/plain")
|
||||
fi
|
||||
|
||||
function InstallDarcCli {
|
||||
local darc_cli_package_name="microsoft.dotnet.darc"
|
||||
|
||||
InitializeDotNetCli
|
||||
local dotnet_root=$_InitializeDotNetCli
|
||||
|
||||
if [ -z "$toolpath" ]; then
|
||||
local tool_list=$($dotnet_root/dotnet tool list -g)
|
||||
if [[ $tool_list = *$darc_cli_package_name* ]]; then
|
||||
echo $($dotnet_root/dotnet tool uninstall $darc_cli_package_name -g)
|
||||
fi
|
||||
else
|
||||
local tool_list=$($dotnet_root/dotnet tool list --tool-path "$toolpath")
|
||||
if [[ $tool_list = *$darc_cli_package_name* ]]; then
|
||||
echo $($dotnet_root/dotnet tool uninstall $darc_cli_package_name --tool-path "$toolpath")
|
||||
fi
|
||||
fi
|
||||
|
||||
local arcadeServicesSource="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json"
|
||||
|
||||
echo "Installing Darc CLI version $darcVersion..."
|
||||
echo "You may need to restart your command shell if this is the first dotnet tool you have installed."
|
||||
if [ -z "$toolpath" ]; then
|
||||
echo $($dotnet_root/dotnet tool install $darc_cli_package_name --version $darcVersion --add-source "$arcadeServicesSource" -v $verbosity -g)
|
||||
else
|
||||
echo $($dotnet_root/dotnet tool install $darc_cli_package_name --version $darcVersion --add-source "$arcadeServicesSource" -v $verbosity --tool-path "$toolpath")
|
||||
fi
|
||||
}
|
||||
|
||||
InstallDarcCli
|
||||
@@ -1,2 +0,0 @@
|
||||
@echo off
|
||||
powershell -ExecutionPolicy ByPass -NoProfile -command "& """%~dp0dotnet-install.ps1""" %*"
|
||||
Vendored
-29
@@ -1,29 +0,0 @@
|
||||
[CmdletBinding(PositionalBinding=$false)]
|
||||
Param(
|
||||
[string] $verbosity = "minimal",
|
||||
[string] $architecture = "",
|
||||
[string] $version = "Latest",
|
||||
[string] $runtime = "dotnet",
|
||||
[string] $RuntimeSourceFeed = "",
|
||||
[string] $RuntimeSourceFeedKey = ""
|
||||
)
|
||||
|
||||
. $PSScriptRoot\tools.ps1
|
||||
|
||||
$dotnetRoot = Join-Path $RepoRoot ".dotnet"
|
||||
|
||||
$installdir = $dotnetRoot
|
||||
try {
|
||||
if ($architecture -and $architecture.Trim() -eq "x86") {
|
||||
$installdir = Join-Path $installdir "x86"
|
||||
}
|
||||
InstallDotNet $installdir $version $architecture $runtime $true -RuntimeSourceFeed $RuntimeSourceFeed -RuntimeSourceFeedKey $RuntimeSourceFeedKey
|
||||
}
|
||||
catch {
|
||||
Write-Host $_
|
||||
Write-Host $_.Exception
|
||||
Write-Host $_.ScriptStackTrace
|
||||
ExitWithExitCode 1
|
||||
}
|
||||
|
||||
ExitWithExitCode 0
|
||||
Vendored
-88
@@ -1,88 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
source="${BASH_SOURCE[0]}"
|
||||
# resolve $source until the file is no longer a symlink
|
||||
while [[ -h "$source" ]]; do
|
||||
scriptroot="$( cd -P "$( dirname "$source" )" && pwd )"
|
||||
source="$(readlink "$source")"
|
||||
# if $source was a relative symlink, we need to resolve it relative to the path where the
|
||||
# symlink file was located
|
||||
[[ $source != /* ]] && source="$scriptroot/$source"
|
||||
done
|
||||
scriptroot="$( cd -P "$( dirname "$source" )" && pwd )"
|
||||
|
||||
version='Latest'
|
||||
architecture=''
|
||||
runtime='dotnet'
|
||||
runtimeSourceFeed=''
|
||||
runtimeSourceFeedKey=''
|
||||
while [[ $# > 0 ]]; do
|
||||
opt="$(echo "$1" | awk '{print tolower($0)}')"
|
||||
case "$opt" in
|
||||
-version|-v)
|
||||
shift
|
||||
version="$1"
|
||||
;;
|
||||
-architecture|-a)
|
||||
shift
|
||||
architecture="$1"
|
||||
;;
|
||||
-runtime|-r)
|
||||
shift
|
||||
runtime="$1"
|
||||
;;
|
||||
-runtimesourcefeed)
|
||||
shift
|
||||
runtimeSourceFeed="$1"
|
||||
;;
|
||||
-runtimesourcefeedkey)
|
||||
shift
|
||||
runtimeSourceFeedKey="$1"
|
||||
;;
|
||||
*)
|
||||
echo "Invalid argument: $1"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
shift
|
||||
done
|
||||
|
||||
# Use uname to determine what the CPU is.
|
||||
cpuname=$(uname -p)
|
||||
# Some Linux platforms report unknown for platform, but the arch for machine.
|
||||
if [[ "$cpuname" == "unknown" ]]; then
|
||||
cpuname=$(uname -m)
|
||||
fi
|
||||
|
||||
case $cpuname in
|
||||
aarch64)
|
||||
buildarch=arm64
|
||||
;;
|
||||
amd64|x86_64)
|
||||
buildarch=x64
|
||||
;;
|
||||
armv7l)
|
||||
buildarch=arm
|
||||
;;
|
||||
i686)
|
||||
buildarch=x86
|
||||
;;
|
||||
*)
|
||||
echo "Unknown CPU $cpuname detected, treating it as x64"
|
||||
buildarch=x64
|
||||
;;
|
||||
esac
|
||||
|
||||
. "$scriptroot/tools.sh"
|
||||
dotnetRoot="$repo_root/.dotnet"
|
||||
if [[ $architecture != "" ]] && [[ $architecture != $buildarch ]]; then
|
||||
dotnetRoot="$dotnetRoot/$architecture"
|
||||
fi
|
||||
|
||||
InstallDotNet $dotnetRoot $version "$architecture" $runtime true $runtimeSourceFeed $runtimeSourceFeedKey || {
|
||||
local exit_code=$?
|
||||
echo "dotnet-install.sh failed (exit code '$exit_code')." >&2
|
||||
ExitWithExitCode $exit_code
|
||||
}
|
||||
|
||||
ExitWithExitCode 0
|
||||
@@ -1,6 +0,0 @@
|
||||
param(
|
||||
[string] $token
|
||||
)
|
||||
|
||||
Write-Host "##vso[task.setvariable variable=VSS_NUGET_ACCESSTOKEN]$token"
|
||||
Write-Host "##vso[task.setvariable variable=VSS_NUGET_URI_PREFIXES]https://dnceng.pkgs.visualstudio.com/;https://pkgs.dev.azure.com/dnceng/;https://devdiv.pkgs.visualstudio.com/;https://pkgs.dev.azure.com/devdiv/"
|
||||
@@ -1,87 +0,0 @@
|
||||
Param(
|
||||
[Parameter(Mandatory=$true)][string] $barToken, # Token generated at https://maestro-prod.westus2.cloudapp.azure.com/Account/Tokens
|
||||
[Parameter(Mandatory=$true)][string] $gitHubPat, # GitHub personal access token from https://github.com/settings/tokens (no auth scopes needed)
|
||||
[Parameter(Mandatory=$true)][string] $azdoPat, # Azure Dev Ops tokens from https://dev.azure.com/dnceng/_details/security/tokens (code read scope needed)
|
||||
[Parameter(Mandatory=$true)][string] $outputFolder, # Where the graphviz.txt file will be created
|
||||
[string] $darcVersion = '1.1.0-beta.19175.6', # darc's version
|
||||
[string] $graphvizVersion = '2.38', # GraphViz version
|
||||
[switch] $includeToolset # Whether the graph should include toolset dependencies or not. i.e. arcade, optimization. For more about
|
||||
# toolset dependencies see https://github.com/dotnet/arcade/blob/master/Documentation/Darc.md#toolset-vs-product-dependencies
|
||||
)
|
||||
|
||||
$ErrorActionPreference = "Stop"
|
||||
. $PSScriptRoot\tools.ps1
|
||||
|
||||
Import-Module -Name (Join-Path $PSScriptRoot "native\CommonLibrary.psm1")
|
||||
|
||||
function CheckExitCode ([string]$stage)
|
||||
{
|
||||
$exitCode = $LASTEXITCODE
|
||||
if ($exitCode -ne 0) {
|
||||
Write-Host "Something failed in stage: '$stage'. Check for errors above. Exiting now..."
|
||||
ExitWithExitCode $exitCode
|
||||
}
|
||||
}
|
||||
|
||||
try {
|
||||
Push-Location $PSScriptRoot
|
||||
|
||||
Write-Host "Installing darc..."
|
||||
. .\darc-init.ps1 -darcVersion $darcVersion
|
||||
CheckExitCode "Running darc-init"
|
||||
|
||||
$engCommonBaseDir = Join-Path $PSScriptRoot "native\"
|
||||
$graphvizInstallDir = CommonLibrary\Get-NativeInstallDirectory
|
||||
$nativeToolBaseUri = "https://netcorenativeassets.blob.core.windows.net/resource-packages/external"
|
||||
$installBin = Join-Path $graphvizInstallDir "bin"
|
||||
|
||||
Write-Host "Installing dot..."
|
||||
.\native\install-tool.ps1 -ToolName graphviz -InstallPath $installBin -BaseUri $nativeToolBaseUri -CommonLibraryDirectory $engCommonBaseDir -Version $graphvizVersion -Verbose
|
||||
|
||||
$darcExe = "$env:USERPROFILE\.dotnet\tools"
|
||||
$darcExe = Resolve-Path "$darcExe\darc.exe"
|
||||
|
||||
Create-Directory $outputFolder
|
||||
|
||||
# Generate 3 graph descriptions:
|
||||
# 1. Flat with coherency information
|
||||
# 2. Graphviz (dot) file
|
||||
# 3. Standard dependency graph
|
||||
$graphVizFilePath = "$outputFolder\graphviz.txt"
|
||||
$graphVizImageFilePath = "$outputFolder\graph.png"
|
||||
$normalGraphFilePath = "$outputFolder\graph-full.txt"
|
||||
$flatGraphFilePath = "$outputFolder\graph-flat.txt"
|
||||
$baseOptions = @( "--github-pat", "$gitHubPat", "--azdev-pat", "$azdoPat", "--password", "$barToken" )
|
||||
|
||||
if ($includeToolset) {
|
||||
Write-Host "Toolsets will be included in the graph..."
|
||||
$baseOptions += @( "--include-toolset" )
|
||||
}
|
||||
|
||||
Write-Host "Generating standard dependency graph..."
|
||||
& "$darcExe" get-dependency-graph @baseOptions --output-file $normalGraphFilePath
|
||||
CheckExitCode "Generating normal dependency graph"
|
||||
|
||||
Write-Host "Generating flat dependency graph and graphviz file..."
|
||||
& "$darcExe" get-dependency-graph @baseOptions --flat --coherency --graphviz $graphVizFilePath --output-file $flatGraphFilePath
|
||||
CheckExitCode "Generating flat and graphviz dependency graph"
|
||||
|
||||
Write-Host "Generating graph image $graphVizFilePath"
|
||||
$dotFilePath = Join-Path $installBin "graphviz\$graphvizVersion\release\bin\dot.exe"
|
||||
& "$dotFilePath" -Tpng -o"$graphVizImageFilePath" "$graphVizFilePath"
|
||||
CheckExitCode "Generating graphviz image"
|
||||
|
||||
Write-Host "'$graphVizFilePath', '$flatGraphFilePath', '$normalGraphFilePath' and '$graphVizImageFilePath' created!"
|
||||
}
|
||||
catch {
|
||||
if (!$includeToolset) {
|
||||
Write-Host "This might be a toolset repo which includes only toolset dependencies. " -NoNewline -ForegroundColor Yellow
|
||||
Write-Host "Since -includeToolset is not set there is no graph to create. Include -includeToolset and try again..." -ForegroundColor Yellow
|
||||
}
|
||||
Write-Host $_
|
||||
Write-Host $_.Exception
|
||||
Write-Host $_.ScriptStackTrace
|
||||
ExitWithExitCode 1
|
||||
} finally {
|
||||
Pop-Location
|
||||
}
|
||||
@@ -1,26 +0,0 @@
|
||||
<Project Sdk="Microsoft.DotNet.Helix.Sdk" DefaultTargets="Test">
|
||||
|
||||
<PropertyGroup>
|
||||
<Language>msbuild</Language>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<HelixCorrelationPayload Include="$(CorrelationPayloadDirectory)">
|
||||
<PayloadDirectory>%(Identity)</PayloadDirectory>
|
||||
</HelixCorrelationPayload>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<HelixWorkItem Include="WorkItem" Condition="'$(WorkItemDirectory)' != ''">
|
||||
<PayloadDirectory>$(WorkItemDirectory)</PayloadDirectory>
|
||||
<Command>$(WorkItemCommand)</Command>
|
||||
<Timeout Condition="'$(WorkItemTimeout)' != ''">$(WorkItemTimeout)</Timeout>
|
||||
</HelixWorkItem>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<XUnitProject Include="$(XUnitProjects.Split(';'))">
|
||||
<Arguments />
|
||||
</XUnitProject>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
@@ -1,3 +0,0 @@
|
||||
@echo off
|
||||
powershell -NoProfile -NoLogo -ExecutionPolicy ByPass -command "& """%~dp0init-tools-native.ps1""" %*"
|
||||
exit /b %ErrorLevel%
|
||||
@@ -1,148 +0,0 @@
|
||||
<#
|
||||
.SYNOPSIS
|
||||
Entry point script for installing native tools
|
||||
|
||||
.DESCRIPTION
|
||||
Reads $RepoRoot\global.json file to determine native assets to install
|
||||
and executes installers for those tools
|
||||
|
||||
.PARAMETER BaseUri
|
||||
Base file directory or Url from which to acquire tool archives
|
||||
|
||||
.PARAMETER InstallDirectory
|
||||
Directory to install native toolset. This is a command-line override for the default
|
||||
Install directory precedence order:
|
||||
- InstallDirectory command-line override
|
||||
- NETCOREENG_INSTALL_DIRECTORY environment variable
|
||||
- (default) %USERPROFILE%/.netcoreeng/native
|
||||
|
||||
.PARAMETER Clean
|
||||
Switch specifying to not install anything, but cleanup native asset folders
|
||||
|
||||
.PARAMETER Force
|
||||
Clean and then install tools
|
||||
|
||||
.PARAMETER DownloadRetries
|
||||
Total number of retry attempts
|
||||
|
||||
.PARAMETER RetryWaitTimeInSeconds
|
||||
Wait time between retry attempts in seconds
|
||||
|
||||
.PARAMETER GlobalJsonFile
|
||||
File path to global.json file
|
||||
|
||||
.NOTES
|
||||
#>
|
||||
[CmdletBinding(PositionalBinding=$false)]
|
||||
Param (
|
||||
[string] $BaseUri = "https://netcorenativeassets.blob.core.windows.net/resource-packages/external",
|
||||
[string] $InstallDirectory,
|
||||
[switch] $Clean = $False,
|
||||
[switch] $Force = $False,
|
||||
[int] $DownloadRetries = 5,
|
||||
[int] $RetryWaitTimeInSeconds = 30,
|
||||
[string] $GlobalJsonFile
|
||||
)
|
||||
|
||||
if (!$GlobalJsonFile) {
|
||||
$GlobalJsonFile = Join-Path (Get-Item $PSScriptRoot).Parent.Parent.FullName "global.json"
|
||||
}
|
||||
|
||||
Set-StrictMode -version 2.0
|
||||
$ErrorActionPreference="Stop"
|
||||
|
||||
Import-Module -Name (Join-Path $PSScriptRoot "native\CommonLibrary.psm1")
|
||||
|
||||
try {
|
||||
# Define verbose switch if undefined
|
||||
$Verbose = $VerbosePreference -Eq "Continue"
|
||||
|
||||
$EngCommonBaseDir = Join-Path $PSScriptRoot "native\"
|
||||
$NativeBaseDir = $InstallDirectory
|
||||
if (!$NativeBaseDir) {
|
||||
$NativeBaseDir = CommonLibrary\Get-NativeInstallDirectory
|
||||
}
|
||||
$Env:CommonLibrary_NativeInstallDir = $NativeBaseDir
|
||||
$InstallBin = Join-Path $NativeBaseDir "bin"
|
||||
$InstallerPath = Join-Path $EngCommonBaseDir "install-tool.ps1"
|
||||
|
||||
# Process tools list
|
||||
Write-Host "Processing $GlobalJsonFile"
|
||||
If (-Not (Test-Path $GlobalJsonFile)) {
|
||||
Write-Host "Unable to find '$GlobalJsonFile'"
|
||||
exit 0
|
||||
}
|
||||
$NativeTools = Get-Content($GlobalJsonFile) -Raw |
|
||||
ConvertFrom-Json |
|
||||
Select-Object -Expand "native-tools" -ErrorAction SilentlyContinue
|
||||
if ($NativeTools) {
|
||||
$NativeTools.PSObject.Properties | ForEach-Object {
|
||||
$ToolName = $_.Name
|
||||
$ToolVersion = $_.Value
|
||||
$LocalInstallerArguments = @{ ToolName = "$ToolName" }
|
||||
$LocalInstallerArguments += @{ InstallPath = "$InstallBin" }
|
||||
$LocalInstallerArguments += @{ BaseUri = "$BaseUri" }
|
||||
$LocalInstallerArguments += @{ CommonLibraryDirectory = "$EngCommonBaseDir" }
|
||||
$LocalInstallerArguments += @{ Version = "$ToolVersion" }
|
||||
|
||||
if ($Verbose) {
|
||||
$LocalInstallerArguments += @{ Verbose = $True }
|
||||
}
|
||||
if (Get-Variable 'Force' -ErrorAction 'SilentlyContinue') {
|
||||
if($Force) {
|
||||
$LocalInstallerArguments += @{ Force = $True }
|
||||
}
|
||||
}
|
||||
if ($Clean) {
|
||||
$LocalInstallerArguments += @{ Clean = $True }
|
||||
}
|
||||
|
||||
Write-Verbose "Installing $ToolName version $ToolVersion"
|
||||
Write-Verbose "Executing '$InstallerPath $($LocalInstallerArguments.Keys.ForEach({"-$_ '$($LocalInstallerArguments.$_)'"}) -join ' ')'"
|
||||
& $InstallerPath @LocalInstallerArguments
|
||||
if ($LASTEXITCODE -Ne "0") {
|
||||
$errMsg = "$ToolName installation failed"
|
||||
if ((Get-Variable 'DoNotAbortNativeToolsInstallationOnFailure' -ErrorAction 'SilentlyContinue') -and $DoNotAbortNativeToolsInstallationOnFailure) {
|
||||
$showNativeToolsWarning = $true
|
||||
if ((Get-Variable 'DoNotDisplayNativeToolsInstallationWarnings' -ErrorAction 'SilentlyContinue') -and $DoNotDisplayNativeToolsInstallationWarnings) {
|
||||
$showNativeToolsWarning = $false
|
||||
}
|
||||
if ($showNativeToolsWarning) {
|
||||
Write-Warning $errMsg
|
||||
}
|
||||
$toolInstallationFailure = $true
|
||||
} else {
|
||||
Write-Error $errMsg
|
||||
exit 1
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ((Get-Variable 'toolInstallationFailure' -ErrorAction 'SilentlyContinue') -and $toolInstallationFailure) {
|
||||
exit 1
|
||||
}
|
||||
}
|
||||
else {
|
||||
Write-Host "No native tools defined in global.json"
|
||||
exit 0
|
||||
}
|
||||
|
||||
if ($Clean) {
|
||||
exit 0
|
||||
}
|
||||
if (Test-Path $InstallBin) {
|
||||
Write-Host "Native tools are available from" (Convert-Path -Path $InstallBin)
|
||||
Write-Host "##vso[task.prependpath]$(Convert-Path -Path $InstallBin)"
|
||||
return $InstallBin
|
||||
}
|
||||
else {
|
||||
Write-Error "Native tools install directory does not exist, installation failed"
|
||||
exit 1
|
||||
}
|
||||
exit 0
|
||||
}
|
||||
catch {
|
||||
Write-Host $_
|
||||
Write-Host $_.Exception
|
||||
exit 1
|
||||
}
|
||||
@@ -1,141 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
source="${BASH_SOURCE[0]}"
|
||||
scriptroot="$( cd -P "$( dirname "$source" )" && pwd )"
|
||||
|
||||
base_uri='https://netcorenativeassets.blob.core.windows.net/resource-packages/external'
|
||||
install_directory=''
|
||||
clean=false
|
||||
force=false
|
||||
download_retries=5
|
||||
retry_wait_time_seconds=30
|
||||
global_json_file="$(dirname "$(dirname "${scriptroot}")")/global.json"
|
||||
declare -A native_assets
|
||||
|
||||
. $scriptroot/native/common-library.sh
|
||||
|
||||
while (($# > 0)); do
|
||||
lowerI="$(echo $1 | awk '{print tolower($0)}')"
|
||||
case $lowerI in
|
||||
--baseuri)
|
||||
base_uri=$2
|
||||
shift 2
|
||||
;;
|
||||
--installdirectory)
|
||||
install_directory=$2
|
||||
shift 2
|
||||
;;
|
||||
--clean)
|
||||
clean=true
|
||||
shift 1
|
||||
;;
|
||||
--force)
|
||||
force=true
|
||||
shift 1
|
||||
;;
|
||||
--downloadretries)
|
||||
download_retries=$2
|
||||
shift 2
|
||||
;;
|
||||
--retrywaittimeseconds)
|
||||
retry_wait_time_seconds=$2
|
||||
shift 2
|
||||
;;
|
||||
--help)
|
||||
echo "Common settings:"
|
||||
echo " --installdirectory Directory to install native toolset."
|
||||
echo " This is a command-line override for the default"
|
||||
echo " Install directory precedence order:"
|
||||
echo " - InstallDirectory command-line override"
|
||||
echo " - NETCOREENG_INSTALL_DIRECTORY environment variable"
|
||||
echo " - (default) %USERPROFILE%/.netcoreeng/native"
|
||||
echo ""
|
||||
echo " --clean Switch specifying not to install anything, but cleanup native asset folders"
|
||||
echo " --force Clean and then install tools"
|
||||
echo " --help Print help and exit"
|
||||
echo ""
|
||||
echo "Advanced settings:"
|
||||
echo " --baseuri <value> Base URI for where to download native tools from"
|
||||
echo " --downloadretries <value> Number of times a download should be attempted"
|
||||
echo " --retrywaittimeseconds <value> Wait time between download attempts"
|
||||
echo ""
|
||||
exit 0
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
function ReadGlobalJsonNativeTools {
|
||||
# Get the native-tools section from the global.json.
|
||||
local native_tools_section=$(cat $global_json_file | awk '/"native-tools"/,/}/')
|
||||
# Only extract the contents of the object.
|
||||
local native_tools_list=$(echo $native_tools_section | awk -F"[{}]" '{print $2}')
|
||||
native_tools_list=${native_tools_list//[\" ]/}
|
||||
native_tools_list=$( echo "$native_tools_list" | sed 's/\s//g' | sed 's/,/\n/g' )
|
||||
|
||||
local old_IFS=$IFS
|
||||
while read -r line; do
|
||||
# Lines are of the form: 'tool:version'
|
||||
IFS=:
|
||||
while read -r key value; do
|
||||
native_assets[$key]=$value
|
||||
done <<< "$line"
|
||||
done <<< "$native_tools_list"
|
||||
IFS=$old_IFS
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
native_base_dir=$install_directory
|
||||
if [[ -z $install_directory ]]; then
|
||||
native_base_dir=$(GetNativeInstallDirectory)
|
||||
fi
|
||||
|
||||
install_bin="${native_base_dir}/bin"
|
||||
|
||||
ReadGlobalJsonNativeTools
|
||||
|
||||
if [[ ${#native_assets[@]} -eq 0 ]]; then
|
||||
echo "No native tools defined in global.json"
|
||||
exit 0;
|
||||
else
|
||||
native_installer_dir="$scriptroot/native"
|
||||
for tool in "${!native_assets[@]}"
|
||||
do
|
||||
tool_version=${native_assets[$tool]}
|
||||
installer_name="install-$tool.sh"
|
||||
installer_command="$native_installer_dir/$installer_name"
|
||||
installer_command+=" --baseuri $base_uri"
|
||||
installer_command+=" --installpath $install_bin"
|
||||
installer_command+=" --version $tool_version"
|
||||
echo $installer_command
|
||||
|
||||
if [[ $force = true ]]; then
|
||||
installer_command+=" --force"
|
||||
fi
|
||||
|
||||
if [[ $clean = true ]]; then
|
||||
installer_command+=" --clean"
|
||||
fi
|
||||
|
||||
$installer_command
|
||||
|
||||
if [[ $? != 0 ]]; then
|
||||
echo "Execution Failed" >&2
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
||||
if [[ $clean = true ]]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if [[ -d $install_bin ]]; then
|
||||
echo "Native tools are available from $install_bin"
|
||||
echo "##vso[task.prependpath]$install_bin"
|
||||
else
|
||||
echo "Native tools install directory does not exist, installation failed" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
exit 0
|
||||
@@ -1,135 +0,0 @@
|
||||
param(
|
||||
[Parameter(Mandatory=$true)][string] $Operation,
|
||||
[string] $AuthToken,
|
||||
[string] $CommitSha,
|
||||
[string] $RepoName,
|
||||
[switch] $IsFeedPrivate
|
||||
)
|
||||
|
||||
$ErrorActionPreference = "Stop"
|
||||
Set-StrictMode -Version 2.0
|
||||
|
||||
. $PSScriptRoot\tools.ps1
|
||||
|
||||
# Sets VSS_NUGET_EXTERNAL_FEED_ENDPOINTS based on the "darc-int-*" feeds defined in NuGet.config. This is needed
|
||||
# in build agents by CredProvider to authenticate the restore requests to internal feeds as specified in
|
||||
# https://github.com/microsoft/artifacts-credprovider/blob/0f53327cd12fd893d8627d7b08a2171bf5852a41/README.md#environment-variables. This should ONLY be called from identified
|
||||
# internal builds
|
||||
function SetupCredProvider {
|
||||
param(
|
||||
[string] $AuthToken
|
||||
)
|
||||
|
||||
# Install the Cred Provider NuGet plugin
|
||||
Write-Host "Setting up Cred Provider NuGet plugin in the agent..."
|
||||
Write-Host "Getting 'installcredprovider.ps1' from 'https://github.com/microsoft/artifacts-credprovider'..."
|
||||
|
||||
$url = 'https://raw.githubusercontent.com/microsoft/artifacts-credprovider/master/helpers/installcredprovider.ps1'
|
||||
|
||||
Write-Host "Writing the contents of 'installcredprovider.ps1' locally..."
|
||||
Invoke-WebRequest $url -OutFile installcredprovider.ps1
|
||||
|
||||
Write-Host "Installing plugin..."
|
||||
.\installcredprovider.ps1 -Force
|
||||
|
||||
Write-Host "Deleting local copy of 'installcredprovider.ps1'..."
|
||||
Remove-Item .\installcredprovider.ps1
|
||||
|
||||
if (-Not("$env:USERPROFILE\.nuget\plugins\netcore")) {
|
||||
Write-Host "CredProvider plugin was not installed correctly!"
|
||||
ExitWithExitCode 1
|
||||
}
|
||||
else {
|
||||
Write-Host "CredProvider plugin was installed correctly!"
|
||||
}
|
||||
|
||||
# Then, we set the 'VSS_NUGET_EXTERNAL_FEED_ENDPOINTS' environment variable to restore from the stable
|
||||
# feeds successfully
|
||||
|
||||
$nugetConfigPath = "$RepoRoot\NuGet.config"
|
||||
|
||||
if (-Not (Test-Path -Path $nugetConfigPath)) {
|
||||
Write-Host "NuGet.config file not found in repo's root!"
|
||||
ExitWithExitCode 1
|
||||
}
|
||||
|
||||
$endpoints = New-Object System.Collections.ArrayList
|
||||
$nugetConfigPackageSources = Select-Xml -Path $nugetConfigPath -XPath "//packageSources/add[contains(@key, 'darc-int-')]/@value" | foreach{$_.Node.Value}
|
||||
|
||||
if (($nugetConfigPackageSources | Measure-Object).Count -gt 0 ) {
|
||||
foreach ($stableRestoreResource in $nugetConfigPackageSources) {
|
||||
$trimmedResource = ([string]$stableRestoreResource).Trim()
|
||||
[void]$endpoints.Add(@{endpoint="$trimmedResource"; password="$AuthToken"})
|
||||
}
|
||||
}
|
||||
|
||||
if (($endpoints | Measure-Object).Count -gt 0) {
|
||||
# Create the JSON object. It should look like '{"endpointCredentials": [{"endpoint":"http://example.index.json", "username":"optional", "password":"accesstoken"}]}'
|
||||
$endpointCredentials = @{endpointCredentials=$endpoints} | ConvertTo-Json -Compress
|
||||
|
||||
# Create the environment variables the AzDo way
|
||||
Write-LoggingCommand -Area 'task' -Event 'setvariable' -Data $endpointCredentials -Properties @{
|
||||
'variable' = 'VSS_NUGET_EXTERNAL_FEED_ENDPOINTS'
|
||||
'issecret' = 'false'
|
||||
}
|
||||
|
||||
# We don't want sessions cached since we will be updating the endpoints quite frequently
|
||||
Write-LoggingCommand -Area 'task' -Event 'setvariable' -Data 'False' -Properties @{
|
||||
'variable' = 'NUGET_CREDENTIALPROVIDER_SESSIONTOKENCACHE_ENABLED'
|
||||
'issecret' = 'false'
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Write-Host "No internal endpoints found in NuGet.config"
|
||||
}
|
||||
}
|
||||
|
||||
#Workaround for https://github.com/microsoft/msbuild/issues/4430
|
||||
function InstallDotNetSdkAndRestoreArcade {
|
||||
$dotnetTempDir = "$RepoRoot\dotnet"
|
||||
$dotnetSdkVersion="2.1.507" # After experimentation we know this version works when restoring the SDK (compared to 3.0.*)
|
||||
$dotnet = "$dotnetTempDir\dotnet.exe"
|
||||
$restoreProjPath = "$PSScriptRoot\restore.proj"
|
||||
|
||||
Write-Host "Installing dotnet SDK version $dotnetSdkVersion to restore Arcade SDK..."
|
||||
InstallDotNetSdk "$dotnetTempDir" "$dotnetSdkVersion"
|
||||
|
||||
'<Project Sdk="Microsoft.DotNet.Arcade.Sdk"/>' | Out-File "$restoreProjPath"
|
||||
|
||||
& $dotnet restore $restoreProjPath
|
||||
|
||||
Write-Host "Arcade SDK restored!"
|
||||
|
||||
if (Test-Path -Path $restoreProjPath) {
|
||||
Remove-Item $restoreProjPath
|
||||
}
|
||||
|
||||
if (Test-Path -Path $dotnetTempDir) {
|
||||
Remove-Item $dotnetTempDir -Recurse
|
||||
}
|
||||
}
|
||||
|
||||
try {
|
||||
Push-Location $PSScriptRoot
|
||||
|
||||
if ($Operation -like "setup") {
|
||||
SetupCredProvider $AuthToken
|
||||
}
|
||||
elseif ($Operation -like "install-restore") {
|
||||
InstallDotNetSdkAndRestoreArcade
|
||||
}
|
||||
else {
|
||||
Write-Host "Unknown operation '$Operation'!"
|
||||
ExitWithExitCode 1
|
||||
}
|
||||
}
|
||||
catch {
|
||||
Write-Host $_
|
||||
Write-Host $_.Exception
|
||||
Write-Host $_.ScriptStackTrace
|
||||
ExitWithExitCode 1
|
||||
}
|
||||
finally {
|
||||
Pop-Location
|
||||
}
|
||||
@@ -1,142 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -e
|
||||
|
||||
# Sets VSS_NUGET_EXTERNAL_FEED_ENDPOINTS based on the "darc-int-*" feeds defined in NuGet.config. This is needed
|
||||
# in build agents by CredProvider to authenticate the restore requests to internal feeds as specified in
|
||||
# https://github.com/microsoft/artifacts-credprovider/blob/0f53327cd12fd893d8627d7b08a2171bf5852a41/README.md#environment-variables.
|
||||
# This should ONLY be called from identified internal builds
|
||||
function SetupCredProvider {
|
||||
local authToken=$1
|
||||
|
||||
# Install the Cred Provider NuGet plugin
|
||||
echo "Setting up Cred Provider NuGet plugin in the agent..."...
|
||||
echo "Getting 'installcredprovider.ps1' from 'https://github.com/microsoft/artifacts-credprovider'..."
|
||||
|
||||
local url="https://raw.githubusercontent.com/microsoft/artifacts-credprovider/master/helpers/installcredprovider.sh"
|
||||
|
||||
echo "Writing the contents of 'installcredprovider.ps1' locally..."
|
||||
local installcredproviderPath="installcredprovider.sh"
|
||||
if command -v curl > /dev/null; then
|
||||
curl $url > "$installcredproviderPath"
|
||||
else
|
||||
wget -q -O "$installcredproviderPath" "$url"
|
||||
fi
|
||||
|
||||
echo "Installing plugin..."
|
||||
. "$installcredproviderPath"
|
||||
|
||||
echo "Deleting local copy of 'installcredprovider.sh'..."
|
||||
rm installcredprovider.sh
|
||||
|
||||
if [ ! -d "$HOME/.nuget/plugins" ]; then
|
||||
echo "CredProvider plugin was not installed correctly!"
|
||||
ExitWithExitCode 1
|
||||
else
|
||||
echo "CredProvider plugin was installed correctly!"
|
||||
fi
|
||||
|
||||
# Then, we set the 'VSS_NUGET_EXTERNAL_FEED_ENDPOINTS' environment variable to restore from the stable
|
||||
# feeds successfully
|
||||
|
||||
local nugetConfigPath="$repo_root/NuGet.config"
|
||||
|
||||
if [ ! "$nugetConfigPath" ]; then
|
||||
echo "NuGet.config file not found in repo's root!"
|
||||
ExitWithExitCode 1
|
||||
fi
|
||||
|
||||
local endpoints='['
|
||||
local nugetConfigPackageValues=`cat "$nugetConfigPath" | grep "key=\"darc-int-"`
|
||||
local pattern="value=\"(.*)\""
|
||||
|
||||
for value in $nugetConfigPackageValues
|
||||
do
|
||||
if [[ $value =~ $pattern ]]; then
|
||||
local endpoint="${BASH_REMATCH[1]}"
|
||||
endpoints+="{\"endpoint\": \"$endpoint\", \"password\": \"$authToken\"},"
|
||||
fi
|
||||
done
|
||||
|
||||
endpoints=${endpoints%?}
|
||||
endpoints+=']'
|
||||
|
||||
if [ ${#endpoints} -gt 2 ]; then
|
||||
# Create the JSON object. It should look like '{"endpointCredentials": [{"endpoint":"http://example.index.json", "username":"optional", "password":"accesstoken"}]}'
|
||||
local endpointCredentials="{\"endpointCredentials\": "$endpoints"}"
|
||||
|
||||
echo "##vso[task.setvariable variable=VSS_NUGET_EXTERNAL_FEED_ENDPOINTS]$endpointCredentials"
|
||||
echo "##vso[task.setvariable variable=NUGET_CREDENTIALPROVIDER_SESSIONTOKENCACHE_ENABLED]False"
|
||||
else
|
||||
echo "No internal endpoints found in NuGet.config"
|
||||
fi
|
||||
}
|
||||
|
||||
# Workaround for https://github.com/microsoft/msbuild/issues/4430
|
||||
function InstallDotNetSdkAndRestoreArcade {
|
||||
local dotnetTempDir="$repo_root/dotnet"
|
||||
local dotnetSdkVersion="2.1.507" # After experimentation we know this version works when restoring the SDK (compared to 3.0.*)
|
||||
local restoreProjPath="$repo_root/eng/common/restore.proj"
|
||||
|
||||
echo "Installing dotnet SDK version $dotnetSdkVersion to restore Arcade SDK..."
|
||||
echo "<Project Sdk=\"Microsoft.DotNet.Arcade.Sdk\"/>" > "$restoreProjPath"
|
||||
|
||||
InstallDotNetSdk "$dotnetTempDir" "$dotnetSdkVersion"
|
||||
|
||||
local res=`$dotnetTempDir/dotnet restore $restoreProjPath`
|
||||
echo "Arcade SDK restored!"
|
||||
|
||||
# Cleanup
|
||||
if [ "$restoreProjPath" ]; then
|
||||
rm "$restoreProjPath"
|
||||
fi
|
||||
|
||||
if [ "$dotnetTempDir" ]; then
|
||||
rm -r $dotnetTempDir
|
||||
fi
|
||||
}
|
||||
|
||||
source="${BASH_SOURCE[0]}"
|
||||
operation=''
|
||||
authToken=''
|
||||
repoName=''
|
||||
|
||||
while [[ $# > 0 ]]; do
|
||||
opt="$(echo "$1" | awk '{print tolower($0)}')"
|
||||
case "$opt" in
|
||||
--operation)
|
||||
operation=$2
|
||||
shift
|
||||
;;
|
||||
--authtoken)
|
||||
authToken=$2
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
echo "Invalid argument: $1"
|
||||
usage
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
shift
|
||||
done
|
||||
|
||||
while [[ -h "$source" ]]; do
|
||||
scriptroot="$( cd -P "$( dirname "$source" )" && pwd )"
|
||||
source="$(readlink "$source")"
|
||||
# if $source was a relative symlink, we need to resolve it relative to the path where the
|
||||
# symlink file was located
|
||||
[[ $source != /* ]] && source="$scriptroot/$source"
|
||||
done
|
||||
scriptroot="$( cd -P "$( dirname "$source" )" && pwd )"
|
||||
|
||||
. "$scriptroot/tools.sh"
|
||||
|
||||
if [ "$operation" = "setup" ]; then
|
||||
SetupCredProvider $authToken
|
||||
elif [ "$operation" = "install-restore" ]; then
|
||||
InstallDotNetSdkAndRestoreArcade
|
||||
else
|
||||
echo "Unknown operation '$operation'!"
|
||||
fi
|
||||
@@ -1,4 +0,0 @@
|
||||
<!-- Licensed to the .NET Foundation under one or more agreements. The .NET Foundation licenses this file to you under the MIT license. See the LICENSE file in the project root for more information. -->
|
||||
<Project>
|
||||
<Import Project="Sdk.props" Sdk="Microsoft.DotNet.Arcade.Sdk" />
|
||||
</Project>
|
||||
@@ -1,27 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. -->
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net472</TargetFramework>
|
||||
<ImportDirectoryBuildTargets>false</ImportDirectoryBuildTargets>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<!-- Clear references, the SDK may add some depending on UsuingToolXxx settings, but we only want to restore the following -->
|
||||
<PackageReference Remove="@(PackageReference)"/>
|
||||
<PackageReference Include="Microsoft.DotNet.IBCMerge" Version="$(MicrosoftDotNetIBCMergeVersion)" Condition="'$(UsingToolIbcOptimization)' == 'true'" />
|
||||
<PackageReference Include="Drop.App" Version="$(DropAppVersion)" ExcludeAssets="all" Condition="'$(UsingToolVisualStudioIbcTraining)' == 'true'"/>
|
||||
</ItemGroup>
|
||||
<PropertyGroup>
|
||||
<RestoreSources></RestoreSources>
|
||||
<RestoreSources Condition="'$(UsingToolIbcOptimization)' == 'true'">
|
||||
https://devdiv.pkgs.visualstudio.com/_packaging/dotnet-core-internal-tooling/nuget/v3/index.json;
|
||||
</RestoreSources>
|
||||
<RestoreSources Condition="'$(UsingToolVisualStudioIbcTraining)' == 'true'">
|
||||
$(RestoreSources);
|
||||
https://devdiv.pkgs.visualstudio.com/_packaging/VS/nuget/v3/index.json;
|
||||
</RestoreSources>
|
||||
</PropertyGroup>
|
||||
|
||||
<!-- Repository extensibility point -->
|
||||
<Import Project="$(RepositoryEngineeringDir)InternalTools.props" Condition="Exists('$(RepositoryEngineeringDir)InternalTools.props')" />
|
||||
</Project>
|
||||
@@ -1,27 +0,0 @@
|
||||
[CmdletBinding(PositionalBinding=$false)]
|
||||
Param(
|
||||
[string] $verbosity = "minimal",
|
||||
[bool] $warnAsError = $true,
|
||||
[bool] $nodeReuse = $true,
|
||||
[switch] $ci,
|
||||
[switch] $prepareMachine,
|
||||
[Parameter(ValueFromRemainingArguments=$true)][String[]]$extraArgs
|
||||
)
|
||||
|
||||
. $PSScriptRoot\tools.ps1
|
||||
|
||||
try {
|
||||
if ($ci) {
|
||||
$nodeReuse = $false
|
||||
}
|
||||
|
||||
MSBuild @extraArgs
|
||||
}
|
||||
catch {
|
||||
Write-Host $_
|
||||
Write-Host $_.Exception
|
||||
Write-Host $_.ScriptStackTrace
|
||||
ExitWithExitCode 1
|
||||
}
|
||||
|
||||
ExitWithExitCode 0
|
||||
@@ -1,58 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
source="${BASH_SOURCE[0]}"
|
||||
|
||||
# resolve $source until the file is no longer a symlink
|
||||
while [[ -h "$source" ]]; do
|
||||
scriptroot="$( cd -P "$( dirname "$source" )" && pwd )"
|
||||
source="$(readlink "$source")"
|
||||
# if $source was a relative symlink, we need to resolve it relative to the path where the
|
||||
# symlink file was located
|
||||
[[ $source != /* ]] && source="$scriptroot/$source"
|
||||
done
|
||||
scriptroot="$( cd -P "$( dirname "$source" )" && pwd )"
|
||||
|
||||
verbosity='minimal'
|
||||
warn_as_error=true
|
||||
node_reuse=true
|
||||
prepare_machine=false
|
||||
extra_args=''
|
||||
|
||||
while (($# > 0)); do
|
||||
lowerI="$(echo $1 | awk '{print tolower($0)}')"
|
||||
case $lowerI in
|
||||
--verbosity)
|
||||
verbosity=$2
|
||||
shift 2
|
||||
;;
|
||||
--warnaserror)
|
||||
warn_as_error=$2
|
||||
shift 2
|
||||
;;
|
||||
--nodereuse)
|
||||
node_reuse=$2
|
||||
shift 2
|
||||
;;
|
||||
--ci)
|
||||
ci=true
|
||||
shift 1
|
||||
;;
|
||||
--preparemachine)
|
||||
prepare_machine=true
|
||||
shift 1
|
||||
;;
|
||||
*)
|
||||
extra_args="$extra_args $1"
|
||||
shift 1
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
. "$scriptroot/tools.sh"
|
||||
|
||||
if [[ "$ci" == true ]]; then
|
||||
node_reuse=false
|
||||
fi
|
||||
|
||||
MSBuild $extra_args
|
||||
ExitWithExitCode 0
|
||||
@@ -1,389 +0,0 @@
|
||||
<#
|
||||
.SYNOPSIS
|
||||
Helper module to install an archive to a directory
|
||||
|
||||
.DESCRIPTION
|
||||
Helper module to download and extract an archive to a specified directory
|
||||
|
||||
.PARAMETER Uri
|
||||
Uri of artifact to download
|
||||
|
||||
.PARAMETER InstallDirectory
|
||||
Directory to extract artifact contents to
|
||||
|
||||
.PARAMETER Force
|
||||
Force download / extraction if file or contents already exist. Default = False
|
||||
|
||||
.PARAMETER DownloadRetries
|
||||
Total number of retry attempts. Default = 5
|
||||
|
||||
.PARAMETER RetryWaitTimeInSeconds
|
||||
Wait time between retry attempts in seconds. Default = 30
|
||||
|
||||
.NOTES
|
||||
Returns False if download or extraction fail, True otherwise
|
||||
#>
|
||||
function DownloadAndExtract {
|
||||
[CmdletBinding(PositionalBinding=$false)]
|
||||
Param (
|
||||
[Parameter(Mandatory=$True)]
|
||||
[string] $Uri,
|
||||
[Parameter(Mandatory=$True)]
|
||||
[string] $InstallDirectory,
|
||||
[switch] $Force = $False,
|
||||
[int] $DownloadRetries = 5,
|
||||
[int] $RetryWaitTimeInSeconds = 30
|
||||
)
|
||||
# Define verbose switch if undefined
|
||||
$Verbose = $VerbosePreference -Eq "Continue"
|
||||
|
||||
$TempToolPath = CommonLibrary\Get-TempPathFilename -Path $Uri
|
||||
|
||||
# Download native tool
|
||||
$DownloadStatus = CommonLibrary\Get-File -Uri $Uri `
|
||||
-Path $TempToolPath `
|
||||
-DownloadRetries $DownloadRetries `
|
||||
-RetryWaitTimeInSeconds $RetryWaitTimeInSeconds `
|
||||
-Force:$Force `
|
||||
-Verbose:$Verbose
|
||||
|
||||
if ($DownloadStatus -Eq $False) {
|
||||
Write-Error "Download failed"
|
||||
return $False
|
||||
}
|
||||
|
||||
# Extract native tool
|
||||
$UnzipStatus = CommonLibrary\Expand-Zip -ZipPath $TempToolPath `
|
||||
-OutputDirectory $InstallDirectory `
|
||||
-Force:$Force `
|
||||
-Verbose:$Verbose
|
||||
|
||||
if ($UnzipStatus -Eq $False) {
|
||||
# Retry Download one more time with Force=true
|
||||
$DownloadRetryStatus = CommonLibrary\Get-File -Uri $Uri `
|
||||
-Path $TempToolPath `
|
||||
-DownloadRetries 1 `
|
||||
-RetryWaitTimeInSeconds $RetryWaitTimeInSeconds `
|
||||
-Force:$True `
|
||||
-Verbose:$Verbose
|
||||
|
||||
if ($DownloadRetryStatus -Eq $False) {
|
||||
Write-Error "Last attempt of download failed as well"
|
||||
return $False
|
||||
}
|
||||
|
||||
# Retry unzip again one more time with Force=true
|
||||
$UnzipRetryStatus = CommonLibrary\Expand-Zip -ZipPath $TempToolPath `
|
||||
-OutputDirectory $InstallDirectory `
|
||||
-Force:$True `
|
||||
-Verbose:$Verbose
|
||||
if ($UnzipRetryStatus -Eq $False)
|
||||
{
|
||||
Write-Error "Last attempt of unzip failed as well"
|
||||
# Clean up partial zips and extracts
|
||||
if (Test-Path $TempToolPath) {
|
||||
Remove-Item $TempToolPath -Force
|
||||
}
|
||||
if (Test-Path $InstallDirectory) {
|
||||
Remove-Item $InstallDirectory -Force -Recurse
|
||||
}
|
||||
return $False
|
||||
}
|
||||
}
|
||||
|
||||
return $True
|
||||
}
|
||||
|
||||
<#
|
||||
.SYNOPSIS
|
||||
Download a file, retry on failure
|
||||
|
||||
.DESCRIPTION
|
||||
Download specified file and retry if attempt fails
|
||||
|
||||
.PARAMETER Uri
|
||||
Uri of file to download. If Uri is a local path, the file will be copied instead of downloaded
|
||||
|
||||
.PARAMETER Path
|
||||
Path to download or copy uri file to
|
||||
|
||||
.PARAMETER Force
|
||||
Overwrite existing file if present. Default = False
|
||||
|
||||
.PARAMETER DownloadRetries
|
||||
Total number of retry attempts. Default = 5
|
||||
|
||||
.PARAMETER RetryWaitTimeInSeconds
|
||||
Wait time between retry attempts in seconds Default = 30
|
||||
|
||||
#>
|
||||
function Get-File {
|
||||
[CmdletBinding(PositionalBinding=$false)]
|
||||
Param (
|
||||
[Parameter(Mandatory=$True)]
|
||||
[string] $Uri,
|
||||
[Parameter(Mandatory=$True)]
|
||||
[string] $Path,
|
||||
[int] $DownloadRetries = 5,
|
||||
[int] $RetryWaitTimeInSeconds = 30,
|
||||
[switch] $Force = $False
|
||||
)
|
||||
$Attempt = 0
|
||||
|
||||
if ($Force) {
|
||||
if (Test-Path $Path) {
|
||||
Remove-Item $Path -Force
|
||||
}
|
||||
}
|
||||
if (Test-Path $Path) {
|
||||
Write-Host "File '$Path' already exists, skipping download"
|
||||
return $True
|
||||
}
|
||||
|
||||
$DownloadDirectory = Split-Path -ErrorAction Ignore -Path "$Path" -Parent
|
||||
if (-Not (Test-Path $DownloadDirectory)) {
|
||||
New-Item -path $DownloadDirectory -force -itemType "Directory" | Out-Null
|
||||
}
|
||||
|
||||
if (Test-Path -IsValid -Path $Uri) {
|
||||
Write-Verbose "'$Uri' is a file path, copying file to '$Path'"
|
||||
Copy-Item -Path $Uri -Destination $Path
|
||||
return $?
|
||||
}
|
||||
else {
|
||||
Write-Verbose "Downloading $Uri"
|
||||
# Don't display the console progress UI - it's a huge perf hit
|
||||
$ProgressPreference = 'SilentlyContinue'
|
||||
while($Attempt -Lt $DownloadRetries)
|
||||
{
|
||||
try {
|
||||
Invoke-WebRequest -UseBasicParsing -Uri $Uri -OutFile $Path
|
||||
Write-Verbose "Downloaded to '$Path'"
|
||||
return $True
|
||||
}
|
||||
catch {
|
||||
$Attempt++
|
||||
if ($Attempt -Lt $DownloadRetries) {
|
||||
$AttemptsLeft = $DownloadRetries - $Attempt
|
||||
Write-Warning "Download failed, $AttemptsLeft attempts remaining, will retry in $RetryWaitTimeInSeconds seconds"
|
||||
Start-Sleep -Seconds $RetryWaitTimeInSeconds
|
||||
}
|
||||
else {
|
||||
Write-Error $_
|
||||
Write-Error $_.Exception
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return $False
|
||||
}
|
||||
|
||||
<#
|
||||
.SYNOPSIS
|
||||
Generate a shim for a native tool
|
||||
|
||||
.DESCRIPTION
|
||||
Creates a wrapper script (shim) that passes arguments forward to native tool assembly
|
||||
|
||||
.PARAMETER ShimName
|
||||
The name of the shim
|
||||
|
||||
.PARAMETER ShimDirectory
|
||||
The directory where shims are stored
|
||||
|
||||
.PARAMETER ToolFilePath
|
||||
Path to file that shim forwards to
|
||||
|
||||
.PARAMETER Force
|
||||
Replace shim if already present. Default = False
|
||||
|
||||
.NOTES
|
||||
Returns $True if generating shim succeeds, $False otherwise
|
||||
#>
|
||||
function New-ScriptShim {
|
||||
[CmdletBinding(PositionalBinding=$false)]
|
||||
Param (
|
||||
[Parameter(Mandatory=$True)]
|
||||
[string] $ShimName,
|
||||
[Parameter(Mandatory=$True)]
|
||||
[string] $ShimDirectory,
|
||||
[Parameter(Mandatory=$True)]
|
||||
[string] $ToolFilePath,
|
||||
[Parameter(Mandatory=$True)]
|
||||
[string] $BaseUri,
|
||||
[switch] $Force
|
||||
)
|
||||
try {
|
||||
Write-Verbose "Generating '$ShimName' shim"
|
||||
|
||||
if (-Not (Test-Path $ToolFilePath)){
|
||||
Write-Error "Specified tool file path '$ToolFilePath' does not exist"
|
||||
return $False
|
||||
}
|
||||
|
||||
# WinShimmer is a small .NET Framework program that creates .exe shims to bootstrapped programs
|
||||
# Many of the checks for installed programs expect a .exe extension for Windows tools, rather
|
||||
# than a .bat or .cmd file.
|
||||
# Source: https://github.com/dotnet/arcade/tree/master/src/WinShimmer
|
||||
if (-Not (Test-Path "$ShimDirectory\WinShimmer\winshimmer.exe")) {
|
||||
$InstallStatus = DownloadAndExtract -Uri "$BaseUri/windows/winshimmer/WinShimmer.zip" `
|
||||
-InstallDirectory $ShimDirectory\WinShimmer `
|
||||
-Force:$Force `
|
||||
-DownloadRetries 2 `
|
||||
-RetryWaitTimeInSeconds 5 `
|
||||
-Verbose:$Verbose
|
||||
}
|
||||
|
||||
if ((Test-Path (Join-Path $ShimDirectory "$ShimName.exe"))) {
|
||||
Write-Host "$ShimName.exe already exists; replacing..."
|
||||
Remove-Item (Join-Path $ShimDirectory "$ShimName.exe")
|
||||
}
|
||||
|
||||
& "$ShimDirectory\WinShimmer\winshimmer.exe" $ShimName $ToolFilePath $ShimDirectory
|
||||
return $True
|
||||
}
|
||||
catch {
|
||||
Write-Host $_
|
||||
Write-Host $_.Exception
|
||||
return $False
|
||||
}
|
||||
}
|
||||
|
||||
<#
|
||||
.SYNOPSIS
|
||||
Returns the machine architecture of the host machine
|
||||
|
||||
.NOTES
|
||||
Returns 'x64' on 64 bit machines
|
||||
Returns 'x86' on 32 bit machines
|
||||
#>
|
||||
function Get-MachineArchitecture {
|
||||
$ProcessorArchitecture = $Env:PROCESSOR_ARCHITECTURE
|
||||
$ProcessorArchitectureW6432 = $Env:PROCESSOR_ARCHITEW6432
|
||||
if($ProcessorArchitecture -Eq "X86")
|
||||
{
|
||||
if(($ProcessorArchitectureW6432 -Eq "") -Or
|
||||
($ProcessorArchitectureW6432 -Eq "X86")) {
|
||||
return "x86"
|
||||
}
|
||||
$ProcessorArchitecture = $ProcessorArchitectureW6432
|
||||
}
|
||||
if (($ProcessorArchitecture -Eq "AMD64") -Or
|
||||
($ProcessorArchitecture -Eq "IA64") -Or
|
||||
($ProcessorArchitecture -Eq "ARM64")) {
|
||||
return "x64"
|
||||
}
|
||||
return "x86"
|
||||
}
|
||||
|
||||
<#
|
||||
.SYNOPSIS
|
||||
Get the name of a temporary folder under the native install directory
|
||||
#>
|
||||
function Get-TempDirectory {
|
||||
return Join-Path (Get-NativeInstallDirectory) "temp/"
|
||||
}
|
||||
|
||||
function Get-TempPathFilename {
|
||||
[CmdletBinding(PositionalBinding=$false)]
|
||||
Param (
|
||||
[Parameter(Mandatory=$True)]
|
||||
[string] $Path
|
||||
)
|
||||
$TempDir = CommonLibrary\Get-TempDirectory
|
||||
$TempFilename = Split-Path $Path -leaf
|
||||
$TempPath = Join-Path $TempDir $TempFilename
|
||||
return $TempPath
|
||||
}
|
||||
|
||||
<#
|
||||
.SYNOPSIS
|
||||
Returns the base directory to use for native tool installation
|
||||
|
||||
.NOTES
|
||||
Returns the value of the NETCOREENG_INSTALL_DIRECTORY if that environment variable
|
||||
is set, or otherwise returns an install directory under the %USERPROFILE%
|
||||
#>
|
||||
function Get-NativeInstallDirectory {
|
||||
$InstallDir = $Env:NETCOREENG_INSTALL_DIRECTORY
|
||||
if (!$InstallDir) {
|
||||
$InstallDir = Join-Path $Env:USERPROFILE ".netcoreeng/native/"
|
||||
}
|
||||
return $InstallDir
|
||||
}
|
||||
|
||||
<#
|
||||
.SYNOPSIS
|
||||
Unzip an archive
|
||||
|
||||
.DESCRIPTION
|
||||
Powershell module to unzip an archive to a specified directory
|
||||
|
||||
.PARAMETER ZipPath (Required)
|
||||
Path to archive to unzip
|
||||
|
||||
.PARAMETER OutputDirectory (Required)
|
||||
Output directory for archive contents
|
||||
|
||||
.PARAMETER Force
|
||||
Overwrite output directory contents if they already exist
|
||||
|
||||
.NOTES
|
||||
- Returns True and does not perform an extraction if output directory already exists but Overwrite is not True.
|
||||
- Returns True if unzip operation is successful
|
||||
- Returns False if Overwrite is True and it is unable to remove contents of OutputDirectory
|
||||
- Returns False if unable to extract zip archive
|
||||
#>
|
||||
function Expand-Zip {
|
||||
[CmdletBinding(PositionalBinding=$false)]
|
||||
Param (
|
||||
[Parameter(Mandatory=$True)]
|
||||
[string] $ZipPath,
|
||||
[Parameter(Mandatory=$True)]
|
||||
[string] $OutputDirectory,
|
||||
[switch] $Force
|
||||
)
|
||||
|
||||
Write-Verbose "Extracting '$ZipPath' to '$OutputDirectory'"
|
||||
try {
|
||||
if ((Test-Path $OutputDirectory) -And (-Not $Force)) {
|
||||
Write-Host "Directory '$OutputDirectory' already exists, skipping extract"
|
||||
return $True
|
||||
}
|
||||
if (Test-Path $OutputDirectory) {
|
||||
Write-Verbose "'Force' is 'True', but '$OutputDirectory' exists, removing directory"
|
||||
Remove-Item $OutputDirectory -Force -Recurse
|
||||
if ($? -Eq $False) {
|
||||
Write-Error "Unable to remove '$OutputDirectory'"
|
||||
return $False
|
||||
}
|
||||
}
|
||||
if (-Not (Test-Path $OutputDirectory)) {
|
||||
New-Item -path $OutputDirectory -Force -itemType "Directory" | Out-Null
|
||||
}
|
||||
|
||||
Add-Type -assembly "system.io.compression.filesystem"
|
||||
[io.compression.zipfile]::ExtractToDirectory("$ZipPath", "$OutputDirectory")
|
||||
if ($? -Eq $False) {
|
||||
Write-Error "Unable to extract '$ZipPath'"
|
||||
return $False
|
||||
}
|
||||
}
|
||||
catch {
|
||||
Write-Host $_
|
||||
Write-Host $_.Exception
|
||||
|
||||
return $False
|
||||
}
|
||||
return $True
|
||||
}
|
||||
|
||||
export-modulemember -function DownloadAndExtract
|
||||
export-modulemember -function Expand-Zip
|
||||
export-modulemember -function Get-File
|
||||
export-modulemember -function Get-MachineArchitecture
|
||||
export-modulemember -function Get-NativeInstallDirectory
|
||||
export-modulemember -function Get-TempDirectory
|
||||
export-modulemember -function Get-TempPathFilename
|
||||
export-modulemember -function New-ScriptShim
|
||||
@@ -1,168 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
function GetNativeInstallDirectory {
|
||||
local install_dir
|
||||
|
||||
if [[ -z $NETCOREENG_INSTALL_DIRECTORY ]]; then
|
||||
install_dir=$HOME/.netcoreeng/native/
|
||||
else
|
||||
install_dir=$NETCOREENG_INSTALL_DIRECTORY
|
||||
fi
|
||||
|
||||
echo $install_dir
|
||||
return 0
|
||||
}
|
||||
|
||||
function GetTempDirectory {
|
||||
|
||||
echo $(GetNativeInstallDirectory)temp/
|
||||
return 0
|
||||
}
|
||||
|
||||
function ExpandZip {
|
||||
local zip_path=$1
|
||||
local output_directory=$2
|
||||
local force=${3:-false}
|
||||
|
||||
echo "Extracting $zip_path to $output_directory"
|
||||
if [[ -d $output_directory ]] && [[ $force = false ]]; then
|
||||
echo "Directory '$output_directory' already exists, skipping extract"
|
||||
return 0
|
||||
fi
|
||||
|
||||
if [[ -d $output_directory ]]; then
|
||||
echo "'Force flag enabled, but '$output_directory' exists. Removing directory"
|
||||
rm -rf $output_directory
|
||||
if [[ $? != 0 ]]; then
|
||||
echo Unable to remove '$output_directory'>&2
|
||||
return 1
|
||||
fi
|
||||
fi
|
||||
|
||||
echo "Creating directory: '$output_directory'"
|
||||
mkdir -p $output_directory
|
||||
|
||||
echo "Extracting archive"
|
||||
tar -xf $zip_path -C $output_directory
|
||||
if [[ $? != 0 ]]; then
|
||||
echo "Unable to extract '$zip_path'" >&2
|
||||
return 1
|
||||
fi
|
||||
|
||||
return 0
|
||||
}
|
||||
|
||||
function GetCurrentOS {
|
||||
local unameOut="$(uname -s)"
|
||||
case $unameOut in
|
||||
Linux*) echo "Linux";;
|
||||
Darwin*) echo "MacOS";;
|
||||
esac
|
||||
return 0
|
||||
}
|
||||
|
||||
function GetFile {
|
||||
local uri=$1
|
||||
local path=$2
|
||||
local force=${3:-false}
|
||||
local download_retries=${4:-5}
|
||||
local retry_wait_time_seconds=${5:-30}
|
||||
|
||||
if [[ -f $path ]]; then
|
||||
if [[ $force = false ]]; then
|
||||
echo "File '$path' already exists. Skipping download"
|
||||
return 0
|
||||
else
|
||||
rm -rf $path
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ -f $uri ]]; then
|
||||
echo "'$uri' is a file path, copying file to '$path'"
|
||||
cp $uri $path
|
||||
return $?
|
||||
fi
|
||||
|
||||
echo "Downloading $uri"
|
||||
# Use curl if available, otherwise use wget
|
||||
if command -v curl > /dev/null; then
|
||||
curl "$uri" -sSL --retry $download_retries --retry-delay $retry_wait_time_seconds --create-dirs -o "$path" --fail
|
||||
else
|
||||
wget -q -O "$path" "$uri" --tries="$download_retries"
|
||||
fi
|
||||
|
||||
return $?
|
||||
}
|
||||
|
||||
function GetTempPathFileName {
|
||||
local path=$1
|
||||
|
||||
local temp_dir=$(GetTempDirectory)
|
||||
local temp_file_name=$(basename $path)
|
||||
echo $temp_dir$temp_file_name
|
||||
return 0
|
||||
}
|
||||
|
||||
function DownloadAndExtract {
|
||||
local uri=$1
|
||||
local installDir=$2
|
||||
local force=${3:-false}
|
||||
local download_retries=${4:-5}
|
||||
local retry_wait_time_seconds=${5:-30}
|
||||
|
||||
local temp_tool_path=$(GetTempPathFileName $uri)
|
||||
|
||||
echo "downloading to: $temp_tool_path"
|
||||
|
||||
# Download file
|
||||
GetFile "$uri" "$temp_tool_path" $force $download_retries $retry_wait_time_seconds
|
||||
if [[ $? != 0 ]]; then
|
||||
echo "Failed to download '$uri' to '$temp_tool_path'." >&2
|
||||
return 1
|
||||
fi
|
||||
|
||||
# Extract File
|
||||
echo "extracting from $temp_tool_path to $installDir"
|
||||
ExpandZip "$temp_tool_path" "$installDir" $force $download_retries $retry_wait_time_seconds
|
||||
if [[ $? != 0 ]]; then
|
||||
echo "Failed to extract '$temp_tool_path' to '$installDir'." >&2
|
||||
return 1
|
||||
fi
|
||||
|
||||
return 0
|
||||
}
|
||||
|
||||
function NewScriptShim {
|
||||
local shimpath=$1
|
||||
local tool_file_path=$2
|
||||
local force=${3:-false}
|
||||
|
||||
echo "Generating '$shimpath' shim"
|
||||
if [[ -f $shimpath ]]; then
|
||||
if [[ $force = false ]]; then
|
||||
echo "File '$shimpath' already exists." >&2
|
||||
return 1
|
||||
else
|
||||
rm -rf $shimpath
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ ! -f $tool_file_path ]]; then
|
||||
echo "Specified tool file path:'$tool_file_path' does not exist" >&2
|
||||
return 1
|
||||
fi
|
||||
|
||||
local shim_contents=$'#!/usr/bin/env bash\n'
|
||||
shim_contents+="SHIMARGS="$'$1\n'
|
||||
shim_contents+="$tool_file_path"$' $SHIMARGS\n'
|
||||
|
||||
# Write shim file
|
||||
echo "$shim_contents" > $shimpath
|
||||
|
||||
chmod +x $shimpath
|
||||
|
||||
echo "Finished generating shim '$shimpath'"
|
||||
|
||||
return $?
|
||||
}
|
||||
|
||||
Loaded 100 of 8707 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user