mirror of
https://github.com/BepInEx/mono.git
synced 2026-11-17 01:41:17 -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
@@ -1,152 +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.
|
||||
* @luhenry @marek-safar
|
||||
|
||||
# Order is important. The last matching pattern has the most precedence.
|
||||
|
||||
/acceptance-tests @akoeplinger @kg
|
||||
/acceptance-tests/profiler-stress* @alexrp @akoeplinger
|
||||
|
||||
/data @marek-safar @akoeplinger @luhenry
|
||||
/data/gdb @vargaz @luhenry
|
||||
/data/lldb @lewurm @vargaz
|
||||
|
||||
/docs @luhenry @marek-safar @akoeplinger
|
||||
/docs/riscv.md @alexrp @lewurm
|
||||
/docs/sources/mono-api-profiler.html @alexrp
|
||||
|
||||
/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 @alexischr
|
||||
/external/corert @akoeplinger @marek-safar @egorbo @alexischr
|
||||
/external/linker @marek-safar
|
||||
/external/llvm @luhenry @vargaz
|
||||
/external/nuget-buildtasks @radical @akoeplinger
|
||||
/external/roslyn-binaries @kg @marek-safar @akoeplinger
|
||||
|
||||
/libgc @BrzVlad @vargaz @luhenry
|
||||
|
||||
/llvm @vargaz @luhenry
|
||||
|
||||
/man @marek-safar @miguel @luhenry
|
||||
/man/*prof* @alexrp
|
||||
|
||||
/mcs @marek-safar @luhenry
|
||||
|
||||
/mcs/build @marek-safar @akoeplinger
|
||||
|
||||
/mcs/class @marek-safar @akoeplinger
|
||||
/mcs/class/corlib/System.Reflection*/ @vargaz @lambdageek
|
||||
/mcs/class/corlib/System.Security.Cryptography.X509Certificates @baulig @marek-safar
|
||||
/mcs/class/Mono.Btls.Interface @bauligg @marek-safar
|
||||
/mcs/class/Mono.Data.Tds @egorbo
|
||||
/mcs/class/Mono.Debugger.Soft @vargaz
|
||||
/mcs/class/Mono.Options @jonpryor @marek-safar
|
||||
/mcs/class/Mono.Profiler.Log @alexrp @luhenry
|
||||
/mcs/class/Mono.Security/Mono.Security/Interface @baulig @marek-safar
|
||||
/mcs/class/System/Mono.AppleTls @baulig @rolf
|
||||
/mcs/class/System/Mono.Btls @baulig @marek-safar
|
||||
/mcs/class/System/Mono.Net.Security @baulig @marek-safar
|
||||
/mcs/class/System/Mono.Security.Interface @baulig @marek-safar
|
||||
/mcs/class/System/System.Security.Cryptography.X509Certificates @baulig @marek-safar
|
||||
/mcs/class/System.Data* @egorbo @marek-safar
|
||||
|
||||
/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
|
||||
/mcs/tools/gensources @kg @akoeplinger
|
||||
/mcs/tools/upload-to-sentry @alexanderkyte @akoeplinger
|
||||
|
||||
/mono/arch @vargaz @lewurm
|
||||
|
||||
/mono/btls @baulig @luhenry @marek-safar
|
||||
/mono/dis @lambdageek @vargaz
|
||||
/mono/eglib @vargaz @luhenry
|
||||
|
||||
/mono/benchmark @alexanderkyte @luhenry
|
||||
|
||||
/mono/metadata @vargaz @lambdageek
|
||||
/mono/metadata/*verify* @lambdageek @luhenry
|
||||
/mono/metadata/*profiler* @alexrp @luhenry
|
||||
/mono/metadata/handle* @jaykrell @lambdageek
|
||||
/mono/metadata/monitor* @brzvlad @vargaz
|
||||
/mono/metadata/sgen* @brzvlad @vargaz
|
||||
/mono/metadata/thread* @luhenry @lateralusX
|
||||
/mono/metadata/w32* @luhenry @lateralusX @jaykrell
|
||||
/mono/metadata/*-win* @lateralusX @luhenry @luhenry
|
||||
|
||||
/mono/mini @vargaz @lewurm
|
||||
/mono/mini/*cfgdump* @lewurm @luhenry
|
||||
/mono/mini/*exceptions* @lewurm @luhenry
|
||||
/mono/mini/*ppc* @lewurm @vargaz
|
||||
/mono/mini/*riscv* @alexrp @lewurm
|
||||
/mono/mini/*type-check* @lewurm @lambdageek
|
||||
/mono/mini/interp/* @lewurm @BrzVlad
|
||||
/mono/mini/*profiler* @alexrp @luhenry
|
||||
/mono/mini/debugger-agent.c @vargaz @lewurm @DavidKarlas
|
||||
|
||||
/mono/native @baulig @luhenry @marek-safar
|
||||
|
||||
/mono/profiler @alexrp @luhenry
|
||||
|
||||
/mono/sgen @BrzVlad @luhenry
|
||||
|
||||
/mono/utils @vargaz @lewurm
|
||||
/mono/utils/atomic* @lewurm @luhenry
|
||||
/mono/utils/mono-hwcap* @lewurm @luhenry
|
||||
/mono/utils/mono-mem* @lewurm @luhenry
|
||||
/mono/utils/mono-threads* @luhenry @vargaz
|
||||
/mono/utils/*-win* @lateralusX @jay
|
||||
|
||||
/msvc @lateralusX @luhenry
|
||||
/msvc/*profiler* @alexrp @luhenry
|
||||
/msvc/scripts @akoeplinger @kg
|
||||
|
||||
/packaging @alexischr @akoeplinger @luhenry @directhex
|
||||
/packaging/MacSDK/msbuild.py @radical @akoeplinger
|
||||
|
||||
/runtime @akoeplinger @marek-safar @luhenry
|
||||
|
||||
/samples @luhenry @lewurm
|
||||
/samples/profiler @alexrp @luhenry
|
||||
/samples/size @alexrp @luhenry
|
||||
|
||||
/scripts @akoeplinger @luhenry
|
||||
/scripts/ci @akoeplinger @alexischr
|
||||
|
||||
/sdks @marek-safar @luhenry @vargaz
|
||||
/sdks/builds/android* @luhenry @jonpryor
|
||||
/sdks/builds/mxe* @luhenry @jonpryor
|
||||
/sdks/builds/ios* @vargaz @rolfbjarne
|
||||
/sdks/builds/wasm* @vargaz @kjpou1
|
||||
/sdks/wasm @vargaz @kjpou1 @kg
|
||||
/sdks/ios @vargaz @rolfbjarne
|
||||
/sdks/android @luhenry @jonpryor
|
||||
|
||||
/support @luhenry @vargaz
|
||||
|
||||
/tools @luhenry @vargaz
|
||||
/tools/locale-builder @marek-safar @egorbo
|
||||
/tools/monograph @vargaz @vargaz
|
||||
/tools/nuget-hash-extractor @marek-safar @radical
|
||||
/tools/offsets-tool @lewurm @rolfbjarne
|
||||
/tools/pedump @lambdageek @lewurm
|
||||
/tools/sgen @brzvlad @vargaz
|
||||
+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
-6
@@ -40,7 +40,6 @@ Ankh.NoLoad
|
||||
*.gpState
|
||||
.vscode/
|
||||
*.exp
|
||||
.vs/
|
||||
|
||||
# Tooling
|
||||
_ReSharper*/
|
||||
@@ -89,9 +88,7 @@ stamp-h.in
|
||||
*~
|
||||
*.swp
|
||||
*.o
|
||||
*.dylib
|
||||
.deps
|
||||
.libs
|
||||
|
||||
# Libtool
|
||||
libtool.m4
|
||||
@@ -132,6 +129,4 @@ mono-*.tar.*
|
||||
tmpinst-dir.stamp
|
||||
msvc/scripts/inputs/
|
||||
extensions-config.h
|
||||
*.mlpd
|
||||
llvm/build/
|
||||
llvm/usr/
|
||||
|
||||
@@ -58,10 +58,3 @@
|
||||
[submodule "external/api-snapshot"]
|
||||
path = external/api-snapshot
|
||||
url = git://github.com/mono/api-snapshot.git
|
||||
[submodule "external/llvm"]
|
||||
path = external/llvm
|
||||
url = git://github.com/mono/llvm.git
|
||||
branch = release_60
|
||||
[submodule "external/helix-binaries"]
|
||||
path = external/helix-binaries
|
||||
url = git://github.com/mono/helix-binaries.git
|
||||
Vendored
-91
@@ -1,91 +0,0 @@
|
||||
{
|
||||
"configurations": [
|
||||
{
|
||||
"name": "Mac",
|
||||
"includePath": [
|
||||
"/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1",
|
||||
"/usr/local/include",
|
||||
"/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/9.0.0/include",
|
||||
"/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include",
|
||||
"/usr/include",
|
||||
"${workspaceRoot}",
|
||||
"${workspaceRoot}/mono",
|
||||
"${workspaceRoot}/mono/eglib",
|
||||
"${workspaceRoot}/support"
|
||||
],
|
||||
"defines": [],
|
||||
"intelliSenseMode": "clang-x64",
|
||||
"browse": {
|
||||
"path": [
|
||||
"/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1",
|
||||
"/usr/local/include",
|
||||
"/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/9.0.0/include",
|
||||
"/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include",
|
||||
"/usr/include",
|
||||
"${workspaceRoot}",
|
||||
"${workspaceRoot}/mono",
|
||||
"${workspaceRoot}/mono/eglib",
|
||||
"${workspaceRoot}/support"
|
||||
],
|
||||
"limitSymbolsToIncludedHeaders": true,
|
||||
"databaseFilename": ""
|
||||
},
|
||||
"macFrameworkPath": [
|
||||
"/System/Library/Frameworks",
|
||||
"/Library/Frameworks"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Linux",
|
||||
"includePath": [
|
||||
"/usr/include",
|
||||
"/usr/local/include",
|
||||
"${workspaceRoot}",
|
||||
"${workspaceRoot}/mono",
|
||||
"${workspaceRoot}/mono/eglib",
|
||||
"${workspaceRoot}/support"
|
||||
],
|
||||
"defines": [],
|
||||
"intelliSenseMode": "clang-x64",
|
||||
"browse": {
|
||||
"path": [
|
||||
"/usr/include",
|
||||
"/usr/local/include",
|
||||
"${workspaceRoot}",
|
||||
"${workspaceRoot}/mono",
|
||||
"${workspaceRoot}/mono/eglib",
|
||||
"${workspaceRoot}/support"
|
||||
],
|
||||
"limitSymbolsToIncludedHeaders": true,
|
||||
"databaseFilename": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Win32",
|
||||
"includePath": [
|
||||
"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": [
|
||||
"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
|
||||
+5
-28
@@ -11,17 +11,9 @@ else
|
||||
tools_dir = tools
|
||||
endif
|
||||
|
||||
if ENABLE_MSVC
|
||||
build_with_msvc = msvc
|
||||
build_without_msvc =
|
||||
else
|
||||
build_with_msvc =
|
||||
build_without_msvc = msvc
|
||||
endif
|
||||
|
||||
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
|
||||
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
|
||||
DIST_SUBDIRS = m4 po $(libgc_dir) mono ikvm-native support data runtime scripts man samples tools msvc docs acceptance-tests llvm
|
||||
|
||||
all: update_submodules
|
||||
|
||||
@@ -50,15 +42,8 @@ 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 -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
|
||||
@@ -74,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
|
||||
@@ -147,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>"; \
|
||||
@@ -166,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
|
||||
@@ -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,8 +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 | ppc64 (cs) | [![aix-ppc64][23]][24] |
|
||||
| Debian 8 | ppc64el (cs) | [![debian-8-ppc64el][21]][22]|
|
||||
|
||||
_(cs) = community supported architecture_
|
||||
|
||||
@@ -54,10 +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
|
||||
[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
|
||||
============================
|
||||
@@ -66,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
|
||||
---------------------------------------------
|
||||
@@ -114,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
|
||||
|
||||
@@ -131,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
|
||||
@@ -153,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
|
||||
@@ -215,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
|
||||
@@ -244,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`
|
||||
|
||||
@@ -435,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
|
||||
@@ -504,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.
|
||||
@@ -578,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
|
||||
============================================
|
||||
|
||||
@@ -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": "7a840bd5697ef6ea41f554a09d837636fba9d88d",
|
||||
"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": "f3d9c9f742f9dcb5faf40080db5e7f464dab7e7c",
|
||||
"rev": "83d8279997d8ce4ad344ff9b937b2d13d074dcaa",
|
||||
"remote-branch": "origin/mono",
|
||||
"branch": "mono",
|
||||
"directory": "coreclr"
|
||||
@@ -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 \
|
||||
@@ -3241,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 \
|
||||
@@ -3689,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 \
|
||||
@@ -3712,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 \
|
||||
@@ -3852,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 \
|
||||
@@ -3960,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 \
|
||||
@@ -4966,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 \
|
||||
@@ -5057,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,5 +1,5 @@
|
||||
check-roslyn:
|
||||
@$(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
|
||||
+4
-6
@@ -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,8 +142,8 @@ 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; }
|
||||
|
||||
+487
-1675
File diff suppressed because it is too large.
Load diff
@@ -11,9 +11,6 @@
|
||||
<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"/>
|
||||
|
||||
+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)
|
||||
|
||||
@@ -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
-2
@@ -13,10 +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
|
||||
$(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) $<; }
|
||||
|
||||
-116
@@ -1,116 +0,0 @@
|
||||
# Mono RISC-V Port
|
||||
|
||||
These are some useful links and notes pertaining to the RISC-V port of Mono.
|
||||
|
||||
## Useful RISC-V documents
|
||||
|
||||
* [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 Standard](https://github.com/riscv/riscv-debug-spec/blob/master/riscv-debug-spec.pdf)
|
||||
* [RISC-V Assembly Programmer's Manual](https://github.com/riscv/riscv-asm-manual/blob/master/riscv-asm.md)
|
||||
* [RISC-V ELF psABI Specification](https://github.com/riscv/riscv-elf-psabi-doc/blob/master/riscv-elf.md)
|
||||
|
||||
## Useful RISC-V repositories
|
||||
|
||||
* [RISC-V Organization](https://github.com/riscv)
|
||||
* [RISC-V Linux](https://github.com/riscv/riscv-linux)
|
||||
* [RISC-V LLD](https://github.com/riscv/riscv-lld)
|
||||
* [RISC-V Tools](https://github.com/riscv/riscv-tools)
|
||||
* [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 QEMU](https://github.com/riscv/riscv-qemu)
|
||||
* [RISC-V Opcodes](https://github.com/riscv/riscv-opcodes)
|
||||
* [RISC-V Tests](https://github.com/riscv/riscv-tests)
|
||||
* [lowRISC Organization](https://github.com/lowrisc)
|
||||
* [RISC-V LLVM](https://github.com/lowrisc/riscv-llvm)
|
||||
|
||||
## Setting up a cross environment
|
||||
|
||||
Setting up a cross environment with a Linux toolchain and QEMU is quite easy.
|
||||
|
||||
First, add these to your `.bashrc` (or some other script that you run):
|
||||
|
||||
```bash
|
||||
export RISCV=$HOME/riscv
|
||||
export PATH=$RISCV/bin:$PATH
|
||||
export QEMU_LD_PREFIX=$RISCV/sysroot
|
||||
```
|
||||
|
||||
Install some dependencies needed to build the toolchain:
|
||||
|
||||
```console
|
||||
# apt install autoconf automake autotools-dev curl libmpc-dev libmpfr-dev libgmp-dev libusb-1.0-0-dev gawk build-essential bison flex texinfo gperf libtool patchutils bc zlib1g-dev device-tree-compiler pkg-config libexpat-dev libglib2.0-dev libpixman-1-dev
|
||||
```
|
||||
|
||||
Now you can build the toolchain:
|
||||
|
||||
```console
|
||||
$ git clone --recursive [email protected]:riscv/riscv-tools.git
|
||||
$ cd riscv-tools
|
||||
$ ./build.sh
|
||||
$ cd riscv-gnu-toolchain
|
||||
$ ./configure --prefix=$RISCV --enable-multilib
|
||||
$ make linux
|
||||
$ cd ../..
|
||||
$ git clone --recursive [email protected]:riscv/riscv-qemu.git
|
||||
$ cd riscv-qemu
|
||||
$ mkdir build
|
||||
$ cd build
|
||||
$ ../configure --prefix=$RISCV --disable-werror
|
||||
$ make
|
||||
$ make install
|
||||
```
|
||||
|
||||
## Building Mono with a cross toolchain
|
||||
|
||||
Building Mono is quite straightforward:
|
||||
|
||||
```console
|
||||
$ ./autogen.sh --prefix=$RISCV/sysroot --host=riscv64-unknown-linux-gnu
|
||||
$ make
|
||||
$ make install
|
||||
```
|
||||
|
||||
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-unknown-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 $RISCV/sysroot/bin/mono hello.exe
|
||||
```
|
||||
|
||||
## Debugging
|
||||
|
||||
```console
|
||||
$ qemu-riscv64 -g 12345 ./mono/mini/mono-sgen --interp basic.exe &
|
||||
$ riscv64-unknown-elf-gdb -ex 'target remote localhost:12345' -ex 'b main' -ex 'c' ./mono/mini/mono-sgen
|
||||
```
|
||||
|
||||
## Things to be done
|
||||
|
||||
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.
|
||||
Vendored
+1
-1
Submodule external/api-snapshot updated: cad071b690...747f69d6d9.
Vendored
+1
-1
Submodule external/binary-reference-assemblies updated: ede573102c...e048fe4a88.
Vendored
+1
-1
Submodule external/bockbuild updated: 0f9e88d46a...cee494cc15.
Vendored
+1
-1
Submodule external/boringssl updated: 3d87996698...2ba8564f8b.
Vendored
+1
-1
Submodule external/cecil updated: e5d5fa4a73...b6c50e3d34.
Vendored
+1
-1
Submodule external/corefx updated: ac21f570f9...f2c0be7e62.
Vendored
+1
-1
Submodule external/corert updated: 1b7d4a1e4b...aa64b376c1.
Vendored
-1
Submodule external/helix-binaries deleted from b4f5d25ecc.
Vendored
+1
-1
Submodule external/ikdasm updated: 471d5827c9...465c081555.
Vendored
+1
-1
Submodule external/linker updated: 84a79a11a9...dccb0d2378.
Vendored
-1
Submodule external/llvm deleted from 1aaaaa5246.
Vendored
+1
-1
Submodule external/nuget-buildtasks updated: 9955847957...b2c30bc81b.
Vendored
+1
-1
Submodule external/nunit-lite updated: 0029561453...00e259a4bd.
Vendored
+1
-1
Submodule external/roslyn-binaries updated: 249709faa5...ab3485efcd.
Vendored
+1
-1
Submodule external/xunit-binaries updated: 8f6e62e1c0...9df2dda529.
@@ -1,11 +1,9 @@
|
||||
|
||||
AM_CPPFLAGS = $(GLIB_CFLAGS)
|
||||
|
||||
glib_libs = $(top_builddir)/mono/eglib/libeglib.la
|
||||
|
||||
lib_LTLIBRARIES = libikvm-native.la
|
||||
|
||||
libikvm_native_la_SOURCES = jni.c os.c jni.h
|
||||
|
||||
libikvm_native_la_LDFLAGS = -avoid-version
|
||||
libikvm_native_la_LIBADD = $(glib_libs)
|
||||
libikvm_native_la_LIBADD = $(GLIB_LIBS)
|
||||
@@ -185,6 +185,3 @@ EXTRA_DIST += configure.host
|
||||
.S.s:
|
||||
if $(CPP) $< >$@ ; then :; else rm -f $@; fi
|
||||
|
||||
test:
|
||||
|
||||
test-bundle:
|
||||
+4
-5
@@ -74,13 +74,12 @@ if test x$NOCONFIGURE = x && test -z "$*"; then
|
||||
echo
|
||||
fi
|
||||
|
||||
am_opt="--add-missing --copy --gnu -Wno-obsolete"
|
||||
|
||||
case $CC in
|
||||
xlc )
|
||||
am_opt="$am_opt --include-deps";;
|
||||
am_opt=--include-deps;;
|
||||
esac
|
||||
|
||||
|
||||
if grep "^AC_PROG_LIBTOOL" configure.ac >/dev/null; then
|
||||
if test -z "$NO_LIBTOOLIZE" ; then
|
||||
echo "Running libtoolize..."
|
||||
@@ -105,8 +104,8 @@ 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-obsolete $am_opt ||
|
||||
{ echo "**Error**: automake failed."; exit 1; }
|
||||
echo "Running autoconf ..."
|
||||
autoconf || { echo "**Error**: autoconf failed."; exit 1; }
|
||||
|
||||
+1
-2
@@ -396,8 +396,7 @@ GC_bool GC_register_main_static_data()
|
||||
|
||||
# if (defined(LINUX) || defined (__GLIBC__) || defined(NACL)) /* Are others OK here, too? */ \
|
||||
&& (__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2) \
|
||||
|| (__GLIBC__ == 2 && __GLIBC_MINOR__ == 2 && defined(DT_CONFIG))) \
|
||||
|| defined(OPENBSD)
|
||||
|| (__GLIBC__ == 2 && __GLIBC_MINOR__ == 2 && defined(DT_CONFIG)))
|
||||
|
||||
/* We have the header files for a glibc that includes dl_iterate_phdr. */
|
||||
/* It may still not be available in the library on the target system. */
|
||||
|
||||
+9
-49
@@ -42,6 +42,11 @@
|
||||
# define GC_CONST
|
||||
# endif
|
||||
|
||||
# ifdef __cplusplus
|
||||
extern "C" {
|
||||
# endif
|
||||
|
||||
|
||||
/* Define word and signed_word to be unsigned and signed types of the */
|
||||
/* size as char * or void *. There seems to be no way to do this */
|
||||
/* even semi-portably. The following is probably no better/worse */
|
||||
@@ -61,10 +66,6 @@
|
||||
typedef __int64 GC_signed_word;
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* Public read-only variables */
|
||||
|
||||
GC_API GC_word GC_gc_no;/* Counter incremented per collection. */
|
||||
@@ -500,17 +501,7 @@ GC_API GC_PTR GC_malloc_atomic_ignore_off_page GC_PROTO((size_t lb));
|
||||
#endif
|
||||
|
||||
#if defined(__linux__) || defined(__GLIBC__)
|
||||
|
||||
#ifdef __cplusplus
|
||||
} // extern "C"
|
||||
#endif
|
||||
|
||||
# include <features.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
# if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1 || __GLIBC__ > 2) \
|
||||
&& !defined(__ia64__)
|
||||
# ifndef GC_HAVE_BUILTIN_BACKTRACE
|
||||
@@ -844,18 +835,6 @@ typedef GC_PTR (*GC_fn_type) GC_PROTO((GC_PTR client_data));
|
||||
GC_API GC_PTR GC_call_with_alloc_lock
|
||||
GC_PROTO((GC_fn_type fn, GC_PTR client_data));
|
||||
|
||||
/*
|
||||
* These are similar to GC_do_blocking () in upstream bdwgc. The design is
|
||||
* simpler in that there is no distinction between active and inactive stack
|
||||
* frames; instead, while a thread is in blocking state, it promises to not
|
||||
* interact with the GC at all, and to not keep any pointers to GC memory
|
||||
* around from before entering blocking state. Additionally, these can be
|
||||
* called unbalanced (they simply set a flag internally).
|
||||
*/
|
||||
GC_API void GC_start_blocking GC_PROTO((void));
|
||||
|
||||
GC_API void GC_end_blocking GC_PROTO((void));
|
||||
|
||||
/* The following routines are primarily intended for use with a */
|
||||
/* preprocessor which inserts calls to check C pointer arithmetic. */
|
||||
/* They indicate failure by invoking the corresponding _print_proc. */
|
||||
@@ -974,17 +953,7 @@ GC_API void (*GC_is_visible_print_proc)
|
||||
|
||||
#if !defined(GC_USE_LD_WRAP) && \
|
||||
(defined(GC_PTHREADS) || defined(GC_SOLARIS_THREADS) || defined(GC_DARWIN_THREADS) || defined(GC_MACOSX_THREADS))
|
||||
|
||||
#ifdef __cplusplus
|
||||
} // extern "C"
|
||||
#endif
|
||||
|
||||
# include "gc_pthread_redirects.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
# if defined(PCR) || defined(GC_SOLARIS_THREADS) || \
|
||||
@@ -1004,17 +973,8 @@ extern void GC_thr_init(void); /* Needed for Solaris/X86 */
|
||||
#endif /* THREADS && !SRC_M3 */
|
||||
|
||||
#if defined(GC_WIN32_THREADS) && !defined(__CYGWIN32__) && !defined(__CYGWIN__)
|
||||
|
||||
#ifdef __cplusplus
|
||||
} // extern "C"
|
||||
#endif
|
||||
|
||||
# include <windows.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
# ifdef GC_INSIDE_DLL
|
||||
BOOL WINAPI GC_DllMain(HINSTANCE inst, ULONG reason, LPVOID reserved);
|
||||
# endif
|
||||
@@ -1109,10 +1069,6 @@ extern "C" {
|
||||
GC_API void GC_win32_free_heap ();
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
} // extern "C"
|
||||
#endif
|
||||
|
||||
#if ( defined(_AMIGA) && !defined(GC_AMIGA_MAKINGLIB) )
|
||||
/* Allocation really goes through GC_amiga_allocwrapper_do */
|
||||
# include "gc_amiga_redirects.h"
|
||||
@@ -1122,4 +1078,8 @@ extern "C" {
|
||||
# include "gc_local_alloc.h"
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /* end of extern "C" */
|
||||
#endif
|
||||
|
||||
#endif /* _GC_H */
|
||||
@@ -44,10 +44,6 @@
|
||||
# include "gc.h"
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* The following allocators signal an out of memory condition with */
|
||||
/* return GC_oom_fn(bytes); */
|
||||
|
||||
@@ -114,8 +110,4 @@ extern int GC_gcj_debug_kind;
|
||||
GC_gcj_malloc_ignore_off_page(s,d)
|
||||
# endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
} // extern "C"
|
||||
#endif
|
||||
|
||||
#endif /* GC_GCJ_H */
|
||||
@@ -49,10 +49,6 @@
|
||||
#ifndef GC_LOCAL_ALLOC_H
|
||||
#define GC_LOCAL_ALLOC_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* We assume ANSI C for this interface. */
|
||||
|
||||
GC_PTR GC_local_malloc(size_t bytes);
|
||||
@@ -66,10 +62,6 @@ GC_PTR GC_local_malloc_atomic(size_t bytes);
|
||||
void * ptr_to_struct_containing_descr);
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
} // extern "C"
|
||||
#endif
|
||||
|
||||
# ifdef GC_DEBUG
|
||||
/* We don't really use local allocation in this case. */
|
||||
# define GC_LOCAL_MALLOC(s) GC_debug_malloc(s,GC_EXTRAS)
|
||||
|
||||
@@ -15,11 +15,6 @@
|
||||
/* facility in thr_keycreate. Alternatively, keep a redundant pointer */
|
||||
/* to thread specific data on the thread stack. */
|
||||
# include <thread.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
int GC_thr_create(void *stack_base, size_t stack_size,
|
||||
void *(*start_routine)(void *), void *arg, long flags,
|
||||
thread_t *new_thread);
|
||||
@@ -31,22 +26,11 @@ extern "C" {
|
||||
# define thr_join GC_thr_join
|
||||
# define thr_suspend GC_thr_suspend
|
||||
# define thr_continue GC_thr_continue
|
||||
|
||||
#ifdef __cplusplus
|
||||
} // extern "C"
|
||||
#endif
|
||||
|
||||
#endif /* GC_SOLARIS_THREADS */
|
||||
|
||||
#if defined(GC_SOLARIS_PTHREADS)
|
||||
|
||||
# include <pthread.h>
|
||||
# include <signal.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
extern int GC_pthread_create(pthread_t *new_thread,
|
||||
const pthread_attr_t *attr,
|
||||
void * (*thread_execp)(void *), void *arg);
|
||||
@@ -55,11 +39,6 @@ extern "C" {
|
||||
# define pthread_join GC_pthread_join
|
||||
# define pthread_create GC_pthread_create
|
||||
# define pthread_detach GC_pthread_detach
|
||||
|
||||
#ifdef __cplusplus
|
||||
} // extern "C"
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
#if defined(GC_SOLARIS_PTHREADS) || defined(GC_SOLARIS_THREADS)
|
||||
@@ -72,10 +51,6 @@ extern "C" {
|
||||
# include <pthread.h>
|
||||
# include <signal.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
int GC_pthread_create(pthread_t *new_thread,
|
||||
const pthread_attr_t *attr,
|
||||
void *(*start_routine)(void *), void *arg);
|
||||
@@ -112,10 +87,6 @@ extern "C" {
|
||||
# define dlopen GC_dlopen
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
} // extern "C"
|
||||
#endif
|
||||
|
||||
#endif /* GC_xxxxx_THREADS */
|
||||
|
||||
#endif /* GC_PTHREAD_REDIRECTS_H */
|
||||
@@ -43,17 +43,7 @@
|
||||
*
|
||||
*/
|
||||
# ifdef THREADS
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
void GC_noop1 GC_PROTO((word));
|
||||
|
||||
#ifdef __cplusplus
|
||||
} // extern "C"
|
||||
#endif
|
||||
|
||||
# ifdef PCR_OBSOLETE /* Faster, but broken with multiple lwp's */
|
||||
# include "th/PCR_Th.h"
|
||||
# include "th/PCR_ThCrSec.h"
|
||||
|
||||
@@ -366,10 +366,6 @@ void GC_print_callers GC_PROTO((struct callinfo info[NFRAMES]));
|
||||
# define BZERO(x,n) bzero((char *)(x),(int)(n))
|
||||
# endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#if defined(DARWIN)
|
||||
# if defined(POWERPC)
|
||||
# define GC_MACH_THREAD_STATE_FLAVOR PPC_THREAD_STATE
|
||||
@@ -417,18 +413,7 @@ extern "C" {
|
||||
* Stop and restart mutator threads.
|
||||
*/
|
||||
# ifdef PCR
|
||||
|
||||
#ifdef __cplusplus
|
||||
} // extern "C"
|
||||
#endif
|
||||
|
||||
# include "th/PCR_ThCtl.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
# define STOP_WORLD() \
|
||||
PCR_ThCtl_SetExclusiveMode(PCR_ThCtl_ExclusiveMode_stopNormal, \
|
||||
PCR_allSigsBlocked, \
|
||||
@@ -1330,7 +1315,7 @@ void GC_initiate_gc GC_PROTO((void));
|
||||
/* If the mark state is invalid, this */
|
||||
/* becomes full colleection. Otherwise */
|
||||
/* it's partial. */
|
||||
void GC_push_all (void* bottom, void* top);
|
||||
void GC_push_all GC_PROTO((ptr_t bottom, ptr_t top));
|
||||
/* Push everything in a range */
|
||||
/* onto mark stack. */
|
||||
void GC_push_selected GC_PROTO(( \
|
||||
@@ -1975,10 +1960,6 @@ void GC_err_puts GC_PROTO((GC_CONST char *s));
|
||||
/* some other reason. */
|
||||
# endif /* PARALLEL_MARK */
|
||||
|
||||
#ifdef __cplusplus
|
||||
} // extern "C"
|
||||
#endif
|
||||
|
||||
# if defined(GC_PTHREADS) && !defined(GC_SOLARIS_THREADS)
|
||||
/* We define the thread suspension signal here, so that we can refer */
|
||||
/* to it in the dirty bit implementation, if necessary. Ideally we */
|
||||
|
||||
+4
-6
@@ -1191,13 +1191,11 @@ void GC_mark_init()
|
||||
* Should only be used if there is no possibility of mark stack
|
||||
* overflow.
|
||||
*/
|
||||
void GC_push_all(void_bottom, void_top)
|
||||
void* void_bottom;
|
||||
void* void_top;
|
||||
void GC_push_all(bottom, top)
|
||||
ptr_t bottom;
|
||||
ptr_t top;
|
||||
{
|
||||
ptr_t bottom = (ptr_t)void_bottom;
|
||||
ptr_t top = (ptr_t)void_top;
|
||||
word length;
|
||||
register word length;
|
||||
|
||||
bottom = (ptr_t)(((word) bottom + ALIGNMENT-1) & ~(ALIGNMENT-1));
|
||||
top = (ptr_t)(((word) top) & ~(ALIGNMENT-1));
|
||||
|
||||
@@ -1245,6 +1245,7 @@ void GC_start_blocking(void) {
|
||||
GC_thread me;
|
||||
LOCK();
|
||||
me = GC_lookup_thread(pthread_self());
|
||||
GC_ASSERT(!(me -> thread_blocked));
|
||||
# ifdef SPARC
|
||||
me -> stop_info.stack_ptr = (ptr_t)GC_save_regs_in_stack();
|
||||
# else
|
||||
@@ -1272,6 +1273,7 @@ void GC_end_blocking(void) {
|
||||
GC_thread me;
|
||||
LOCK(); /* This will block if the world is stopped. */
|
||||
me = GC_lookup_thread(pthread_self());
|
||||
GC_ASSERT(me -> thread_blocked);
|
||||
me -> thread_blocked = FALSE;
|
||||
UNLOCK();
|
||||
}
|
||||
|
||||
+1
-47
@@ -48,7 +48,6 @@ struct GC_thread_Rep {
|
||||
/* 0 ==> entry not valid. */
|
||||
/* !in_use ==> stack_base == 0 */
|
||||
GC_bool suspended;
|
||||
GC_bool thread_blocked;
|
||||
|
||||
# ifdef CYGWIN32
|
||||
void *status; /* hold exit value until join in case it's a pointer */
|
||||
@@ -175,7 +174,6 @@ static GC_thread GC_new_thread(void) {
|
||||
/* the world, wait here. Hopefully this can't happen on any */
|
||||
/* systems that don't allow us to block here. */
|
||||
while (GC_please_stop) Sleep(20);
|
||||
GC_ASSERT(!thread_table[i]->thread_blocked);
|
||||
return thread_table + i;
|
||||
}
|
||||
|
||||
@@ -225,6 +223,7 @@ static void GC_delete_thread(DWORD thread_id) {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#ifdef CYGWIN32
|
||||
|
||||
/* Return a GC_thread corresponding to a given pthread_t. */
|
||||
@@ -246,20 +245,6 @@ static GC_thread GC_lookup_thread(pthread_t id)
|
||||
return thread_table + i;
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
static GC_thread GC_lookup_thread(DWORD id)
|
||||
{
|
||||
int i;
|
||||
LONG max = GC_get_max_thread_index();
|
||||
|
||||
for (i = 0; i <= max; i++)
|
||||
if (thread_table[i].in_use && thread_table[i].id == id)
|
||||
return &thread_table[i];
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#endif /* CYGWIN32 */
|
||||
|
||||
void GC_push_thread_structures GC_PROTO((void))
|
||||
@@ -279,35 +264,6 @@ void GC_push_thread_structures GC_PROTO((void))
|
||||
# endif
|
||||
}
|
||||
|
||||
/* Wrappers for functions that are likely to block for an appreciable */
|
||||
/* length of time. Must be called in pairs, if at all. */
|
||||
/* Nothing much beyond the system call itself should be executed */
|
||||
/* between these. */
|
||||
|
||||
void GC_start_blocking(void) {
|
||||
GC_thread me;
|
||||
LOCK();
|
||||
#ifdef CYGWIN32
|
||||
me = GC_lookup_thread(pthread_self());
|
||||
#else
|
||||
me = GC_lookup_thread(GetCurrentThreadId());
|
||||
#endif
|
||||
me->thread_blocked = TRUE;
|
||||
UNLOCK();
|
||||
}
|
||||
|
||||
void GC_end_blocking(void) {
|
||||
GC_thread me;
|
||||
LOCK(); /* This will block if the world is stopped. */
|
||||
#ifdef CYGWIN32
|
||||
me = GC_lookup_thread(pthread_self());
|
||||
#else
|
||||
me = GC_lookup_thread(GetCurrentThreadId());
|
||||
#endif
|
||||
me->thread_blocked = FALSE;
|
||||
UNLOCK();
|
||||
}
|
||||
|
||||
/* Defined in misc.c */
|
||||
extern CRITICAL_SECTION GC_write_cs;
|
||||
|
||||
@@ -325,8 +281,6 @@ void GC_stop_world()
|
||||
for (i = 0; i <= GC_get_max_thread_index(); i++)
|
||||
if (thread_table[i].stack_base != 0
|
||||
&& thread_table[i].id != thread_id) {
|
||||
if (thread_table [i].thread_blocked)
|
||||
continue;
|
||||
# ifdef MSWINCE
|
||||
/* SuspendThread will fail if thread is running kernel code */
|
||||
while (SuspendThread(thread_table[i].handle) == (DWORD)-1)
|
||||
|
||||
@@ -1,3 +1,2 @@
|
||||
/Makefile
|
||||
/Makefile.in
|
||||
/llvm_config.mk
|
||||
+22
-48
@@ -1,56 +1,30 @@
|
||||
#
|
||||
# Conditional submodule for llvm
|
||||
#
|
||||
# make reset-llvm will checkout a version of llvm which is suitable for this version of mono
|
||||
# into $top_srcdir/llvm/llvm.
|
||||
#
|
||||
|
||||
EXTRA_DIST=build.mk build_llvm_config.sh
|
||||
LLVM_PATH=llvm
|
||||
|
||||
if ENABLE_LLVM
|
||||
SUBMODULES_CONFIG_FILE = $(top_srcdir)/llvm/SUBMODULES.json
|
||||
include $(top_srcdir)/scripts/submodules/versions.mk
|
||||
|
||||
if HOST_WIN32
|
||||
llvm_config=llvm-config.exe
|
||||
else
|
||||
llvm_config=llvm-config
|
||||
endif
|
||||
$(eval $(call ValidateVersionTemplate,llvm,LLVM))
|
||||
|
||||
if HAVE_ZLIB
|
||||
llvm_extra_libs=-lz
|
||||
else
|
||||
llvm_extra_libs=
|
||||
endif
|
||||
# Bump the given submodule to the revision given by the REV make variable
|
||||
# If COMMIT is 1, commit the change
|
||||
bump-llvm: __bump-version-llvm
|
||||
|
||||
if INTERNAL_LLVM
|
||||
# Bump the given submodule to the branch given by the BRANCH/REMOTE_BRANCH make variables
|
||||
# If COMMIT is 1, commit the change
|
||||
bump-branch-llvm: __bump-branch-llvm
|
||||
|
||||
all-local: configure-llvm build-llvm install-llvm llvm_config.mk
|
||||
# Bump the given submodule to its current GIT version
|
||||
# If COMMIT is 1, commit the change
|
||||
bump-current-llvm: __bump-current-version-llvm
|
||||
|
||||
clean-local: clean-llvm clean-llvm-config
|
||||
clean-local:
|
||||
$(RM) -r $(LLVM_PATH)
|
||||
|
||||
$(mono_build_root)/llvm/llvm_config.mk: install-llvm
|
||||
$(top_srcdir)/llvm/build_llvm_config.sh "$(top_srcdir)/llvm/usr/bin/$(llvm_config)" "$(LLVM_CODEGEN_LIBS)" "$(llvm_extra_libs)" > $@
|
||||
|
||||
else
|
||||
all-local: llvm_config.mk
|
||||
|
||||
clean-local: clean-llvm-config
|
||||
|
||||
$(mono_build_root)/llvm/llvm_config.mk: $(top_srcdir)/llvm/Makefile.am
|
||||
$(top_srcdir)/llvm/build_llvm_config.sh "$(EXTERNAL_LLVM_CONFIG)" "$(LLVM_CODEGEN_LIBS)" "$(llvm_extra_libs)" > $@
|
||||
endif
|
||||
|
||||
llvm_config.mk: $(mono_build_root)/llvm/llvm_config.mk
|
||||
|
||||
clean-llvm-config:
|
||||
- rm -rf llvm_config.mk
|
||||
|
||||
else
|
||||
all-local:
|
||||
|
||||
clean-local:
|
||||
endif
|
||||
|
||||
# Override this so we don't try to re-copy llvm when we install mono
|
||||
install:
|
||||
|
||||
if TARGET_WASM
|
||||
LLVM_TARGET=wasm32
|
||||
else
|
||||
LLVM_TARGET=
|
||||
endif
|
||||
|
||||
include build.mk
|
||||
EXTRA_DIST=SUBMODULES.json
|
||||
@@ -0,0 +1,10 @@
|
||||
[
|
||||
{
|
||||
"name": "llvm",
|
||||
"url": "git://github.com/mono/llvm.git",
|
||||
"rev": "9f79399f87282524fee099b328bd8cbf07929daf",
|
||||
"remote-branch": "origin/master",
|
||||
"branch": "master",
|
||||
"directory": "llvm"
|
||||
}
|
||||
]
|
||||
@@ -1,59 +0,0 @@
|
||||
abs_top_srcdir ?= $(abspath $(CURDIR)/..)
|
||||
|
||||
LLVM_BUILD ?= $(abspath $(abs_top_srcdir)/llvm/build)
|
||||
LLVM_PREFIX ?= $(abspath $(abs_top_srcdir)/llvm/usr)
|
||||
|
||||
# LLVM_BRANCH := $(shell git -C "$(abs_top_srcdir)/external/llvm" rev-parse --abbrev-ref HEAD)
|
||||
LLVM_VERSION := $(shell git -C "$(abs_top_srcdir)/external/llvm" rev-parse HEAD)
|
||||
|
||||
# FIXME: URL should be http://xamjenkinsartifact.blob.core.windows.net/build-package-osx-llvm-$(LLVM_BRANCH)/llvm-osx64-$(LLVM_VERSION).tar.gz
|
||||
LLVM_DOWNLOAD_LOCATION = "http://xamjenkinsartifact.blob.core.windows.net/build-package-osx-llvm-release60/llvm-osx64-$(LLVM_VERSION).tar.gz"
|
||||
|
||||
CMAKE := $(or $(CMAKE),$(shell which cmake))
|
||||
NINJA := $(shell which ninja)
|
||||
|
||||
$(LLVM_BUILD) $(LLVM_PREFIX):
|
||||
mkdir -p $@
|
||||
|
||||
EXTRA_LLVM_ARGS = $(if $(filter $(LLVM_TARGET),wasm32), -DLLVM_BUILD_32_BITS=On -DLLVM_EXPERIMENTAL_TARGETS_TO_BUILD="WebAssembly",)
|
||||
|
||||
# -DLLVM_ENABLE_LIBXML2=Off is needed because xml2 is not used and it breaks 32-bit builds on 64-bit Linux hosts
|
||||
$(LLVM_BUILD)/$(if $(NINJA),build.ninja,Makefile): $(abs_top_srcdir)/external/llvm/CMakeLists.txt | $(LLVM_BUILD) $(LLVM_PREFIX)
|
||||
cd $(LLVM_BUILD) && $(CMAKE) \
|
||||
$(if $(NINJA),-G Ninja) \
|
||||
-DCMAKE_INSTALL_PREFIX="$(LLVM_PREFIX)" \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DLLVM_BUILD_TESTS=Off \
|
||||
-DLLVM_INCLUDE_TESTS=Off \
|
||||
-DLLVM_BUILD_EXAMPLES=Off \
|
||||
-DLLVM_INCLUDE_EXAMPLES=Off \
|
||||
-DLLVM_TOOLS_TO_BUILD="opt;llc;llvm-config;llvm-dis" \
|
||||
-DLLVM_TARGETS_TO_BUILD="X86;ARM;AArch64" \
|
||||
$(EXTRA_LLVM_ARGS) \
|
||||
-DLLVM_ENABLE_ASSERTIONS=$(if $(INTERNAL_LLVM_ASSERTS),On,Off) \
|
||||
-DLLVM_ENABLE_LIBXML2=Off \
|
||||
-DHAVE_FUTIMENS=0 \
|
||||
$(LLVM_CMAKE_ARGS) \
|
||||
$(abs_top_srcdir)/external/llvm
|
||||
|
||||
.PHONY: configure-llvm
|
||||
configure-llvm: $(LLVM_BUILD)/$(if $(NINJA),build.ninja,Makefile)
|
||||
|
||||
# The DESTDIR fix is to prevent the build from trying to install this out-of-build-tree
|
||||
# as the DESTDIR hasn't been created when we're building mono
|
||||
|
||||
.PHONY: build-llvm
|
||||
build-llvm: configure-llvm
|
||||
DESTDIR="" $(if $(NINJA),$(NINJA),$(MAKE)) -C $(LLVM_BUILD)
|
||||
|
||||
.PHONY: install-llvm
|
||||
install-llvm: build-llvm | $(LLVM_PREFIX)
|
||||
DESTDIR="" $(if $(NINJA),$(NINJA),$(MAKE)) -C $(LLVM_BUILD) install
|
||||
|
||||
.PHONY: download-llvm
|
||||
download-llvm:
|
||||
(wget --no-verbose -O - $(LLVM_DOWNLOAD_LOCATION) || curl -L $(LLVM_DOWNLOAD_LOCATION)) | tar -xzf - -C $(dir $(LLVM_PREFIX))
|
||||
|
||||
.PHONY: clean-llvm
|
||||
clean-llvm:
|
||||
$(RM) -r $(LLVM_BUILD) $(LLVM_PREFIX)
|
||||
@@ -1,172 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
llvm_config=$1
|
||||
llvm_codegen_libs="$2"
|
||||
llvm_extra_libs="${@:3}"
|
||||
|
||||
use_llvm_config=1
|
||||
llvm_host_win32=0
|
||||
llvm_host_win32_wsl=0
|
||||
llvm_host_win32_cygwin=0
|
||||
|
||||
function win32_format_path {
|
||||
local formatted_path=$1
|
||||
if [[ $llvm_host_win32_wsl = 1 ]] && [[ $1 != "/mnt/"* ]]; then
|
||||
# if path is not starting with /mnt under WSL it could be a windows path, convert using wslpath.
|
||||
formatted_path="$(wslpath -a "$1")"
|
||||
elif [[ $llvm_host_win32_cygwin = 1 ]] && [[ $1 != "/cygdrive/"* ]]; then
|
||||
# if path is not starting with /cygdrive under CygWin it could be a windows path, convert using cygpath.
|
||||
formatted_path="$(cygpath -a "$1")"
|
||||
fi
|
||||
echo "$formatted_path"
|
||||
}
|
||||
|
||||
if [[ $llvm_config = *".exe" ]]; then
|
||||
llvm_host_win32=1
|
||||
# llvm-config is a windows binary. Check if we are running CygWin or WSL since then we might still be able to run llvm-config.exe
|
||||
host_uname="$(uname -a)"
|
||||
case "$host_uname" in
|
||||
*Microsoft*)
|
||||
use_llvm_config=1
|
||||
llvm_host_win32_wsl=1
|
||||
;;
|
||||
CYGWIN*)
|
||||
use_llvm_config=1
|
||||
llvm_host_win32_cygwin=1
|
||||
;;
|
||||
*)
|
||||
use_llvm_config=0
|
||||
esac
|
||||
fi
|
||||
|
||||
if [[ $llvm_host_win32 = 1 ]]; then
|
||||
llvm_config=$(win32_format_path "$llvm_config")
|
||||
fi
|
||||
|
||||
if [[ $use_llvm_config = 1 ]]; then
|
||||
llvm_api_version=`$llvm_config --mono-api-version` || "0"
|
||||
with_llvm=`$llvm_config --prefix`
|
||||
llvm_config_cflags=`$llvm_config --cflags`
|
||||
llvm_system=`$llvm_config --system-libs`
|
||||
llvm_core_components=`$llvm_config --libs analysis core bitwriter`
|
||||
if [[ $llvm_api_version -lt 600 ]]; then
|
||||
llvm_old_jit=`$llvm_config --libs mcjit jit 2>>/dev/null`
|
||||
else
|
||||
llvm_old_jit=`$llvm_config --libs mcjit 2>>/dev/null`
|
||||
fi
|
||||
llvm_new_jit=`$llvm_config --libs orcjit 2>>/dev/null`
|
||||
|
||||
if [[ ! -z $llvm_codegen_libs ]]; then
|
||||
llvm_extra=`$llvm_config --libs $llvm_codegen_libs`
|
||||
fi
|
||||
|
||||
# When building for Windows subsystem using WSL or CygWin the path returned from llvm-config.exe
|
||||
# could be a Windows style path, make sure to format it into a path usable for WSL/CygWin.
|
||||
if [[ $llvm_host_win32 = 1 ]]; then
|
||||
with_llvm=$(win32_format_path "$with_llvm")
|
||||
fi
|
||||
fi
|
||||
|
||||
# When cross compiling for Windows on system not capable of running Windows binaries, llvm-config.exe can't be used to query for
|
||||
# LLVM parameters. In that scenario we will need to fallback to default values.
|
||||
if [[ $llvm_host_win32 = 1 ]] && [[ $use_llvm_config = 0 ]]; then
|
||||
# Assume we have llvm-config sitting in llvm-install-root/bin directory, get llvm-install-root directory.
|
||||
with_llvm="$(dirname $llvm_config)"
|
||||
with_llvm="$(dirname $with_llvm)"
|
||||
llvm_config_path=$with_llvm/include/llvm/Config/llvm-config.h
|
||||
|
||||
# llvm-config.exe --mono-api-version
|
||||
llvm_api_version=`awk '/MONO_API_VERSION/ { print $3 }' $llvm_config_path`
|
||||
|
||||
# llvm-config.exe --cflags, returned information currently not used.
|
||||
llvm_config_cflags=
|
||||
|
||||
# llvm-config.exe --system-libs
|
||||
if [[ $llvm_api_version -lt 600 ]]; then
|
||||
llvm_system="-limagehlp -lpsapi -lshell32"
|
||||
else
|
||||
llvm_system="-lpsapi -lshell32 -lole32 -luuid -ladvapi32"
|
||||
fi
|
||||
|
||||
# llvm-config.exe --libs analysis core bitwriter
|
||||
if [[ $llvm_api_version -lt 600 ]]; then
|
||||
llvm_core_components="-lLLVMBitWriter -lLLVMAnalysis -lLLVMTarget -lLLVMMC -lLLVMCore -lLLVMSupport"
|
||||
else
|
||||
llvm_core_components="-lLLVMBitWriter -lLLVMAnalysis -lLLVMProfileData -lLLVMObject -lLLVMMCParser -lLLVMMC -lLLVMBitReader -lLLVMCore -lLLVMBinaryFormat -lLLVMSupport -lLLVMDemangle"
|
||||
fi
|
||||
|
||||
# llvm-config.exe --libs mcjit jit
|
||||
if [[ $llvm_api_version -lt 600 ]]; then
|
||||
llvm_old_jit="-lLLVMJIT -lLLVMCodeGen -lLLVMScalarOpts -lLLVMInstCombine -lLLVMTransformUtils -lLLVMipa -lLLVMAnalysis -lLLVMMCJIT -lLLVMTarget -lLLVMRuntimeDyld -lLLVMObject -lLLVMMCParser -lLLVMBitReader -lLLVMExecutionEngine -lLLVMMC -lLLVMCore -lLLVMSupport"
|
||||
else
|
||||
# Current build of LLVM 60 for cross Windows builds doesn't support LLVM JIT.
|
||||
llvm_old_jit=
|
||||
fi
|
||||
|
||||
# LLVM 36 doesn't support new JIT and LLVM 60 is build without LLVM JIT support for cross Windows builds.
|
||||
llvm_new_jit=
|
||||
|
||||
# Check codegen libs and add needed libraries.
|
||||
case "$llvm_codegen_libs" in
|
||||
*x86codegen*)
|
||||
# llvm-config.exe --libs x86codegen
|
||||
if [[ $llvm_api_version -lt 600 ]]; then
|
||||
llvm_extra="-lLLVMX86CodeGen -lLLVMX86Desc -lLLVMX86Info -lLLVMObject -lLLVMBitReader -lLLVMMCDisassembler -lLLVMX86AsmPrinter -lLLVMX86Utils -lLLVMSelectionDAG -lLLVMAsmPrinter -lLLVMMCParser -lLLVMCodeGen -lLLVMScalarOpts -lLLVMInstCombine -lLLVMTransformUtils -lLLVMipa -lLLVMAnalysis -lLLVMTarget -lLLVMMC -lLLVMCore -lLLVMSupport"
|
||||
else
|
||||
llvm_extra="-lLLVMX86CodeGen -lLLVMGlobalISel -lLLVMX86Desc -lLLVMX86Info -lLLVMMCDisassembler -lLLVMX86AsmPrinter -lLLVMX86Utils -lLLVMSelectionDAG -lLLVMAsmPrinter -lLLVMDebugInfoCodeView -lLLVMDebugInfoMSF -lLLVMCodeGen -lLLVMTarget -lLLVMScalarOpts -lLLVMInstCombine -lLLVMTransformUtils -lLLVMBitWriter -lLLVMAnalysis -lLLVMProfileData -lLLVMObject -lLLVMMCParser -lLLVMMC -lLLVMBitReader -lLLVMCore -lLLVMBinaryFormat -lLLVMSupport -lLLVMDemangle"
|
||||
fi
|
||||
;;
|
||||
*armcodegen*)
|
||||
# llvm-config.exe --libs armcodegen
|
||||
if [[ $llvm_api_version -lt 600 ]]; then
|
||||
llvm_extra="-lLLVMARMCodeGen -lLLVMSelectionDAG -lLLVMAsmPrinter -lLLVMMCParser -lLLVMCodeGen -lLLVMScalarOpts -lLLVMInstCombine -lLLVMTransformUtils -lLLVMipa -lLLVMAnalysis -lLLVMTarget -lLLVMCore -lLLVMARMDesc -lLLVMMCDisassembler -lLLVMARMInfo -lLLVMARMAsmPrinter -lLLVMMC -lLLVMSupport"
|
||||
else
|
||||
llvm_extra="-lLLVMARMCodeGen -lLLVMGlobalISel -lLLVMSelectionDAG -lLLVMAsmPrinter -lLLVMDebugInfoCodeView -lLLVMDebugInfoMSF -lLLVMCodeGen -lLLVMTarget -lLLVMScalarOpts -lLLVMInstCombine -lLLVMTransformUtils -lLLVMBitWriter -lLLVMAnalysis -lLLVMProfileData -lLLVMObject -lLLVMMCParser -lLLVMBitReader -lLLVMCore -lLLVMBinaryFormat -lLLVMARMDesc -lLLVMMCDisassembler -lLLVMARMInfo -lLLVMARMAsmPrinter -lLLVMARMUtils -lLLVMMC -lLLVMSupport -lLLVMDemangle"
|
||||
fi
|
||||
;;
|
||||
*aarch64codegen*)
|
||||
# llvm-config.exe --libs aarch64codegen
|
||||
if [[ $llvm_api_version -lt 600 ]]; then
|
||||
llvm_extra="-lLLVMAArch64CodeGen -lLLVMSelectionDAG -lLLVMAsmPrinter -lLLVMMCParser -lLLVMCodeGen -lLLVMScalarOpts -lLLVMInstCombine -lLLVMTransformUtils -lLLVMipa -lLLVMAnalysis -lLLVMTarget -lLLVMCore -lLLVMAArch64Desc -lLLVMAArch64Info -lLLVMAArch64AsmPrinter -lLLVMMC -lLLVMAArch64Utils -lLLVMSupport"
|
||||
else
|
||||
llvm_extra="-lLLVMAArch64CodeGen -lLLVMGlobalISel -lLLVMSelectionDAG -lLLVMAsmPrinter -lLLVMDebugInfoCodeView -lLLVMDebugInfoMSF -lLLVMCodeGen -lLLVMTarget -lLLVMScalarOpts -lLLVMInstCombine -lLLVMTransformUtils -lLLVMBitWriter -lLLVMAnalysis -lLLVMProfileData -lLLVMObject -lLLVMMCParser -lLLVMBitReader -lLLVMCore -lLLVMBinaryFormat -lLLVMAArch64Desc -lLLVMAArch64Info -lLLVMAArch64AsmPrinter -lLLVMMC -lLLVMAArch64Utils -lLLVMSupport -lLLVMDemangle"
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
llvm_extra=$llvm_codegen_libs
|
||||
esac
|
||||
fi
|
||||
|
||||
if [[ $llvm_config_cflags = *"stdlib=libc++"* ]]; then
|
||||
llvm_libc_c="-stdlib=libc++"
|
||||
llvm_libc_link="-lc++"
|
||||
else
|
||||
llvm_libc_c=""
|
||||
llvm_libc_link="-lstdc++"
|
||||
fi
|
||||
|
||||
if [[ $llvm_host_win32 = 1 ]]; then
|
||||
host_cxxflag_additions="-std=gnu++11"
|
||||
host_cflag_additions="-DNDEBUG"
|
||||
else
|
||||
host_cxxflag_additions="-std=c++11"
|
||||
host_cflag_additions=""
|
||||
fi
|
||||
|
||||
if [[ ! -z $llvm_extra_libs ]]; then
|
||||
llvm_extra="$llvm_extra $llvm_extra_libs"
|
||||
fi
|
||||
|
||||
# llvm-config --clfags adds warning and optimization flags we don't want
|
||||
cflags_additions="-I$with_llvm/include -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -DLLVM_API_VERSION=$llvm_api_version $llvm_libc_c $host_cflag_additions"
|
||||
|
||||
cxxflag_additions="-fno-rtti -fexceptions $host_cxxflag_additions"
|
||||
|
||||
ldflags="-L$with_llvm/lib"
|
||||
|
||||
llvm_lib_components="$llvm_core_components $llvm_old_jit $llvm_new_jit $llvm_extra"
|
||||
|
||||
echo "LLVM_CFLAGS_INTERNAL=$cflags_additions"
|
||||
echo "LLVM_CXXFLAGS_INTERNAL=$cflags_additions $cxxflag_additions"
|
||||
echo "LLVM_LDFLAGS_INTERNAL=$ldflags"
|
||||
echo "LLVM_LIBS_INTERNAL=$llvm_lib_components $ldflags $llvm_system $llvm_libc_link"
|
||||
+1
-1
@@ -1 +1 @@
|
||||
EXTRA_DIST = lib-ld.m4 lib-link.m4 lib-prefix.m4 $(wildcard *.m4)
|
||||
EXTRA_DIST = iconv.m4 lib-ld.m4 lib-link.m4 lib-prefix.m4 $(wildcard *.m4)
|
||||
@@ -1,40 +0,0 @@
|
||||
# Usage:
|
||||
# AC_MONO_APPLE_TARGET(target-name, action-if-found, action-if-not-found)
|
||||
#
|
||||
# Checks whether `target-name` is defined in "TargetConditionals.h"
|
||||
#
|
||||
AC_DEFUN([AC_MONO_APPLE_TARGET], [
|
||||
AC_MONO_APPLE_AVAILABLE([$1], [for $1], [$1 == 1], $2, $3)
|
||||
])
|
||||
|
||||
|
||||
# Usage:
|
||||
# AC_MONO_APPLE_AVAILABLE(name, message, conditional, action-if-found, action-if-not-found)
|
||||
#
|
||||
# Checks for `conditional` using "TargetConditionals.h" and "AvailabilityMacros.h"
|
||||
#
|
||||
AC_DEFUN([AC_MONO_APPLE_AVAILABLE], [
|
||||
# cache the compilation check
|
||||
AC_CACHE_CHECK([$2], [ac_cv_apple_available_[]$1], [
|
||||
AC_TRY_COMPILE([
|
||||
#include "TargetConditionals.h"
|
||||
#include "AvailabilityMacros.h"
|
||||
],[
|
||||
#if !($3)
|
||||
#error failed
|
||||
#endif
|
||||
], [
|
||||
ac_cv_apple_available_[]$1=yes
|
||||
], [
|
||||
ac_cv_apple_available_[]$1=no
|
||||
])
|
||||
])
|
||||
# keep the actions out of the cache check because they need to be always executed.
|
||||
if test x$ac_cv_apple_available_[]$1 = xyes; then
|
||||
$1=yes
|
||||
[$4]
|
||||
else
|
||||
$1=no
|
||||
[$5]
|
||||
fi
|
||||
])
|
||||
+214
@@ -0,0 +1,214 @@
|
||||
# iconv.m4 serial 11 (gettext-0.18.1)
|
||||
dnl Copyright (C) 2000-2002, 2007-2010 Free Software Foundation, Inc.
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
dnl gives unlimited permission to copy and/or distribute it,
|
||||
dnl with or without modifications, as long as this notice is preserved.
|
||||
|
||||
dnl From Bruno Haible.
|
||||
|
||||
AC_DEFUN([AM_ICONV_LINKFLAGS_BODY],
|
||||
[
|
||||
dnl Prerequisites of AC_LIB_LINKFLAGS_BODY.
|
||||
AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
|
||||
AC_REQUIRE([AC_LIB_RPATH])
|
||||
|
||||
dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
|
||||
dnl accordingly.
|
||||
AC_LIB_LINKFLAGS_BODY([iconv])
|
||||
])
|
||||
|
||||
AC_DEFUN([AM_ICONV_LINK],
|
||||
[
|
||||
dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and
|
||||
dnl those with the standalone portable GNU libiconv installed).
|
||||
AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
|
||||
|
||||
dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
|
||||
dnl accordingly.
|
||||
AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY])
|
||||
|
||||
dnl Add $INCICONV to CPPFLAGS before performing the following checks,
|
||||
dnl because if the user has installed libiconv and not disabled its use
|
||||
dnl via --without-libiconv-prefix, he wants to use it. The first
|
||||
dnl AC_TRY_LINK will then fail, the second AC_TRY_LINK will succeed.
|
||||
am_save_CPPFLAGS="$CPPFLAGS"
|
||||
AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCICONV])
|
||||
|
||||
AC_CACHE_CHECK([for iconv], [am_cv_func_iconv], [
|
||||
am_cv_func_iconv="no, consider installing GNU libiconv"
|
||||
am_cv_lib_iconv=no
|
||||
AC_TRY_LINK([#include <stdlib.h>
|
||||
#include <iconv.h>],
|
||||
[iconv_t cd = iconv_open("","");
|
||||
iconv(cd,NULL,NULL,NULL,NULL);
|
||||
iconv_close(cd);],
|
||||
[am_cv_func_iconv=yes])
|
||||
if test "$am_cv_func_iconv" != yes; then
|
||||
am_save_LIBS="$LIBS"
|
||||
LIBS="$LIBS $LIBICONV"
|
||||
AC_TRY_LINK([#include <stdlib.h>
|
||||
#include <iconv.h>],
|
||||
[iconv_t cd = iconv_open("","");
|
||||
iconv(cd,NULL,NULL,NULL,NULL);
|
||||
iconv_close(cd);],
|
||||
[am_cv_lib_iconv=yes]
|
||||
[am_cv_func_iconv=yes])
|
||||
LIBS="$am_save_LIBS"
|
||||
fi
|
||||
])
|
||||
if test "$am_cv_func_iconv" = yes; then
|
||||
AC_CACHE_CHECK([for working iconv], [am_cv_func_iconv_works], [
|
||||
dnl This tests against bugs in AIX 5.1, HP-UX 11.11, Solaris 10.
|
||||
am_save_LIBS="$LIBS"
|
||||
if test $am_cv_lib_iconv = yes; then
|
||||
LIBS="$LIBS $LIBICONV"
|
||||
fi
|
||||
AC_TRY_RUN([
|
||||
#include <iconv.h>
|
||||
#include <string.h>
|
||||
int main ()
|
||||
{
|
||||
/* Test against AIX 5.1 bug: Failures are not distinguishable from successful
|
||||
returns. */
|
||||
{
|
||||
iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8");
|
||||
if (cd_utf8_to_88591 != (iconv_t)(-1))
|
||||
{
|
||||
static const char input[] = "\342\202\254"; /* EURO SIGN */
|
||||
char buf[10];
|
||||
const char *inptr = input;
|
||||
size_t inbytesleft = strlen (input);
|
||||
char *outptr = buf;
|
||||
size_t outbytesleft = sizeof (buf);
|
||||
size_t res = iconv (cd_utf8_to_88591,
|
||||
(char **) &inptr, &inbytesleft,
|
||||
&outptr, &outbytesleft);
|
||||
if (res == 0)
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
/* Test against Solaris 10 bug: Failures are not distinguishable from
|
||||
successful returns. */
|
||||
{
|
||||
iconv_t cd_ascii_to_88591 = iconv_open ("ISO8859-1", "646");
|
||||
if (cd_ascii_to_88591 != (iconv_t)(-1))
|
||||
{
|
||||
static const char input[] = "\263";
|
||||
char buf[10];
|
||||
const char *inptr = input;
|
||||
size_t inbytesleft = strlen (input);
|
||||
char *outptr = buf;
|
||||
size_t outbytesleft = sizeof (buf);
|
||||
size_t res = iconv (cd_ascii_to_88591,
|
||||
(char **) &inptr, &inbytesleft,
|
||||
&outptr, &outbytesleft);
|
||||
if (res == 0)
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
#if 0 /* This bug could be worked around by the caller. */
|
||||
/* Test against HP-UX 11.11 bug: Positive return value instead of 0. */
|
||||
{
|
||||
iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591");
|
||||
if (cd_88591_to_utf8 != (iconv_t)(-1))
|
||||
{
|
||||
static const char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337";
|
||||
char buf[50];
|
||||
const char *inptr = input;
|
||||
size_t inbytesleft = strlen (input);
|
||||
char *outptr = buf;
|
||||
size_t outbytesleft = sizeof (buf);
|
||||
size_t res = iconv (cd_88591_to_utf8,
|
||||
(char **) &inptr, &inbytesleft,
|
||||
&outptr, &outbytesleft);
|
||||
if ((int)res > 0)
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
/* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is
|
||||
provided. */
|
||||
if (/* Try standardized names. */
|
||||
iconv_open ("UTF-8", "EUC-JP") == (iconv_t)(-1)
|
||||
/* Try IRIX, OSF/1 names. */
|
||||
&& iconv_open ("UTF-8", "eucJP") == (iconv_t)(-1)
|
||||
/* Try AIX names. */
|
||||
&& iconv_open ("UTF-8", "IBM-eucJP") == (iconv_t)(-1)
|
||||
/* Try HP-UX names. */
|
||||
&& iconv_open ("utf8", "eucJP") == (iconv_t)(-1))
|
||||
return 1;
|
||||
return 0;
|
||||
}], [am_cv_func_iconv_works=yes], [am_cv_func_iconv_works=no],
|
||||
[case "$host_os" in
|
||||
aix* | hpux*) am_cv_func_iconv_works="guessing no" ;;
|
||||
*) am_cv_func_iconv_works="guessing yes" ;;
|
||||
esac])
|
||||
LIBS="$am_save_LIBS"
|
||||
])
|
||||
case "$am_cv_func_iconv_works" in
|
||||
*no) am_func_iconv=no am_cv_lib_iconv=no ;;
|
||||
*) am_func_iconv=yes ;;
|
||||
esac
|
||||
else
|
||||
am_func_iconv=no am_cv_lib_iconv=no
|
||||
fi
|
||||
if test "$am_func_iconv" = yes; then
|
||||
AC_DEFINE([HAVE_ICONV], [1],
|
||||
[Define if you have the iconv() function and it works.])
|
||||
fi
|
||||
if test "$am_cv_lib_iconv" = yes; then
|
||||
AC_MSG_CHECKING([how to link with libiconv])
|
||||
AC_MSG_RESULT([$LIBICONV])
|
||||
else
|
||||
dnl If $LIBICONV didn't lead to a usable library, we don't need $INCICONV
|
||||
dnl either.
|
||||
CPPFLAGS="$am_save_CPPFLAGS"
|
||||
LIBICONV=
|
||||
LTLIBICONV=
|
||||
fi
|
||||
AC_SUBST([LIBICONV])
|
||||
AC_SUBST([LTLIBICONV])
|
||||
])
|
||||
|
||||
dnl Define AM_ICONV using AC_DEFUN_ONCE for Autoconf >= 2.64, in order to
|
||||
dnl avoid warnings like
|
||||
dnl "warning: AC_REQUIRE: `AM_ICONV' was expanded before it was required".
|
||||
dnl This is tricky because of the way 'aclocal' is implemented:
|
||||
dnl - It requires defining an auxiliary macro whose name ends in AC_DEFUN.
|
||||
dnl Otherwise aclocal's initial scan pass would miss the macro definition.
|
||||
dnl - It requires a line break inside the AC_DEFUN_ONCE and AC_DEFUN expansions.
|
||||
dnl Otherwise aclocal would emit many "Use of uninitialized value $1"
|
||||
dnl warnings.
|
||||
m4_define([gl_iconv_AC_DEFUN],
|
||||
m4_version_prereq([2.64],
|
||||
[[AC_DEFUN_ONCE(
|
||||
[$1], [$2])]],
|
||||
[[AC_DEFUN(
|
||||
[$1], [$2])]]))
|
||||
gl_iconv_AC_DEFUN([AM_ICONV],
|
||||
[
|
||||
AM_ICONV_LINK
|
||||
if test "$am_cv_func_iconv" = yes; then
|
||||
AC_MSG_CHECKING([for iconv declaration])
|
||||
AC_CACHE_VAL([am_cv_proto_iconv], [
|
||||
AC_TRY_COMPILE([
|
||||
#include <stdlib.h>
|
||||
#include <iconv.h>
|
||||
extern
|
||||
#ifdef __cplusplus
|
||||
"C"
|
||||
#endif
|
||||
#if defined(__STDC__) || defined(__cplusplus)
|
||||
size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
|
||||
#else
|
||||
size_t iconv();
|
||||
#endif
|
||||
], [], [am_cv_proto_iconv_arg1=""], [am_cv_proto_iconv_arg1="const"])
|
||||
am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"])
|
||||
am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
|
||||
AC_MSG_RESULT([
|
||||
$am_cv_proto_iconv])
|
||||
AC_DEFINE_UNQUOTED([ICONV_CONST], [$am_cv_proto_iconv_arg1],
|
||||
[Define as const if the declaration of iconv() needs const.])
|
||||
fi
|
||||
])
|
||||
+17
-113
@@ -111,11 +111,10 @@ directory.
|
||||
.SH OPTIONS
|
||||
.TP
|
||||
.I "--config FILE"
|
||||
Specifies that a DLLMAP Mono config file must be bundled as well. In
|
||||
the simple and cross compiler modes, if no config file is specified
|
||||
the one for the current target is picked (either the system one in the
|
||||
case of the simple mode, or the one that came from the cross
|
||||
compilation target for the cross compiling mode).
|
||||
Specifies that a machine.config file must be bundled as well.
|
||||
Typically this is $prefix/etc/mono/1.0/machine.config or
|
||||
$prefix/etc/mono/2.0/machine.config depending on the profile that you
|
||||
are using (1.0 or 2.0)
|
||||
.TP
|
||||
.I "--config-dir DIR"
|
||||
When passed, DIR will be set for the MONO_CFG_DIR environment variable
|
||||
@@ -203,31 +202,13 @@ Provides mkbundle access to a managed linker to preprocess the assemblies.
|
||||
.TP
|
||||
.I "--machine-config FILE"
|
||||
Uses the given FILE as the machine.config file for the generated
|
||||
application. The machine config contains an XML file that is used by
|
||||
System.Configuration APIs to configure the .NET stack. Typically this
|
||||
is
|
||||
.I $prefix/etc/mono/4.5/machine.config.
|
||||
.Sp
|
||||
If you want to disable this automatic bundling, you can use the
|
||||
.I "--no-machine-config"
|
||||
flag. In the simple and cross compiler modes, if no machine.config file is specified
|
||||
the one for the current target is picked (either the system one in the
|
||||
case of the simple mode, or the one that came from the cross
|
||||
compilation target for the cross compiling mode).
|
||||
.TP
|
||||
.I "--no-config"
|
||||
In simple or cross compiling mode, this prevents mkbundle from
|
||||
automatically bundling a config file.
|
||||
application.
|
||||
.TP
|
||||
.I "--nodeps"
|
||||
This is the default: \fImkbundle\fP will only include the assemblies that
|
||||
were specified on the command line to reduce the size of the resulting
|
||||
image created.
|
||||
.TP
|
||||
.I "--no-machine-config"
|
||||
In simple or cross compiling mode, this prevents mkbundle from
|
||||
automatically bundling a machine.config file.
|
||||
.TP
|
||||
.I "-o filename"
|
||||
Places the output on `out'. If the flag -c is specified, this is the
|
||||
C host program. If not, this contains the resulting executable.
|
||||
@@ -271,36 +252,6 @@ This flag is mutually exlusive with
|
||||
By default the mkbundle tool will download from a Mono server the
|
||||
target runtimes, you can specify a different server to provide
|
||||
cross-compiled runtimes.
|
||||
.TP
|
||||
.I "--mono-api-struct-path FILE"
|
||||
FILE points to a file with the definition of the \fIBundleMonoAPI\fP structure which contains the
|
||||
required pointers to various Mono API functions used throughout the generated code. This mechanism
|
||||
is meant to be used by third parties which embed the Mono runtime and dynamically load and initialize
|
||||
it as part of the application startup, in which case the Mono APIs will not be available for the shared
|
||||
library loader and the bundle will fail to work (one example of such an embedding third party is
|
||||
Xamarin.Android).
|
||||
|
||||
After providing the definition FILE, the embedder must call the \fIvoid initialize_mono_api (const BundleMonoAPI *info)\fP
|
||||
function found in the generated code
|
||||
.B before
|
||||
calling \fIvoid mono_mkbundle_init ()\fP. The structure passed to \fIinitialize_mono_api\fP doesn't need
|
||||
to be dynamically allocated as its contents is copied to the local structure in the generated code and no
|
||||
pointer to the passed structure is retained or used after \fIinitialize_mono_api\fP returns.
|
||||
|
||||
The list of pointers is not documented here. Instead, please look at the \fIbundle-mono-api.inc\fP file
|
||||
found in the mkbundle source directory in your Mono source tree (\fImcs/tools/mkbundle\fP) or in the Mono's
|
||||
GitHub repository, https://github.com/mono/mono/blob/master/mcs/tools/mkbundle/bundle-mono-api.inc
|
||||
|
||||
Please note that your structure must match the one expected by your version of the Mono runtime.
|
||||
|
||||
The file must also define the \fImkbundle_log_error\fP function with the following signature:
|
||||
|
||||
.nf
|
||||
static void mkbundle_log_error (const char *format, ...) {}
|
||||
.fi
|
||||
|
||||
The function should implement logging API specific to the embedder.
|
||||
|
||||
.SH OLD EMBEDDING
|
||||
.PP
|
||||
The old embedding system compiles a small C stub that embeds the
|
||||
@@ -389,80 +340,33 @@ not require runtime code generation. The "llvmonly" setting does the same, but f
|
||||
to go through the llvm backend.
|
||||
|
||||
.SH WINDOWS
|
||||
If you are using the old embedding on Windows systems, it possible to use
|
||||
a Unix-like toolchain like cygwin's and install gcc, gcc-mingw packages or
|
||||
use Visual Studio 2015/2017 VC toolchain together with Clang for Visual Studio as assembler.
|
||||
Clang can be installed as an individual component, "Clang/C2", using Visual Studio installer.
|
||||
.PP
|
||||
Using Visual Studio toolchain, mkbundle will, by default, use latest installed Visual Studio compiler
|
||||
and linker as well as Windows SDK. If executed from one of the Visual Studio developer command prompts,
|
||||
mkbundle will retrieve information directly from that build environment.
|
||||
If you are using the old embedding on Windows systems, it it necessary
|
||||
to have Unix-like toolchain to be installed for \fImkbundle\fP to
|
||||
work. You can use cygwin's and install gcc, gcc-mingw and as
|
||||
packages.
|
||||
.SH ENVIRONMENT VARIABLES
|
||||
.TP
|
||||
.I "AS"
|
||||
Assembler command. The default is "as". For Visual Studio, default is "clang.exe".
|
||||
If "clang.exe" for Visual Studio is not installed, mkbundle will fall back using "as".
|
||||
Assembler command. The default is "as".
|
||||
.TP
|
||||
.I "CC"
|
||||
C compiler command. The default is "cc" for Linux, "gcc"
|
||||
for cygwin and "cl.exe" for Visual Studio.
|
||||
C compiler command. The default is "cc" under Linux and "gcc"
|
||||
under Windows.
|
||||
.TP
|
||||
.I "MONO_BUNDLED_OPTIONS"
|
||||
Options to be passed to the bundled
|
||||
Mono runtime, separated by spaces. See the mono(1) manual page or run mono --help.
|
||||
.SH WINDOWS VISUAL STUDIO ENVIRONMENT VARIABLES
|
||||
.TP
|
||||
.I "VisualStudioVersion"
|
||||
Visual Studio version used in mkbundle build.
|
||||
Default, latest installed Visual Studio version.
|
||||
Values, "14.0" for Visual Studio 2015 or "15.0" for Visual Studio 2017.
|
||||
.TP
|
||||
.I "WindowsSdkVersion"
|
||||
Windows SDK version used in mkbundle build.
|
||||
Default/unknown, latest installed Windows SDK.
|
||||
Values, "8.1", "10.0.10240.0", "10.0.15063.0" etc.
|
||||
.TP
|
||||
.I "VSCMD_ARG_TGT_ARCH"
|
||||
Output target architecture used in mkbundle build.
|
||||
Default/unknown, use architecture of .NET runtime executing mkbundle.
|
||||
Values, "x86" or "x64".
|
||||
NOTE, when running from a Visual Studio command prompt, this variable should already be set
|
||||
by the command prompt and match the rest of that build environment.
|
||||
.TP
|
||||
.I "INCLUDE"
|
||||
Override all custom include paths passed to "cl.exe".
|
||||
Predefined by Visual Studio developer command prompt or auto detected by mkbundle when undefined.
|
||||
.TP
|
||||
.I "LIB"
|
||||
Override all custom library paths passed to "link.exe".
|
||||
Predefined by Visual Studio developer command prompt or auto detected by mkbundle when undefined.
|
||||
.TP
|
||||
.I "MONOPREFIX"
|
||||
Use a custom Mono SDK install root matching the output target architecture (x86/x64).
|
||||
Default, mkbundle will look for installed Mono SDK’s matching targeted architecture.
|
||||
.TP
|
||||
.I "MONOLIB"
|
||||
Use a different mono library name or an absolute path to the mono library passed to linker.
|
||||
Default, mkbundle will use default mono library name depending on mkbundle dynamic/static use case.
|
||||
NOTE, supplied mono library needs to match mkbundle dynamic/static use case and target architecture.
|
||||
.TP
|
||||
.I "VCCRT"
|
||||
Override C-runtime library linker settings.
|
||||
Default "MD", mkbundle will use dynamic C-runtime linking on Windows compatible with Mono SDK distribution.
|
||||
If a custom built Mono runtime using static C-Runtime linkage is used, setting this variable to "MT"
|
||||
will link using static C-runtime libraries.
|
||||
.TP
|
||||
.I "VCSUBSYSTEM"
|
||||
Override Windows subsystem.
|
||||
Default, "windows". If console subsystem is preferred, use "console".
|
||||
NOTE, if console output is expected from output target process then
|
||||
set this variable to "console".
|
||||
.SH FILES
|
||||
This program will load referenced assemblies from the Mono assembly
|
||||
cache.
|
||||
.PP
|
||||
Targets are loaded from ~/.mono/targets/TARGETNAME/mono
|
||||
.SH BUGS
|
||||
The option "--static" is not supported under Windows when using the
|
||||
old embedding.
|
||||
Moreover, a full cygwin environment containing at least "gcc" and "as"
|
||||
is required for the build process. The generated executable does not
|
||||
depend on cygwin.
|
||||
.SH MAILING LISTS
|
||||
Visit http://lists.ximian.com/mailman/listinfo/mono-devel-list for details.
|
||||
.SH WEB SITE
|
||||
|
||||
@@ -2,17 +2,12 @@
|
||||
.SH NAME
|
||||
Mono CIL strip
|
||||
.SH SYNOPSIS
|
||||
.B mono-cil-strip [options] assembly [output-assembly]
|
||||
.B mono-cil-strip assembly [output-assembly]
|
||||
.SH DESCRIPTION
|
||||
mono-cil-strip is a tool which takes an assembly, and empty its method bodies.
|
||||
This is useful to reduce an assembly size when an assembly has already been
|
||||
compiled using Mono's Ahead Of Time compiler (AOT), where the CIL code is no
|
||||
longer necessary, but the metadata still is.
|
||||
.SH OPTIONS
|
||||
The following options are available:
|
||||
.TP
|
||||
.I "-q"
|
||||
Only output errors.
|
||||
.SH COPYRIGHT
|
||||
Copyright (C) 2008 Novell, Inc (http://www.novell.com)
|
||||
.SH MAILING LISTS
|
||||
|
||||
+29
-97
@@ -214,20 +214,6 @@ and
|
||||
.I llvm
|
||||
options. This feature is experimental.
|
||||
.TP
|
||||
.I llvmopts=[options]
|
||||
Use this option to add more flags to the built-in set of flags passed to the
|
||||
LLVM optimizer. The list of possible flags that can be passed can be
|
||||
obtained by calling the bundled
|
||||
.I opt
|
||||
program that comes with Mono.
|
||||
.TP
|
||||
.I llvmllc=[options]
|
||||
Use this option to add more flags to the built-in set of flags passed to the
|
||||
LLVM static compiler (llc). The list of possible flags that can be passed can be
|
||||
obtained by calling the bundled
|
||||
.I llc
|
||||
program that comes with Mono.
|
||||
.TP
|
||||
.I llvm-outfile=[filename]
|
||||
Gives the path for the temporary LLVM bitcode file created during AOT.
|
||||
.I dedup
|
||||
@@ -381,9 +367,6 @@ Prints additional information about type loading failures.
|
||||
.TP
|
||||
.I write-symbols,no-write-symbols
|
||||
Instructs the AOT compiler to emit (or not emit) debug symbol information.
|
||||
.TP
|
||||
.I no-opt
|
||||
Instructs the AOT compiler tot no call opt when compiling with LLVM.
|
||||
.PP
|
||||
For more information about AOT, see: http://www.mono-project.com/docs/advanced/aot/
|
||||
.RE
|
||||
@@ -488,9 +471,6 @@ in your program, or Mono's class libraries attempts to generate code
|
||||
dynamically. You should test your software upfront and make sure that
|
||||
you do not use any dynamic features.
|
||||
.TP
|
||||
\fB--full-aot-interp\fR
|
||||
Same as --full-aot with fallback to the interpreter.
|
||||
.TP
|
||||
\fB--gc=boehm\fR, \fB--gc=sgen\fR
|
||||
Selects the Garbage Collector engine for Mono to use, Boehm or SGen.
|
||||
Currently this merely ensures that you are running either the
|
||||
@@ -601,11 +581,6 @@ Controls whether the runtime should attempt to inline (the default),
|
||||
or not inline methods invocations
|
||||
.ne
|
||||
.RE
|
||||
\fB--response=FILE\fR
|
||||
Provides a response file, this instructs the Mono command to read
|
||||
other command line options from the specified file, as if the
|
||||
options had been specified on the command line. Useful when you have
|
||||
very long command lines.
|
||||
.TP
|
||||
\fB--runtime=VERSION\fR
|
||||
Mono supports different runtime versions. The version used depends on the program
|
||||
@@ -830,7 +805,7 @@ This compiles a method (namespace.name:methodname), this is used for
|
||||
testing the compiler performance or to examine the output of the code
|
||||
generator.
|
||||
.TP
|
||||
\fB--compile-all\fR
|
||||
\fB--compileall\fR
|
||||
Compiles all the methods in an assembly. This is used to test the
|
||||
compiler performance or to examine the output of the code generator
|
||||
.TP
|
||||
@@ -854,7 +829,7 @@ on.
|
||||
.TP
|
||||
\fB--ncompile\fR
|
||||
Instruct the runtime on the number of times that the method specified
|
||||
by --compile (or all the methods if --compile-all is used) to be
|
||||
by --compile (or all the methods if --compileall is used) to be
|
||||
compiled. This is used for testing the code generator performance.
|
||||
.TP
|
||||
\fB--stats\fR
|
||||
@@ -1151,13 +1126,15 @@ When Mono is built with a soft float fallback on ARM and this variable is set to
|
||||
"1", Mono will always emit soft float code, even if a VFP unit is
|
||||
detected.
|
||||
.TP
|
||||
\fBMONO_DARWIN_USE_KQUEUE_FSW\fR
|
||||
Fall back on the kqueue FileSystemWatcher implementation in Darwin. The default is the FSEvent implementation.
|
||||
.TP
|
||||
\fBMONO_DARWIN_WATCHER_MAXFDS\fR
|
||||
This is a debugging aid used to force limits on the kqueue FileSystemWatcher
|
||||
This is a debugging aid used to force limits on the FileSystemWatcher
|
||||
implementation in Darwin. There is no limit by default.
|
||||
.TP
|
||||
\fBMONO_DISABLE_AIO\fR
|
||||
If set, tells mono NOT to attempt using native asynchronous I/O services. In
|
||||
that case, a default select/poll implementation is used. Currently only epoll()
|
||||
is supported.
|
||||
.TP
|
||||
\fBMONO_DISABLE_MANAGED_COLLATION\fR
|
||||
If this environment variable is `yes', the runtime uses unmanaged
|
||||
collation (which actually means no culture-sensitive collation). It
|
||||
@@ -1183,38 +1160,19 @@ For platforms that do not otherwise have a way of obtaining random bytes
|
||||
this can be set to the name of a file system socket on which an egd or
|
||||
prngd daemon is listening.
|
||||
.TP
|
||||
\fBMONO_ENABLE_AIO\fR
|
||||
If set, tells mono to attempt using native asynchronous I/O services. If not
|
||||
set, a default select/poll implementation is used. Currently epoll and kqueue
|
||||
are supported.
|
||||
.TP
|
||||
\fBMONO_THREADS_SUSPEND\fR
|
||||
Selects a mechanism that Mono will use to suspend threads. May be set to
|
||||
"preemptive", "coop", or "hybrid". Threads may need to be suspended by the
|
||||
debugger, or using some .NET threading APIs, and most commonly when the SGen
|
||||
garbage collector needs to stop all threads during a critical phase of garbage
|
||||
collection. Preemptive mode is the mode that Mono has used historically, going
|
||||
back to the Boehm days, where the garbage collector would run at any point and
|
||||
suspend execution of all threads as required to perform a garbage collection.
|
||||
The cooperative mode on the other hand requires the cooperation of all threads
|
||||
to stop at a safe point. This makes for an easier to debug garbage collector.
|
||||
As of Mono 4.3.0 it is a work in progress, and while it works, it has not been
|
||||
used extensively. This option enables the feature and allows us to find spots
|
||||
that need to be tuned for this mode of operation. Hybrid mode is a combination
|
||||
of the two that retains better compatability with scenarios where Mono is
|
||||
embedded in another application: threads that are running managed code or code
|
||||
that comprises the Mono runtime will be cooperatively suspended, while threads
|
||||
running embedder code will be preemptively suspended.
|
||||
|
||||
Alternatively, coop and hybrid mode can be enabled at compile time by using the
|
||||
--enable-cooperative-suspend or --enable-hybrid-suspend flags, respectively,
|
||||
when calling configure. The \fBMONO_THREADS_SUSPEND\fR environment variable
|
||||
takes priority over the compiled default.
|
||||
.TP
|
||||
\fBMONO_ENABLE_COOP_SUSPEND\fR
|
||||
This environment variable is obsolete, but retained for backward compatibility.
|
||||
Use \fBMONO_THREADS_SUSPEND\fR set to "coop" instead. Note that if configure flags
|
||||
were provided to enable cooperative or hybrid suspend, this variable is ignored.
|
||||
\fBMONO_ENABLE_COOP\fR
|
||||
This makes the Mono runtime and the SGen garbage collector run in cooperative
|
||||
mode as opposed to run on preemptive mode. Preemptive mode is the mode
|
||||
that Mono has used historically, going back to the Boehm days, where the
|
||||
garbage collector would run at any point and suspend execution of all
|
||||
threads as required to perform a garbage collection. The cooperative mode
|
||||
on the other hand requires the cooperation of all threads to stop at a
|
||||
safe point. This makes for an easier to debug garbage collector. As
|
||||
of Mono 4.3.0 it is a work in progress, and while it works, it has not
|
||||
been used extensively. This option enabled the feature and allows us to
|
||||
find spots that need to be tuned for this mode of operation. Alternatively,
|
||||
this mode can be enabled at compile time by using the --with-cooperative-gc
|
||||
flag when calling configure.
|
||||
.TP
|
||||
\fBMONO_ENV_OPTIONS\fR
|
||||
This environment variable allows you to pass command line arguments to
|
||||
@@ -1638,31 +1596,11 @@ home directories that might be shared over the network.
|
||||
If set, extra checks are made during IO operations. Currently, this
|
||||
includes only advisory locks around file writes.
|
||||
.TP
|
||||
\fBMONO_TLS_PROVIDER\fR
|
||||
This environment variable controls which TLS/SSL provider Mono will
|
||||
use. The options are usually determined by the operating system where
|
||||
Mono was compiled and the configuration options that were used for
|
||||
it.
|
||||
.RS
|
||||
.ne 8
|
||||
.TP
|
||||
.I default
|
||||
Uses the default TLS stack that the Mono runtime was configured with.
|
||||
Usually this is configured to use Apple's SSL stack on Apple
|
||||
platforms, and Boring SSL on other platforms.
|
||||
.TP
|
||||
.I apple
|
||||
Forces the use of the Apple SSL stack, only works on Apple platforms.
|
||||
.TP
|
||||
.I btls
|
||||
Forces the use of the BoringSSL stack. See
|
||||
https://opensource.google.com/projects/boringssl for more information
|
||||
about this stack.
|
||||
.TP
|
||||
.I legacy
|
||||
This is the old Mono stack, which only supports SSL and TLS up to
|
||||
version 1.0. It is deprecated and will be removed in the future.
|
||||
.RE
|
||||
\fBMONO_THEME\fR
|
||||
The name of the theme to be used by Windows.Forms. Available themes today
|
||||
include "clearlooks", "nice" and "win32".
|
||||
.Sp
|
||||
The default is "win32".
|
||||
.TP
|
||||
\fBMONO_TLS_SESSION_CACHE_TIMEOUT\fR
|
||||
The time, in seconds, that the SSL/TLS session cache will keep it's entry to
|
||||
@@ -1716,8 +1654,8 @@ Currently, the following options are supported:
|
||||
Enables small structs alignment to 4/8 bytes.
|
||||
.TP
|
||||
\fBarm-use-fallback-tls\fR
|
||||
When this option is set on ARM, a fallback thread local store will be used instead
|
||||
of the default fast thread local storage primitives.
|
||||
When this option is set on ARM, a fallback TLS will be used instead
|
||||
of the default fast TLS.
|
||||
.TP
|
||||
\fBbreak-on-unverified\fR
|
||||
If this variable is set, when the Mono VM runs into a verification
|
||||
@@ -1846,12 +1784,6 @@ This option will suspend the program when an exception occurs.
|
||||
.TP
|
||||
\fBsuspend-on-unhandled\fR
|
||||
This option will suspend the program when an unhandled exception occurs.
|
||||
.TP
|
||||
\fBthread-dump-dir=DIR\fR
|
||||
Use DIR for storage thread dumps created by SIGQUIT.
|
||||
.TP
|
||||
\fBverbose-gdb\fR
|
||||
Make gdb output on native crashes more verbose.
|
||||
.ne
|
||||
.RE
|
||||
.TP
|
||||
@@ -1933,7 +1865,7 @@ for example, to see managed frame names on gdb backtraces.
|
||||
\fBMONO_VERBOSE_METHOD\fR
|
||||
Enables the maximum JIT verbosity for the specified method. This is
|
||||
very helpfull to diagnose a miscompilation problems of a specific
|
||||
method. This can be a semicolon-separated list of method names to
|
||||
method. This can be a comma-separated list of method names to
|
||||
match. If the name is simple, this applies to any method with that
|
||||
name, otherwise you can use a mono method description (see the section
|
||||
METHOD DESCRIPTIONS).
|
||||
|
||||
+1
-1
@@ -12,9 +12,9 @@ TestResult-*.xml
|
||||
TestResult*.xml
|
||||
.dep_dirs-*
|
||||
apidiff/*
|
||||
csprojdiff/*
|
||||
errors/*.log
|
||||
errors/dummy.xml
|
||||
class/Mono.Data.Sqlite/test.db
|
||||
class/RabbitMQ.Client/docs/specs/autogenerated-api-0-8.cs
|
||||
class/RabbitMQ.Client/docs/specs/autogenerated-api-0-9.cs
|
||||
class/RabbitMQ.Client/docs/specs/autogenerated-api-qpid-0-8.cs
|
||||
|
||||
+13
-31
@@ -4,7 +4,8 @@ SUBDIRS := build jay mcs class nunit24 ilasm tools tests errors docs packages
|
||||
|
||||
# Resgen is corlib specific tool
|
||||
|
||||
build_SUBDIRS := build jay tools/gensources class class/aot-compiler tools
|
||||
basic_SUBDIRS := build jay class
|
||||
build_SUBDIRS := build class class/aot-compiler tools ilasm
|
||||
monodroid_SUBDIRS := build class tools
|
||||
monodroid_tools_SUBDIRS := build class tools
|
||||
monotouch_SUBDIRS := build class tools
|
||||
@@ -13,9 +14,7 @@ monotouch_tv_SUBDIRS := build class
|
||||
monotouch_runtime_SUBDIRS := build class
|
||||
monotouch_watch_runtime_SUBDIRS := build class
|
||||
monotouch_tv_runtime_SUBDIRS := build class
|
||||
monotouch_tools_SUBDIRS := build class tools
|
||||
xammac_SUBDIRS := build class
|
||||
testing_aot_full_interp_SUBDIRS := build class
|
||||
testing_aot_hybrid_SUBDIRS := build class
|
||||
testing_aot_full_SUBDIRS := build class
|
||||
binary_reference_assemblies_SUBDIRS := build class
|
||||
@@ -27,7 +26,6 @@ winaot_SUBDIRS := build class
|
||||
orbis_SUBDIRS := build class
|
||||
unreal_SUBDIRS := build class
|
||||
wasm_SUBDIRS := build class
|
||||
wasm_tools_SUBDIRS := build class tools
|
||||
|
||||
include build/rules.make
|
||||
|
||||
@@ -38,14 +36,14 @@ all-local $(STD_TARGETS:=-local):
|
||||
@:
|
||||
|
||||
dir-check:
|
||||
@if [ "$(NO_DIR_CHECK)" = "" ]; then $(MAKE) -C ../runtime; fi
|
||||
@if [ "$(NO_DIR_CHECK)" = "" -a "$(PROFILE)" != "basic" ]; then $(MAKE) -C ../runtime; fi
|
||||
|
||||
# fun specialty targets
|
||||
|
||||
PROFILES = net_4_x binary_reference_assemblies xbuild_12 xbuild_14
|
||||
|
||||
.PHONY: all-profiles compiler-test-profiles run-compiler-test-profiles $(STD_TARGETS:=-profiles)
|
||||
all-profiles compiler-test-profiles run-compiler-test-profiles $(STD_TARGETS:=-profiles): %-profiles: profiles-do--%
|
||||
.PHONY: all-profiles $(STD_TARGETS:=-profiles)
|
||||
all-profiles $(STD_TARGETS:=-profiles): %-profiles: profiles-do--%
|
||||
@:
|
||||
|
||||
profiles-do--%:
|
||||
@@ -77,25 +75,21 @@ $(_boot_:%=profile-do--monotouch_tv--%): profile-do--monotouch_tv--%:
|
||||
$(_boot_:%=profile-do--monotouch_runtime--%): profile-do--monotouch_runtime--%: profile-do--build--%
|
||||
$(_boot_:%=profile-do--monotouch_watch_runtime--%): profile-do--monotouch_watch_runtime--%: profile-do--build--%
|
||||
$(_boot_:%=profile-do--monotouch_tv_runtime--%): profile-do--monotouch_tv_runtime--%: profile-do--build--%
|
||||
$(_boot_:%=profile-do--monotouch_tools--%): profile-do--monotouch_tools--%: profile-do--build--%
|
||||
$(_boot_:%=profile-do--xammac--%): profile-do--xammac--%: profile-do--build--%
|
||||
$(_boot_:%=profile-do--xammac_net_4_5--%): profile-do--xammac_net_4_5--%: profile-do--build--%
|
||||
$(_boot_:%=profile-do--testing_aot_full_interp--%): profile-do--testing_aot_full_interp--%: profile-do--build--%
|
||||
$(_boot_:%=profile-do--testing_aot_hybrid--%): profile-do--testing_aot_hybrid--%: profile-do--build--%
|
||||
$(_boot_:%=profile-do--testing_aot_full--%): profile-do--testing_aot_full--%: profile-do--build--%
|
||||
$(_boot_:%=profile-do--winaot--%): profile-do--winaot--%: profile-do--build--%
|
||||
$(_boot_:%=profile-do--orbis--%): profile-do--orbis--%: profile-do--build--%
|
||||
$(_boot_:%=profile-do--unreal--%): profile-do--unreal--%: profile-do--build--%
|
||||
$(_boot_:%=profile-do--wasm--%): profile-do--wasm--%: profile-do--build--%
|
||||
$(_boot_:%=profile-do--wasm_tools--%): profile-do--wasm_tools--%: profile-do--build--%
|
||||
$(_boot_:%=profile-do--build--%): profile-do--build--%: profile-do--basic--%
|
||||
|
||||
compiler-test:
|
||||
$(MAKE) -C tests test
|
||||
$(MAKE) -C errors test
|
||||
testcorlib:
|
||||
@cd class/corlib && $(MAKE) test run-test
|
||||
|
||||
run-compiler-test:
|
||||
$(MAKE) -C tests run-test
|
||||
$(MAKE) -C errors run-test
|
||||
compiler-tests:
|
||||
$(MAKE) TEST_SUBDIRS="tests errors" run-test-profiles
|
||||
|
||||
package := mcs-$(VERSION)
|
||||
|
||||
@@ -152,19 +146,15 @@ distcheck: dist-tarball
|
||||
# Targets for creating API diffs of the framework
|
||||
|
||||
MONO_API_SNAPSHOT_PATH := $(topdir)../external/api-snapshot/
|
||||
GENAPI := $(MONO_API_SNAPSHOT_PATH)tools/genapi/Microsoft.DotNet.GenAPI.exe
|
||||
GENAPI := $(MONO_API_SNAPSHOT_PATH)tools/genapi/GenAPI.exe
|
||||
MONO_API_SNAPSHOT_PROFILE_PATH := $(MONO_API_SNAPSHOT_PATH)profiles/$(PROFILE)/
|
||||
MONO_API_ASSEMBLIES_IGNORED := $(addprefix $(topdir)class/lib/$(PROFILE)/, Mono.CSharp.dll SystemWebTestShim.dll standalone-runner-support.dll nunit.core.dll nunit.core.extensions.dll nunit.core.interfaces.dll nunit.framework.dll nunit.framework.extensions.dll nunit.mocks.dll nunit.util.dll nunit-console-runner.dll nunitlite.dll Mono.Profiler.Log.dll)
|
||||
MONO_API_ASSEMBLIES := $(filter-out $(MONO_API_ASSEMBLIES_IGNORED), $(wildcard $(topdir)class/lib/$(PROFILE)/*.dll)) $(wildcard $(topdir)class/lib/$(PROFILE)/Facades/*.dll)
|
||||
MONO_API_ASSEMBLIES_CS := $(MONO_API_ASSEMBLIES:$(topdir)class/lib/$(PROFILE)/%.dll=$(MONO_API_SNAPSHOT_PROFILE_PATH)%.cs)
|
||||
|
||||
apidiff/ignored-attr.txt:
|
||||
$(MONO_API_SNAPSHOT_PROFILE_PATH)%.cs: $(topdir)class/lib/$(PROFILE)/%.dll $(GENAPI) $(MONO_API_SNAPSHOT_PATH)profiles/license-header.txt
|
||||
@mkdir -p $(dir $@)
|
||||
@echo "T:System.Runtime.CompilerServices.CompilerGeneratedAttribute" > $@
|
||||
|
||||
$(MONO_API_SNAPSHOT_PROFILE_PATH)%.cs: $(topdir)class/lib/$(PROFILE)/%.dll $(GENAPI) $(MONO_API_SNAPSHOT_PATH)profiles/license-header.txt apidiff/ignored-attr.txt
|
||||
@mkdir -p $(dir $@)
|
||||
$(Q) MONO_PATH=$(topdir)class/lib/$(BUILD_TOOLS_PROFILE) $(RUNTIME) $(GENAPI) -libPath:$(topdir)class/lib/$(PROFILE),$(topdir)class/lib/$(PROFILE)/Facades -out:$(dir $@) -headerFile:$(MONO_API_SNAPSHOT_PATH)profiles/license-header.txt -assemblyAttributes -typeForwardedTo -assemblyVersion -excludeAttributesList:apidiff/ignored-attr.txt -assembly:$< || echo "Couldn't process assembly." > $@
|
||||
$(Q) MONO_PATH=$(topdir)class/lib/$(BUILD_TOOLS_PROFILE) $(RUNTIME) $(GENAPI) -libPath:$(topdir)class/lib/$(PROFILE),$(topdir)class/lib/$(PROFILE)/Facades -out:$(dir $@) -headerFile:$(MONO_API_SNAPSHOT_PATH)profiles/license-header.txt -assemblyAttributes -typeForwardedTo -assemblyVersion -assembly:$< || echo "Couldn't process assembly." > $@
|
||||
|
||||
mono-api-current: $(MONO_API_ASSEMBLIES_CS)
|
||||
|
||||
@@ -185,11 +175,3 @@ mono-api-diff:
|
||||
@mkdir -p apidiff
|
||||
$(Q) sed -e "/@diffdata@/r temp.patch" -e "/@diffdata@/d" -e "s/@title@/Public API Diff/g" -e "s/@description@/If the changes are intentional, run <code>make -C mcs mono-api-diff<\/code> locally and commit changes in external\/api-snapshot./g" diff.html.in > apidiff/index.html
|
||||
$(Q) if [ -s temp.patch ]; then echo "Error: Found public API differences, see mcs/apidiff/index.html. If the changes are intentional, please go to external/api-snapshot and commit them."; rm -f temp.patch; exit 1; else echo "No differences found."; rm -f temp.patch; fi
|
||||
|
||||
mono-csproj-diff:
|
||||
@echo "Generating csproj diff..."
|
||||
$(Q) git add -A "*.csproj" $(topdir)../bcl.sln
|
||||
$(Q) git diff --no-renames HEAD "*.csproj" $(topdir)../bcl.sln > $(abspath $(topdir))/temp.patch
|
||||
@mkdir -p csprojdiff
|
||||
$(Q) sed -e "/@diffdata@/r temp.patch" -e "/@diffdata@/d" -e "s/@title@/Project Files Diff/g" -e "s/@description@/Use <code>@monojenkins commit csproj<\/code> to commit them./g" diff.html.in > csprojdiff/index.html
|
||||
$(Q) if [ -s temp.patch ]; then echo "Error: Found csproj differences, see mcs/csprojdiff/index.html. If the changes are intentional, please commit them."; rm -f temp.patch; exit 1; else echo "No differences found."; rm -f temp.patch; fi
|
||||
+6
-11
@@ -2,7 +2,7 @@ thisdir = build
|
||||
SUBDIRS =
|
||||
include ../build/rules.make
|
||||
|
||||
BUILT_FILES = common/Consts.cs $(topdir)/class/lib/$(PROFILE_DIRECTORY)/Consts.cs common/sourcelink.json
|
||||
BUILT_FILES = common/Consts.cs
|
||||
|
||||
all-local install-local test-local run-test-local csproj-local run-test-ondotnet-local uninstall-local doc-update-local: $(BUILT_FILES)
|
||||
@:
|
||||
@@ -10,19 +10,14 @@ all-local install-local test-local run-test-local csproj-local run-test-ondotnet
|
||||
clean-local:
|
||||
-rm -f $(BUILT_FILES) deps/*
|
||||
|
||||
$(topdir)/class/lib/$(PROFILE_DIRECTORY):
|
||||
mkdir -p $@
|
||||
|
||||
common/Consts.cs $(topdir)/class/lib/$(PROFILE_DIRECTORY)/Consts.cs: common/Consts.cs.in $(wildcard config.make) | $(topdir)/class/lib/$(PROFILE_DIRECTORY)
|
||||
common/Consts.cs: common/Consts.cs.in $(wildcard config.make)
|
||||
test -n '$(MONO_VERSION)'
|
||||
test -n '$(MONO_CORLIB_VERSION)'
|
||||
sed -e 's,@''MONO_VERSION@,$(MONO_VERSION),' -e 's,@''MONO_CORLIB_VERSION@,$(MONO_CORLIB_VERSION),' $< > $@
|
||||
|
||||
common/sourcelink.json: common/sourcelink.json.in $(wildcard config.make) | $(topdir)/class/lib/$(PROFILE_DIRECTORY)
|
||||
sed -e 's,@mono_topdir@,$(shell cd $(topdir)/.. && pwd),' -e 's,@mono_commit_hash@,$(shell cd $(topdir)/.. && git rev-parse HEAD),' -e 's,@corefx_commit_hash@,$(shell cd $(topdir)/../external/corefx && git rev-parse HEAD),' -e 's,@corert_commit_hash@,$(shell cd $(topdir)/../external/corert && git rev-parse HEAD),' -e 's,@cecil_commit_hash@,$(shell cd $(topdir)/../external/cecil && git rev-parse HEAD),' $< > $@
|
||||
|
||||
PLATFORMS = macos linux win32 unix
|
||||
PLATFORMS = darwin linux win32
|
||||
PROFILES = \
|
||||
basic \
|
||||
build \
|
||||
binary_reference_assemblies \
|
||||
net_4_x \
|
||||
@@ -31,7 +26,6 @@ PROFILES = \
|
||||
|
||||
COMMON_SRCS = \
|
||||
Consts.cs.in \
|
||||
sourcelink.json.in \
|
||||
Locale.cs \
|
||||
MonoTODOAttribute.cs \
|
||||
basic-profile-check.cs \
|
||||
@@ -39,13 +33,14 @@ COMMON_SRCS = \
|
||||
AssemblyRef.cs
|
||||
|
||||
DISTFILES = \
|
||||
README.makefiles.md \
|
||||
README.makefiles \
|
||||
README.platforms \
|
||||
README.configury \
|
||||
config-default.make \
|
||||
corcompare.make \
|
||||
corcompare-api.xsl \
|
||||
executable.make \
|
||||
gensources.sh \
|
||||
library.make \
|
||||
rules.make \
|
||||
tests.make \
|
||||
|
||||
@@ -0,0 +1,791 @@
|
||||
The MCS makefiles (-*- outline -*-)
|
||||
Peter Williams <[email protected]>
|
||||
|
||||
The new makefiles try to abstract building on Windows and Linux. They
|
||||
try to provide a consistent set of ways to express the things that our
|
||||
build system needs to let us do, specifically:
|
||||
|
||||
* Build recursively
|
||||
* Build libraries and executables easily
|
||||
* Let developers use different runtimes and class libaries
|
||||
* Make distributions easily
|
||||
* Provide a framework for testing
|
||||
* Build platform-independently whenever possible
|
||||
* Generate, update, and build monodoc documentation.
|
||||
|
||||
|
||||
|
||||
** Makefile structure
|
||||
|
||||
A general makefile looks like this:
|
||||
|
||||
========================================
|
||||
thisdir = class/Mono.My.Library
|
||||
SUBDIRS =
|
||||
include ../../build/rules.make
|
||||
|
||||
all-local:
|
||||
do some stuff
|
||||
|
||||
install-local:
|
||||
$(MKINSTALLDIRS) $(DESTDIR)$(prefix)/share/
|
||||
$(INSTALL_DATA) myfile.txt $(DESTDIR)$(prefix)/share/myfiledir
|
||||
|
||||
clean-local:
|
||||
rm -f my-generated-file
|
||||
|
||||
test-local: my_test_program.exe
|
||||
|
||||
run-test-local:
|
||||
$(RUNTIME) my_test_program.exe
|
||||
|
||||
run-test-ondotnet-local:
|
||||
$(RUNTIME) my_test_program.exe
|
||||
|
||||
DISTFILES = myfile.txt my_test_source.cs
|
||||
|
||||
dist-local: dist-default
|
||||
|
||||
doc-update-local:
|
||||
|
||||
my_test_program.exe: my_test_source.cs
|
||||
$(CSCOMPILE) /target:exe /out:$@ $<
|
||||
========================================
|
||||
|
||||
Each makefile follows the same pattern: it does some setup, includes
|
||||
the standard make rules, and provides rules for eight standard targets:
|
||||
all, install, test, run-test, clean, dist, and doc-update.
|
||||
|
||||
"Some setup" is defining two variables: $(thisdir) and
|
||||
$(SUBDIRS). $(thisdir) is the directory that the makefile lives in,
|
||||
relative to the top directory (ie, class/corlib) and $(SUBDIRS)
|
||||
defines the subdirectories that should be built in.
|
||||
|
||||
The eight targets do the following:
|
||||
|
||||
* all-local builds whatever someone would expect to be built
|
||||
when they just type 'make'. Most likely Foo.dll or Foo.exe
|
||||
|
||||
* install-local installs whatever got built by all-local.
|
||||
|
||||
* test-local _builds_ the test programs or libraries but does
|
||||
_not_ run them.
|
||||
|
||||
* run-test-local actually runs the tests. It shouldn't
|
||||
necessarily exit in an error if the test fails, but should make that
|
||||
situation obvious. It should only run tests that take care of
|
||||
themselves automatically; interactive tests should have an individual
|
||||
target. The idea is that 'make run-test' from the toplevel should be
|
||||
able to proceed unsupervised and test everything that can be tested in
|
||||
such a manner.
|
||||
|
||||
* run-test-ondotnet-local is a variant of run-test-local. It is used only to validate if our tests themselves works fine under Microsoft runtime (on Windows). Basically, in this target, we should not use $(TEST_RUNTIME) to test our libraries.
|
||||
|
||||
* clean-local removes built files; 'make clean' should leave
|
||||
only files that go into a distribution tarball. (But it is not necessarily
|
||||
true that all files that go into a tarball need to be left after a make clean.)
|
||||
|
||||
* dist-local copies files into the distribution tree, which is
|
||||
given by the variable $(distdir). dist-local always depends on the
|
||||
target 'dist-default'. See ** 'make dist' below.
|
||||
|
||||
* doc-update-local should generate or update monodoc documentation,
|
||||
if appropriate. This is usually only appropriate for libraries. It's
|
||||
defined as a standard target so that it can easily be run recursively
|
||||
across all libraries within the module.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
** Build configuration
|
||||
|
||||
In general, MCS needs to be able to build relying only on the
|
||||
existence of a runtime and core libraries (corlib, System,
|
||||
System.Xml). So there shouldn't be any checking for libraries or
|
||||
whatnot; MCS should be able to build out of the box. We try to keep
|
||||
platform detection and feature testing (ie, for HP/UX echo) inside
|
||||
the makefiles; right now, there's no configuration script, and it'd
|
||||
be nice to keep it that way. (I am told that some people build on
|
||||
both Windows and Linux in the same tree, which would be impossible to
|
||||
do if we cached platform-related configury values.)
|
||||
|
||||
That being said, it's very convenient for developers to be able to
|
||||
customize their builds to suit their needs. To allow this, the
|
||||
Makefile rules are set up to allow people to override pretty much any
|
||||
important variable.
|
||||
|
||||
Configuration variables are given defaults in `config-default.make';
|
||||
`rules.make' optionally includes `$(topdir)/build/config.make', so you
|
||||
can customize your build without CVS trying to commit your modified
|
||||
`config-default.make' all the time. Platform-specific variables are
|
||||
defined in `$(topdir)/build/platforms/$(BUILD_PLATFORM).make', where
|
||||
$(BUILD_PLATFORM) is detected in config-default.make. (Currently, the only
|
||||
choices are linux.make and win32.make.)
|
||||
|
||||
The best way to learn what the configuration variables are is to read
|
||||
`config.make' and `platform.make'. There aren't too many and hopefully
|
||||
they should be self-explanatory; see the numerous examples below for
|
||||
more information if you're confused.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
** Recommendations for platform specifics
|
||||
|
||||
If you find yourself needing a platform-specific customization, try
|
||||
and express it in terms of a feature, rather than a platform test. In
|
||||
other words, this is good:
|
||||
|
||||
========================================
|
||||
run-test-local: my-test.exe
|
||||
ifdef PLATFORM_NEEDS_CRAZY_CRAP
|
||||
crazy-crap
|
||||
endif
|
||||
$(RUNTIME) my-test.exe
|
||||
========================================
|
||||
|
||||
and this is bad:
|
||||
|
||||
========================================
|
||||
run-test-local: my-test.exe
|
||||
ifdef WINDOWS
|
||||
crazy-crap
|
||||
else
|
||||
ifdef AMIGA
|
||||
crazy-crap
|
||||
endif
|
||||
endif
|
||||
$(RUNTIME) my-test.exe
|
||||
========================================
|
||||
|
||||
The latter accumulates and gets unpleasant and it sucks. Granted,
|
||||
right now we only have two platforms, so it's not a big deal, but it's
|
||||
good form to get used to and practice. Anyway, take a look at how we
|
||||
do the various corlib building hacks for examples of how we've done
|
||||
platform-specificity. It certainly isn't pretty, but at least it's a
|
||||
little structured.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
** Saving effort
|
||||
|
||||
The point of the build system is to abstract things and take
|
||||
care of all the easy stuff. So if you find yourself writing a
|
||||
Makefile, know that there's probably already infrastructure to do what
|
||||
you want. Here are all the common cases I can think of ...
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
* Compiling C# code? use:
|
||||
|
||||
========================================
|
||||
my-program.exe: my-source.cs
|
||||
$(CSCOMPILE) /target:exe /out:$@ $^
|
||||
========================================
|
||||
|
||||
or
|
||||
|
||||
========================================
|
||||
my-lib.dll: my-source.cs
|
||||
$(CSCOMPILE) /target:library /out:$@ $^
|
||||
========================================
|
||||
|
||||
Note the '$@' and '$^' variables. The former means "the name of the
|
||||
file that I am trying to make" and the latter means "all the
|
||||
dependencies of the file I am trying to make." USE THESE VARIABLES
|
||||
AGGRESSIVELY. Say that you add a new source to your program:
|
||||
|
||||
========================================
|
||||
my-program.exe: my-source.cs my-new-source.cs
|
||||
$(CSCOMPILE) /target:exe /out:$@ $^
|
||||
========================================
|
||||
|
||||
Because of the $^ variable, you don't need to remember to add another
|
||||
file to the command line. Similarly, if you rename your program, you
|
||||
won't need to remember to change the rule:
|
||||
|
||||
========================================
|
||||
MonoVaporizer.exe: my-source.cs my-new-source.cs
|
||||
$(CSCOMPILE) /target:exe /out:$@ $^
|
||||
========================================
|
||||
|
||||
will still work. Another useful variable is $<, which means "the first
|
||||
dependency of whatever I'm building." If you order your dependencies
|
||||
carefully it can be extremely useful.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
* Just building an executable? use:
|
||||
|
||||
========================================
|
||||
PROGRAM = myprogram.exe
|
||||
LOCAL_MCS_FLAGS = /r:System.Xml.dll
|
||||
|
||||
include ../build/executable.make
|
||||
========================================
|
||||
|
||||
executable.make builds a program in the current directory. Its name is
|
||||
held in $(PROGRAM), and its sources are listed in the file
|
||||
$(PROGRAM).sources. It might seem to make more sense to just list the
|
||||
program's sources in the Makefile, but when we build on Windows we
|
||||
need to change slashes around, which is much easier to do if the
|
||||
sources are listed in a file. The variable $(LOCAL_MCS_FLAGS) changes
|
||||
the flags given to the compiler; it is included in $(CSCOMPILE) so you
|
||||
don't need to worry about it.
|
||||
|
||||
executable.make does a lot for you: it builds the program in 'make
|
||||
all-local', installs the program in $(prefix)/bin, distributes the
|
||||
sources, and defines empty test targets. Now, if your program has a
|
||||
test, set the variable HAS_TEST:
|
||||
|
||||
========================================
|
||||
PROGRAM = myprogram.exe
|
||||
LOCAL_MCS_FLAGS = /r:System.Xml.dll
|
||||
HAS_TEST = yes
|
||||
include ../build/executable.make
|
||||
|
||||
test-local: mytester.exe
|
||||
|
||||
run-test-local: mytester.exe
|
||||
$(RUNTIME) $<
|
||||
|
||||
mytester.exe: mytester.cs
|
||||
$(CSCOMPILE) /target:exe /out:$@ mytester.cs
|
||||
========================================
|
||||
|
||||
If your program has NUnit tests, set the variable HAS_NUNIT_TEST:
|
||||
|
||||
========================================
|
||||
PROGRAM = myprogram.exe
|
||||
LOCAL_MCS_FLAGS = /r:System.Xml.dll
|
||||
HAS_NUNIT_TEST = yes
|
||||
include ../build/executable.make
|
||||
========================================
|
||||
|
||||
HAS_NUNIT_TEST tests follow library.make NUnit test conventions:
|
||||
the files should be in a subdirectory called Test/, and if
|
||||
your program is called myprogram.exe, they should be listed in
|
||||
myprogram_test.dll.sources. The names in that files should *not* have
|
||||
the Test/ prefix. 'make test' will build myprogram_test_$(PROFILE).dll
|
||||
in the current directory, automatically supplying the flags to
|
||||
reference the original program and NUnit.Framework.dll.
|
||||
|
||||
If your program has 'built sources', that is, source files generated
|
||||
from other files (say, generated by jay), define a variable called
|
||||
BUILT_SOURCES and do *not* list the sources in $(PROGRAM).sources:
|
||||
|
||||
========================================
|
||||
PROGRAM = myprogram.exe
|
||||
LOCAL_MCS_FLAGS = /r:System.Xml.dll
|
||||
BUILT_SOURCES = parser.cs
|
||||
CLEAN_FILES = y.output
|
||||
|
||||
include ../build/executable.make
|
||||
|
||||
parser.cs: parser.jay
|
||||
$(topdir)/jay/jay $< > $@
|
||||
========================================
|
||||
|
||||
executable.make will automatically delete the $(BUILT_SOURCES) files
|
||||
on 'make clean'. Since this situation is a common occurrence and jay
|
||||
happens to leave behind y.output files, you can also define a variable
|
||||
called $(CLEAN_FILES) that lists extra files to be deleted when 'make clean' is
|
||||
called. (That's in addition to your executable and the built sources).
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
* Buildling a library? Use
|
||||
|
||||
========================================
|
||||
LIBRARY = Mono.MyLib.dll
|
||||
LIB_MCS_FLAGS = /unsafe
|
||||
TEST_MCS_FLAGS = /r:System.Xml.dll
|
||||
|
||||
include ../../build/library.make
|
||||
========================================
|
||||
|
||||
Where you library is called $(LIBRARY); it will be put into
|
||||
$(topdir)/class/lib. LIB_MCS_FLAGS is the set of MCS flags to use when
|
||||
compiling the library; in addition, a global set of flags called
|
||||
$(LIBRARY_FLAGS) is added (that variable is defined in
|
||||
config-defaults.make), as well as the usual $(LOCAL_MCS_FLAGS).
|
||||
|
||||
As in executable.make, the sources for your library are listed in
|
||||
$(LIBRARY).sources. Note: these source lists should have Unix forward
|
||||
slashes and Unix newlines (\n, not \r\n.) If you get an error about
|
||||
"touch: need a filename", that means your .sources file doesn't end in
|
||||
a newline. It should.
|
||||
|
||||
Now library.make also assumes that your library has an NUnit2 test
|
||||
harness. The files should be in a subdirectory called Test/, and if
|
||||
your library is called Mono.Foo.dll, they should be listed in
|
||||
Mono.Foo_test.dll.sources. The names in that files should *not* have
|
||||
the Test/ prefix. 'make test' will build Mono.Foo_test.dll in the
|
||||
current directory, automatically supplying the flags to reference the
|
||||
original library and NUnit.Framework.dll.
|
||||
|
||||
If you don't have a test, just do this:
|
||||
|
||||
========================================
|
||||
LIBRARY = Mono.MyLib.dll
|
||||
LIB_MCS_FLAGS = /unsafe
|
||||
NO_TEST = yes
|
||||
|
||||
include ../../build/library.make
|
||||
========================================
|
||||
|
||||
and feel ashamed. Every good library has a test suite!
|
||||
|
||||
Extra flags needed to compile the test library should be listed in
|
||||
$(TEST_MCS_FLAGS); often you will have a line like this:
|
||||
|
||||
========================================
|
||||
TEST_MCS_FLAGS = $(LIB_MCS_FLAGS)
|
||||
========================================
|
||||
|
||||
Again, library.make does a lot for you: it builds the dll, it
|
||||
generates makefile fragments to track the dependencies, it installs
|
||||
the library, it builds the test dll on 'make test', it runs
|
||||
$(TEST_HARNESS) on it on 'make run-test', it removes the appropriate
|
||||
files on 'make clean', and it distributes all the source files on
|
||||
'make dist'. (TEST_HARNESS defaults to be nunit-console.exe but it may
|
||||
be overridden to, say, nunit-gtk). If you have extra files to
|
||||
distribute when using either library.make or executable.make, use the
|
||||
variable $(EXTRA_DISTFILES):
|
||||
|
||||
========================================
|
||||
EXTRA_DISTFILES = \
|
||||
Test/testcase1.in \
|
||||
Test/testcase1.out \
|
||||
README
|
||||
========================================
|
||||
|
||||
Again, library.make and executable.make do the right things so that we
|
||||
can build on Windows, doing some trickery to invert slashes and
|
||||
overcome command-line length limitations. Use them unless you have a
|
||||
really good reason not to. If you're building a bunch of small
|
||||
executables, check out tools/Makefile or tools/security/Makefile; if
|
||||
all the files are in the current directory, changing slashes isn't a
|
||||
big deal, and command-line lengths won't be a problem, so
|
||||
executable.make isn't necessary (and indeed it won't work, since it
|
||||
can only build one .exe in a directory).
|
||||
|
||||
If you're building a library, library.make is highly recommended; the
|
||||
only DLL that doesn't use it is corlib, because building corlib is a
|
||||
fair bit more complicated than it should be. Oh well.
|
||||
|
||||
library.make also automatically supports generating and updating
|
||||
monodoc documentation. Documentation is stored within the
|
||||
Documentation directory (a sibling to the Test directory), and is
|
||||
generated/updated whenever the doc-update target is executed.
|
||||
Assembling of the documentation so that the monodoc browser can
|
||||
display the documentation is handled separately within the mcs/docs
|
||||
all-local target; see mcs/docs/Makefile for details.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
* Running a C# program? Use $(RUNTIME)
|
||||
|
||||
========================================
|
||||
run-test-local: myprog.exe
|
||||
$(RUNTIME) myprog.exe
|
||||
========================================
|
||||
|
||||
$(RUNTIME) might be empty (if you're on windows), so don't expect to
|
||||
be able to give it any arguments. If you're on a platform which has an
|
||||
interpreter or jitter, $(RUNTIME_FLAGS) is included in $(RUNTIME), so
|
||||
set that variable.
|
||||
|
||||
$(TEST_RUNTIME) is the runtime to use when running tests. Right now it's
|
||||
just "mono --debug".
|
||||
|
||||
|
||||
|
||||
* Calling the compiler directly? Use $(MCS).
|
||||
|
||||
Really, you should use $(CSCOMPILE) whenever possible, but $(MCS) is
|
||||
out there. $(BOOTSTRAP_MCS) is the C# compiler that we use to build
|
||||
mcs.exe; on Linux, we then use mcs.exe to build everything else, but
|
||||
on Windows, we use csc.exe to build everything. Only use
|
||||
$(BOOTSTRAP_MCS) if you know what you're doing.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
* Compiling C code? Use $(CCOMPILE)
|
||||
|
||||
To give it flags, set $(LOCAL_CFLAGS). As with compiling C#, the
|
||||
variable $(CFLAGS) will automatically be included on the command line.
|
||||
|
||||
|
||||
* Compiling resources with resgen
|
||||
|
||||
If you have a resource that should be compiled with resgen and
|
||||
included in your assembly, you can use the RESOURCES_DEFS variable.
|
||||
This variable can contain lists of pairs that are separated by comma
|
||||
to represent the resource ID as embedded in the assembly followed by
|
||||
the file name, like this:
|
||||
|
||||
RESOURCE_DEFS = Messages,TextResources.resx Errors,ErrorList.txt
|
||||
|
||||
|
||||
* Documentation-related needs? Use $(MDOC)
|
||||
|
||||
$(MDOC) is a front-end to the monodoc documentation system, supporting
|
||||
documentation generation, updating, importing from Microsoft XML
|
||||
Documentation and ECMA documentation formats, assembling documentation
|
||||
for use within the monodoc documentation browser, and exporting
|
||||
documentation to various other output formats such as static HTML.
|
||||
|
||||
It is currently only used for library.make's doc-update-local target
|
||||
and for assembling documentation within $topdir/docs.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
* Installing files? Use $(MKINSTALLDIRS), $(INSTALL_DATA) or
|
||||
$(INSTALL_BIN), $(prefix), and $(DESTDIR).
|
||||
|
||||
Every time a file is installed the commands should look like this:
|
||||
|
||||
========================================
|
||||
install-local:
|
||||
$(MKINSTALLDIRS) $(DESTDIR)$(prefix)/my/dir
|
||||
$(INSTALL_DATA) myfile $(DESTDIR)$(prefix)/my/dir
|
||||
========================================
|
||||
|
||||
This way the directory is created recursively if needed (admittedly, we could
|
||||
probably rely on mkdir -p), the file is given the correct permissions,
|
||||
the user can override $(MKINSTALLDIRS) and $(INSTALL) if they need to,
|
||||
and we can support $(DESTDIR) installs. We use $(DESTDIR) to make
|
||||
monocharge tarballs, and it's useful otherwise, so try and use it
|
||||
consistently.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
* 'make dist'? Use $(DISTFILES)
|
||||
|
||||
The 'dist-default' target will copy the files listed in $(DISTFILES)
|
||||
into the distribution directory, as well as Makefile and ChangeLog if
|
||||
they exist. This is almost always all that you need, so ideally your
|
||||
make dist support should only be:
|
||||
|
||||
========================================
|
||||
DISTFILES = README Test/thoughts.txt
|
||||
|
||||
dist-local: dist-default
|
||||
========================================
|
||||
|
||||
DISTFILES will cope correctly with files in subdirectories, by the
|
||||
way. Note that if you put a nonexistant file or a directory in
|
||||
DISTFILES it will *not* complain; it will just ignore it.
|
||||
|
||||
If you want to test your 'make dist' code, you can try
|
||||
|
||||
========================================
|
||||
$ cd class/Mono.MyClass
|
||||
$ make dist-local distdir=TEST
|
||||
========================================
|
||||
|
||||
And your files should be copied into TEST/ in the current directory.
|
||||
There is a toplevel 'make distcheck' target, which will build a dist
|
||||
tarball, try to build it, install files to a temporary prefix, make
|
||||
clean it, make a distribution, and compare the files left over to the
|
||||
files originally in the tarball: they should be the same. But this
|
||||
takes about 15 minutes to run on my 1.1 Ghz computer, so it's not for
|
||||
the faint of heart.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
* Lots of files? Use $(wildcard *.foo)
|
||||
|
||||
When specifying the sources to a library or executable, wildcards are
|
||||
not encouraged; in fact they're not allowed if you use library.make or
|
||||
executable.make. But there are times when they're useful, eg:
|
||||
|
||||
========================================
|
||||
DISTFILES = $(wildcard Test/*.in) $(wildcard Test/*.out)
|
||||
========================================
|
||||
|
||||
Just so you know that 'make' has this feature.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
* Referencing files in other directories? Use $(topdir).
|
||||
|
||||
$(topdir) is the path to the top directory from the current build
|
||||
directory. Basically it's a sequence of ../.. computed from the value
|
||||
that you give $(thisdir) at the top of your Makefile. Try to reference
|
||||
things from $(topdir), so your code can be moved or cut-and-pasted
|
||||
around with a minimum of fuss.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
* Conditional building? Use ifdef/ifndef/endif
|
||||
|
||||
Now in general we want to avoid conditional building, but sometimes
|
||||
something doesn't work on Linux or already exists on Windows or
|
||||
whatnot. (See below on recommended form for how to build
|
||||
platform-specifically.) GNU Make supports the following construction:
|
||||
|
||||
========================================
|
||||
BUILD_EXPERIMENTAL = yes
|
||||
|
||||
ifdef BUILD_EXPERIMENTAL
|
||||
experimental_stuff = my-experiment.exe
|
||||
else
|
||||
experimental_stuff =
|
||||
endif
|
||||
|
||||
all-local: my-sane.exe $(experimental_stuff)
|
||||
========================================
|
||||
|
||||
'ifdef' means 'if the variable is set to nonempty', so you could have
|
||||
|
||||
========================================
|
||||
BUILD_EXPERIMENTAL = colorless green ideas sleep furiously
|
||||
========================================
|
||||
|
||||
and Make would be happy. I hope that the meaning of 'ifndef' should be
|
||||
obvious. If you want to only sometimes build a target, the above
|
||||
construction is the recommended way to go about it; it's nice to have
|
||||
the rules exist in a Makefile even if they aren't invoked.
|
||||
|
||||
If you want to see why conditionals aren't nice, take a look at
|
||||
library.make or class/corlib/Makefile.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
* 'Private' directories that shouldn't be built by default? Use DIST_ONLY_SUBDIRS
|
||||
|
||||
Several of the MCS class libraries have demo or experimental
|
||||
implementations that depend on things not included with MCS (say,
|
||||
Gtk#). We don't want to build them by default, because the user might
|
||||
not have those dependencies installed, but it's nice to have a
|
||||
Makefile for them to be built nicely.
|
||||
|
||||
First of all, there's nothing stopping you from writing a Makefile for
|
||||
such a directory; just don't put it in the SUBDIRS line of its parent
|
||||
directory. That way, you can do all the normal build things like 'make
|
||||
all' or 'make clean' in that directory, but people trying to bootstrap
|
||||
their system won't run into problems.
|
||||
|
||||
At the same time you probably want to include this directory in the
|
||||
distribution so that people can use your demo or experimental code if
|
||||
they know what they're doing. Hence the variable
|
||||
$(DIST_ONLY_SUBDIRS). As you might guess, it's like the SUBDIRS
|
||||
variable: it lists subdirectories that a regular shouldn't recurse
|
||||
into, but should have their 'make dist' rules invoked.
|
||||
|
||||
Say you've written Mono.MyFancyLib.dll and you have
|
||||
a demo app using Gtk# called MyFancyDemo. The Makefile rules might
|
||||
look like this:
|
||||
|
||||
class/Mono.MyFancyLib/Makefile
|
||||
========================================
|
||||
thisdir = class/Mono.MyFancyLib
|
||||
SUBDIRS =
|
||||
DIST_ONLY_SUBDIRS = MyFancyDemo
|
||||
include ../../build/rules.make
|
||||
|
||||
LIBRARY = Mono.MyFancyLib.dll
|
||||
LIB_MCS_FLAGS = /r:System.dll
|
||||
TEST_MCS_FLAGS = $(LIB_MCS_FLAGS)
|
||||
|
||||
include ../../build/library.make
|
||||
========================================
|
||||
|
||||
class/Mono.MyFancyLib/MyFancyDemo/Makefile
|
||||
========================================
|
||||
thisdir = class/Mono.MyFancyLib/MyFancyDemo
|
||||
SUBDIRS =
|
||||
include ../../../build/rules.make
|
||||
|
||||
PROGRAM = FancyDemo.exe
|
||||
LOCAL_MCS_FLAGS = /r:gtk-sharp.dll
|
||||
|
||||
include ../../../build/executable.make
|
||||
========================================
|
||||
|
||||
|
||||
|
||||
|
||||
* Special recursion needs?
|
||||
|
||||
By default, rules.make defines the all, install, clean, etc. targets
|
||||
to look something like this:
|
||||
|
||||
all: all-recursive
|
||||
$(MAKE) all-local
|
||||
|
||||
Sometimes that doesn't cut it; say for example you want to check for
|
||||
something before doing a lengthy recursive build (see
|
||||
$(topdir)/Makefile) or you have a something like this
|
||||
|
||||
class/MyLibrary:
|
||||
Build MyLibrary.dll
|
||||
class/MyLibrary/Test:
|
||||
Build TestMyLibrary.exe
|
||||
|
||||
'make clean test' will fail here, because the build will happen in
|
||||
the Test subdirectory first, so there will be no MyLibrary.dll to link
|
||||
against. (Unless you write a nasty evil relative path rule which is
|
||||
strongly discouraged.)
|
||||
|
||||
Anyway, to solve this problem you can do
|
||||
|
||||
========================================
|
||||
thisdir = class/MyLibrary
|
||||
SUBDIRS = Test
|
||||
include ../../build/rules.make
|
||||
|
||||
# Normally, make runs 'all-recursive' first, and then 'all-local'
|
||||
# With this, we ensure that 'all-local' is executed first.
|
||||
all-recursive: all-local
|
||||
|
||||
test-recursive: test-local
|
||||
...
|
||||
========================================
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
** A few implementation details
|
||||
|
||||
The way rules.make does its recursion is very standard; it maps
|
||||
{all,install,clean, dist,test} to $@-recursive, which executes that rule
|
||||
in each directory in $(SUBDIRS), and then calls $@-local in the current
|
||||
directory. So something that gets built in a subdirectory cannot rely on
|
||||
something that gets built in its parent directory. If this is a problem,
|
||||
see the previous section. Note that the recursive rule for 'dist' is
|
||||
different; it makes dist-recursive in subdirectories, so you at least
|
||||
have to define that rule.
|
||||
|
||||
Note that even a directory that doesn't, for example, have any tests
|
||||
must still define test-local; otherwise 'make test' run from the
|
||||
toplevel directory will break.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
** Flags for Tools
|
||||
|
||||
We want to make it so that the user can specify certain flags to
|
||||
always be given to a tool, so there's a general way of implementing
|
||||
FLAGS variables:
|
||||
|
||||
* $(foo_FLAGS) remains unset or defaulted to something
|
||||
sensible; the user can provide overrides this way.
|
||||
|
||||
* $(LOCAL_foo_FLAGS) is set in a specific Makefile to
|
||||
provide necessary values.
|
||||
|
||||
* $(PLATFORM_foo_FLAGS) is set in the platform configuration
|
||||
to provide platform-specific values.
|
||||
|
||||
* $(PROFILE_foo_FLAGS) is set in the profile configuration
|
||||
to provide profile-specific values.
|
||||
|
||||
* $(USE_foo_FLAGS) is defined to be the combination of all of
|
||||
the above, and it's what is actually passed to $(foo).
|
||||
|
||||
$(MCS_FLAGS) and $(CFLAGS) follow this model. If you end up finding
|
||||
that another tool is used commonly (hm, jay...), please follow this form.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
** Portability tips
|
||||
|
||||
Always use the icky Windows /argument way of passing parameters to the C#
|
||||
compiler so that csc can be used.
|
||||
|
||||
Always use /r:foo.dll, not /r:foo. Windows requires the former.
|
||||
|
||||
Use /r:$(corlib), not /r:corlib.
|
||||
|
||||
If you're writing shell script code as part of a make rule, remember
|
||||
that Windows has command-line length limits. So something like
|
||||
|
||||
========================================
|
||||
mytool $(all_the_sources_to_corlib)
|
||||
========================================
|
||||
|
||||
Is probably going to cause problems. As I understand it,
|
||||
|
||||
========================================
|
||||
for f in $(all_the_sources_to_corlib) ; do ...
|
||||
========================================
|
||||
|
||||
is ok, since the shell itself doesn't have those limitations. Other
|
||||
than that, you should still try to write fairly portable shell
|
||||
script. Linux and Cygwin both use the GNU utilities, but there's at
|
||||
least one hardy soul trying to build Mono on HP/UX, and no doubt there
|
||||
will be ports to more Unices as time goes on.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
** Misc
|
||||
|
||||
We still don't use /d:NET_1_1 ; it causes some build problems right
|
||||
now.
|
||||
|
||||
There's a hack in class/System.Data/Makefile to work around a very
|
||||
strange crash in the runtime with some custom attribute stuff. It'd be
|
||||
nice to fix it.
|
||||
|
||||
Also, there's a /lib:$(prefix)/lib in the System.dll Makefile, which
|
||||
is for some reason necessary if System.Xml.dll hasn't been built yet.
|
||||
(Well, it's necessary because of the /r:System.Xml.dll, but that
|
||||
should be in the search path, it seems.)
|
||||
|
||||
A lot of the weird targets in the old makefiles have been dropped; I
|
||||
have a feeling that a lot of them are archaic and not needed anymore.
|
||||
|
||||
I'd really like to write a build tool in C#. It would be nice to have
|
||||
something really extensible and well-designed and clean. NAnt is,
|
||||
IMHO, an apalling abomination and a tragically bad attempt at solving
|
||||
the software building problem. Just so you know.
|
||||
|
||||
(On the other hand, NUnit is really neat.)
|
||||
|
||||
Peter
|
||||
@@ -1,747 +0,0 @@
|
||||
# The MCS makefiles
|
||||
|
||||
Author: Peter Williams <peter@newton.cx>
|
||||
|
||||
The new makefiles try to abstract building on Windows and Linux. They
|
||||
try to provide a consistent set of ways to express the things that our
|
||||
build system needs to let us do, specifically:
|
||||
|
||||
* Build recursively
|
||||
* Build libraries and executables easily
|
||||
* Let developers use different runtimes and class libaries
|
||||
* Make distributions easily
|
||||
* Provide a framework for testing
|
||||
* Build platform-independently whenever possible
|
||||
* Generate, update, and build monodoc documentation.
|
||||
|
||||
Makefile structure
|
||||
==================
|
||||
|
||||
A general makefile looks like this:
|
||||
|
||||
```
|
||||
thisdir = class/Mono.My.Library
|
||||
SUBDIRS =
|
||||
include ../../build/rules.make
|
||||
|
||||
all-local:
|
||||
do some stuff
|
||||
|
||||
install-local:
|
||||
$(MKINSTALLDIRS) $(DESTDIR)$(prefix)/share/
|
||||
$(INSTALL_DATA) myfile.txt $(DESTDIR)$(prefix)/share/myfiledir
|
||||
|
||||
clean-local:
|
||||
rm -f my-generated-file
|
||||
|
||||
test-local: my_test_program.exe
|
||||
|
||||
run-test-local:
|
||||
$(RUNTIME) my_test_program.exe
|
||||
|
||||
run-test-ondotnet-local:
|
||||
$(RUNTIME) my_test_program.exe
|
||||
|
||||
DISTFILES = myfile.txt my_test_source.cs
|
||||
|
||||
dist-local: dist-default
|
||||
|
||||
doc-update-local:
|
||||
|
||||
my_test_program.exe: my_test_source.cs
|
||||
$(CSCOMPILE) /target:exe /out:$@ $<
|
||||
```
|
||||
|
||||
Each makefile follows the same pattern: it does some setup, includes
|
||||
the standard make rules, and provides rules for eight standard targets:
|
||||
`all`, `install`, `test`, `run-test`, `clean`, `dist`, and `doc-update`.
|
||||
|
||||
"Some setup" is defining two variables: `$(thisdir)` and
|
||||
`$(SUBDIRS)`. `$(thisdir)` is the directory that the makefile lives in,
|
||||
relative to the top directory (ie, `class/corlib`) and `$(SUBDIRS)`
|
||||
defines the subdirectories that should be built in.
|
||||
|
||||
The eight targets do the following:
|
||||
|
||||
* `all-local` builds whatever someone would expect to be built
|
||||
when they just type `make'` Most likely `Foo.dll` or `Foo.exe`
|
||||
|
||||
* `install-local` installs whatever got built by `all-local`.
|
||||
|
||||
* `test-local` _builds_ the test programs or libraries but does
|
||||
_not_ run them.
|
||||
|
||||
* `run-test-local` actually runs the tests. It shouldn't
|
||||
necessarily exit in an error if the test fails, but should make that
|
||||
situation obvious. It should only run tests that take care of
|
||||
themselves automatically; interactive tests should have an individual
|
||||
target. The idea is that `make run-test` from the toplevel should be
|
||||
able to proceed unsupervised and test everything that can be tested in
|
||||
such a manner.
|
||||
|
||||
* `run-xunit-test-local` this is a variation of the above, but it runs the
|
||||
tests that were built with Xunit instead of NUnit.
|
||||
|
||||
* `run-test-ondotnet-local` is a variant of `run-test-local`. It is used only to validate if our tests themselves works fine under Microsoft runtime (on Windows). Basically, in this target, we should not use $(TEST_RUNTIME) to test our libraries.
|
||||
|
||||
* `clean-local` removes built files; `make clean` should leave
|
||||
only files that go into a distribution tarball. (But it is not
|
||||
necessarily true that all files that go into a tarball need to be left
|
||||
after a make clean.)
|
||||
|
||||
* `dist-local` copies files into the distribution tree, which is
|
||||
given by the variable `$(distdir)`. `dist-local` always depends on the
|
||||
target `dist-default`. See ** `make dist` below.
|
||||
|
||||
* `doc-update-local` should generate or update monodoc documentation,
|
||||
if appropriate. This is usually only appropriate for libraries. It's
|
||||
defined as a standard target so that it can easily be run recursively
|
||||
across all libraries within the module.
|
||||
|
||||
Build configuration
|
||||
===================
|
||||
|
||||
In general, MCS needs to be able to build relying only on the
|
||||
existence of a runtime and core libraries (`mscorlib`, `System`,
|
||||
`System.Xml`). So there shouldn't be any checking for libraries or
|
||||
whatnot; MCS should be able to build out of the box. We try to keep
|
||||
platform detection and feature testing (ie, for HP/UX echo) inside
|
||||
the makefiles; right now, there's no configuration script, and it'd
|
||||
be nice to keep it that way. (I am told that some people build on
|
||||
both Windows and Linux in the same tree, which would be impossible to
|
||||
do if we cached platform-related configury values.)
|
||||
|
||||
That being said, it's very convenient for developers to be able to
|
||||
customize their builds to suit their needs. To allow this, the
|
||||
Makefile rules are set up to allow people to override pretty much any
|
||||
important variable.
|
||||
|
||||
Configuration variables are given defaults in `config-default.make`;
|
||||
`rules.make` optionally includes `$(topdir)/build/config.make`, so you
|
||||
can customize your build without CVS trying to commit your modified
|
||||
`config-default.make` all the time. Platform-specific variables are
|
||||
defined in `$(topdir)/build/platforms/$(BUILD_PLATFORM).make`, where
|
||||
`$(BUILD_PLATFORM)` is detected in `config-default.make`. (Currently, the only
|
||||
choices are `linux.make` and `win32.make`)
|
||||
|
||||
The best way to learn what the configuration variables are is to read
|
||||
`config.make` and `platform.make`. There aren't too many and hopefully
|
||||
they should be self-explanatory; see the numerous examples below for
|
||||
more information if you're confused.
|
||||
|
||||
Recommendations for platform specifics
|
||||
--------------------------------------
|
||||
|
||||
If you find yourself needing a platform-specific customization, try
|
||||
and express it in terms of a feature, rather than a platform test. In
|
||||
other words, this is good:
|
||||
|
||||
```
|
||||
run-test-local: my-test.exe
|
||||
ifdef PLATFORM_NEEDS_CRAZY_CRAP
|
||||
crazy-crap
|
||||
endif
|
||||
$(RUNTIME) my-test.exe
|
||||
```
|
||||
|
||||
and this is bad:
|
||||
|
||||
```
|
||||
run-test-local: my-test.exe
|
||||
ifdef WINDOWS
|
||||
crazy-crap
|
||||
else
|
||||
ifdef AMIGA
|
||||
crazy-crap
|
||||
endif
|
||||
endif
|
||||
$(RUNTIME) my-test.exe
|
||||
```
|
||||
|
||||
The latter accumulates and gets unpleasant and it sucks. Granted,
|
||||
right now we only have two platforms, so it's not a big deal, but it's
|
||||
good form to get used to and practice. Anyway, take a look at how we
|
||||
do the various corlib building hacks for examples of how we've done
|
||||
platform-specificity. It certainly isn't pretty, but at least it's a
|
||||
little structured.
|
||||
|
||||
Saving effort
|
||||
=============
|
||||
|
||||
The point of the build system is to abstract things and take
|
||||
care of all the easy stuff. So if you find yourself writing a
|
||||
Makefile, know that there's probably already infrastructure to do what
|
||||
you want. Here are all the common cases I can think of.
|
||||
|
||||
Compiling C# code? use:
|
||||
-----------------------
|
||||
|
||||
```
|
||||
my-program.exe: my-source.cs
|
||||
$(CSCOMPILE) /target:exe /out:$@ $^
|
||||
```
|
||||
|
||||
or
|
||||
|
||||
```
|
||||
my-lib.dll: my-source.cs
|
||||
$(CSCOMPILE) /target:library /out:$@ $^
|
||||
```
|
||||
|
||||
Note the `$@` and `$^` variables. The former means "the name of the
|
||||
file that I am trying to make" and the latter means "all the
|
||||
dependencies of the file I am trying to make." USE THESE VARIABLES
|
||||
AGGRESSIVELY. Say that you add a new source to your program:
|
||||
|
||||
```
|
||||
my-program.exe: my-source.cs my-new-source.cs
|
||||
$(CSCOMPILE) /target:exe /out:$@ $^
|
||||
```
|
||||
|
||||
Because of the $^ variable, you don't need to remember to add another
|
||||
file to the command line. Similarly, if you rename your program, you
|
||||
won't need to remember to change the rule:
|
||||
|
||||
```
|
||||
MonoVaporizer.exe: my-source.cs my-new-source.cs
|
||||
$(CSCOMPILE) /target:exe /out:$@ $^
|
||||
```
|
||||
|
||||
will still work. Another useful variable is $<, which means "the first
|
||||
dependency of whatever I'm building." If you order your dependencies
|
||||
carefully it can be extremely useful.
|
||||
|
||||
Just building an executable?
|
||||
----------------------------
|
||||
|
||||
Then use:
|
||||
|
||||
```
|
||||
PROGRAM = myprogram.exe
|
||||
LOCAL_MCS_FLAGS = /r:System.Xml.dll
|
||||
|
||||
include ../build/executable.make
|
||||
```
|
||||
|
||||
executable.make builds a program in the current directory. Its name is
|
||||
held in `$(PROGRAM)`, and its sources are listed in the file
|
||||
`$(PROGRAM).sources`. It might seem to make more sense to just list the
|
||||
program's sources in the Makefile, but when we build on Windows we
|
||||
need to change slashes around, which is much easier to do if the
|
||||
sources are listed in a file. The variable `$(LOCAL_MCS_FLAGS)` changes
|
||||
the flags given to the compiler; it is included in `$(CSCOMPILE)` so you
|
||||
don't need to worry about it.
|
||||
|
||||
`executable.make` does a lot for you: it builds the program in 'make
|
||||
all-local', installs the program in `$(prefix)/bin`, distributes the
|
||||
sources, and defines empty test targets. Now, if your program has a
|
||||
test, set the variable `HAS_TEST`:
|
||||
|
||||
```
|
||||
PROGRAM = myprogram.exe
|
||||
LOCAL_MCS_FLAGS = /r:System.Xml.dll
|
||||
HAS_TEST = yes
|
||||
include ../build/executable.make
|
||||
|
||||
test-local: mytester.exe
|
||||
|
||||
run-test-local: mytester.exe
|
||||
$(RUNTIME) $<
|
||||
|
||||
mytester.exe: mytester.cs
|
||||
$(CSCOMPILE) /target:exe /out:$@ mytester.cs
|
||||
```
|
||||
|
||||
If your program has NUnit tests, set the variable `HAS_NUNIT_TEST`:
|
||||
|
||||
```
|
||||
PROGRAM = myprogram.exe
|
||||
LOCAL_MCS_FLAGS = /r:System.Xml.dll
|
||||
HAS_NUNIT_TEST = yes
|
||||
include ../build/executable.make
|
||||
```
|
||||
|
||||
`HAS_NUNIT_TEST` tests follow `library.make` NUnit test conventions:
|
||||
the files should be in a subdirectory called `Test/`, and if
|
||||
your program is called `myprogram.exe`, they should be listed in
|
||||
`myprogram_test.dll.sources`. The names in that files should *not* have
|
||||
the `Test/` prefix. `make test'`will build `myprogram_test_$(PROFILE).dll`
|
||||
in the current directory, automatically supplying the flags to
|
||||
reference the original program and `NUnit.Framework.dll`.
|
||||
|
||||
If your program has 'built sources', that is, source files generated
|
||||
from other files (say, generated by jay), define a variable called
|
||||
`BUILT_SOURCES` and do *not* list the sources in `$(PROGRAM).sources`:
|
||||
|
||||
```
|
||||
PROGRAM = myprogram.exe
|
||||
LOCAL_MCS_FLAGS = /r:System.Xml.dll
|
||||
BUILT_SOURCES = parser.cs
|
||||
CLEAN_FILES = y.output
|
||||
|
||||
include ../build/executable.make
|
||||
|
||||
parser.cs: parser.jay
|
||||
$(topdir)/jay/jay $< > $@
|
||||
```
|
||||
|
||||
`executable.make` will automatically delete the `$(BUILT_SOURCES)` files
|
||||
on `make clean`. Since this situation is a common occurrence and jay
|
||||
happens to leave behind y.output files, you can also define a variable
|
||||
called `$(CLEAN_FILES)` that lists extra files to be deleted when
|
||||
`make clean` is called. (That's in addition to your executable and the built sources).
|
||||
|
||||
Buildling a library? Use
|
||||
------------------------
|
||||
|
||||
```
|
||||
LIBRARY = Mono.MyLib.dll
|
||||
LIB_MCS_FLAGS = /unsafe
|
||||
TEST_MCS_FLAGS = /r:System.Xml.dll
|
||||
|
||||
include ../../build/library.make
|
||||
```
|
||||
|
||||
Where you library is called `$(LIBRARY)`; it will be put into
|
||||
`$(topdir)/class/lib`. `LIB_MCS_FLAGS` is the set of MCS flags to use when
|
||||
compiling the library; in addition, a global set of flags called
|
||||
`$(LIBRARY_FLAGS)` is added (that variable is defined in
|
||||
`config-defaults.make`), as well as the usual `$(LOCAL_MCS_FLAGS)`.
|
||||
|
||||
As in `executable.make`, the sources for your library are listed in
|
||||
`$(LIBRARY).sources`. Note: these source lists should have Unix forward
|
||||
slashes and Unix newlines (\n, not \r\n.) If you get an error about
|
||||
"touch: need a filename", that means your .sources file doesn't end in
|
||||
a newline. It should.
|
||||
|
||||
Now `library.make` also assumes that your library has an NUnit2 test
|
||||
harness. The files should be in a subdirectory called `Test/`, and if
|
||||
your library is called `Mono.Foo.dll`, they should be listed in
|
||||
`Mono.Foo_test.dll.sources`. The names in that files should *not* have
|
||||
the `Test/` prefix. `make test` will build `Mono.Foo_test.dll` in the
|
||||
current directory, automatically supplying the flags to reference the
|
||||
original library and `NUnit.Framework.dll`.
|
||||
|
||||
If you don't have a test, just do this:
|
||||
|
||||
```
|
||||
LIBRARY = Mono.MyLib.dll
|
||||
LIB_MCS_FLAGS = /unsafe
|
||||
NO_TEST = yes
|
||||
|
||||
include ../../build/library.make
|
||||
```
|
||||
|
||||
and feel ashamed. Every good library has a test suite!
|
||||
|
||||
Extra flags needed to compile the test library should be listed in
|
||||
$(TEST_MCS_FLAGS); often you will have a line like this:
|
||||
|
||||
```
|
||||
TEST_MCS_FLAGS = $(LIB_MCS_FLAGS)
|
||||
```
|
||||
|
||||
Again, `library.make` does a lot for you: it builds the dll, it
|
||||
generates makefile fragments to track the dependencies, it installs
|
||||
the library, it builds the test dll on `make test`, it runs
|
||||
`$(TEST_HARNESS)` on it on `make run-test`, it removes the appropriate
|
||||
files on 'make clean', and it distributes all the source files on
|
||||
`make dist`. (`TEST_HARNESS` defaults to be `nunit-console.exe` but it may
|
||||
be overridden to, say, `nunit-gtk`). If you have extra files to
|
||||
distribute when using either `library.make` or `executable.make`, use the
|
||||
variable `$(EXTRA_DISTFILES)`:
|
||||
|
||||
```
|
||||
EXTRA_DISTFILES = \
|
||||
Test/testcase1.in \
|
||||
Test/testcase1.out \
|
||||
README
|
||||
```
|
||||
|
||||
Again, `library.make` and `executable.make` do the right things so that we
|
||||
can build on Windows, doing some trickery to invert slashes and
|
||||
overcome command-line length limitations. Use them unless you have a
|
||||
really good reason not to. If you're building a bunch of small
|
||||
executables, check out `tools/Makefile` or `tools/security/Makefile`; if
|
||||
all the files are in the current directory, changing slashes isn't a
|
||||
big deal, and command-line lengths won't be a problem, so
|
||||
executable.make isn't necessary (and indeed it won't work, since it
|
||||
can only build one .exe in a directory).
|
||||
|
||||
If you're building a library, `library.make` is highly recommended; the
|
||||
only DLL that doesn't use it is corlib, because building corlib is a
|
||||
fair bit more complicated than it should be. Oh well.
|
||||
|
||||
`library.make` also automatically supports generating and updating
|
||||
monodoc documentation. Documentation is stored within the
|
||||
Documentation directory (a sibling to the Test directory), and is
|
||||
generated/updated whenever the doc-update target is executed.
|
||||
Assembling of the documentation so that the monodoc browser can
|
||||
display the documentation is handled separately within the mcs/docs
|
||||
all-local target; see mcs/docs/Makefile for details.
|
||||
|
||||
Running a C# program? Use $(RUNTIME)
|
||||
------------------------------------
|
||||
|
||||
```
|
||||
run-test-local: myprog.exe
|
||||
$(RUNTIME) myprog.exe
|
||||
```
|
||||
|
||||
`$(RUNTIME)` might be empty (if you're on windows), so don't expect to
|
||||
be able to give it any arguments. If you're on a platform which has an
|
||||
interpreter or jitter, $(RUNTIME_FLAGS) is included in $(RUNTIME), so
|
||||
set that variable.
|
||||
|
||||
$(TEST_RUNTIME) is the runtime to use when running tests. Right now it's
|
||||
just "mono --debug".
|
||||
|
||||
|
||||
|
||||
Calling the compiler directly? Use $(MCS).
|
||||
------------------------------------------
|
||||
|
||||
Really, you should use $(CSCOMPILE) whenever possible, but $(MCS) is
|
||||
out there. $(BOOTSTRAP_MCS) is the C# compiler that we use to build
|
||||
mcs.exe; on Linux, we then use mcs.exe to build everything else, but
|
||||
on Windows, we use csc.exe to build everything. Only use
|
||||
$(BOOTSTRAP_MCS) if you know what you're doing.
|
||||
|
||||
Compiling C code? Use $(CCOMPILE)
|
||||
---------------------------------
|
||||
|
||||
To give it flags, set $(LOCAL_CFLAGS). As with compiling C#, the
|
||||
variable $(CFLAGS) will automatically be included on the command line.
|
||||
|
||||
|
||||
Compiling resources with resgen
|
||||
-------------------------------
|
||||
|
||||
If you have a resource that should be compiled with resgen and
|
||||
included in your assembly, you can use the RESOURCES_DEFS variable.
|
||||
This variable can contain lists of pairs that are separated by comma
|
||||
to represent the resource ID as embedded in the assembly followed by
|
||||
the file name, like this:
|
||||
|
||||
RESOURCE_DEFS = Messages,TextResources.resx Errors,ErrorList.txt
|
||||
|
||||
|
||||
Documentation-related needs? Use $(MDOC)
|
||||
----------------------------------------
|
||||
|
||||
$(MDOC) is a front-end to the monodoc documentation system, supporting
|
||||
documentation generation, updating, importing from Microsoft XML
|
||||
Documentation and ECMA documentation formats, assembling documentation
|
||||
for use within the monodoc documentation browser, and exporting
|
||||
documentation to various other output formats such as static HTML.
|
||||
|
||||
It is currently only used for library.make's doc-update-local target
|
||||
and for assembling documentation within $topdir/docs.
|
||||
|
||||
Installing files? Use $(MKINSTALLDIRS), $(INSTALL_DATA) or $(INSTALL_BIN), $(prefix), and $(DESTDIR).
|
||||
-----------------------------------------------------------------------------------------------------
|
||||
|
||||
Every time a file is installed the commands should look like this:
|
||||
|
||||
```
|
||||
install-local:
|
||||
$(MKINSTALLDIRS) $(DESTDIR)$(prefix)/my/dir
|
||||
$(INSTALL_DATA) myfile $(DESTDIR)$(prefix)/my/dir
|
||||
```
|
||||
|
||||
This way the directory is created recursively if needed (admittedly, we could
|
||||
probably rely on mkdir -p), the file is given the correct permissions,
|
||||
the user can override $(MKINSTALLDIRS) and $(INSTALL) if they need to,
|
||||
and we can support $(DESTDIR) installs. We use $(DESTDIR) to make
|
||||
monocharge tarballs, and it's useful otherwise, so try and use it
|
||||
consistently.
|
||||
|
||||
'make dist'? Use $(DISTFILES)
|
||||
-----------------------------
|
||||
|
||||
The 'dist-default' target will copy the files listed in $(DISTFILES)
|
||||
into the distribution directory, as well as Makefile and ChangeLog if
|
||||
they exist. This is almost always all that you need, so ideally your
|
||||
make dist support should only be:
|
||||
|
||||
```
|
||||
DISTFILES = README Test/thoughts.txt
|
||||
|
||||
dist-local: dist-default
|
||||
```
|
||||
|
||||
DISTFILES will cope correctly with files in subdirectories, by the
|
||||
way. Note that if you put a nonexistant file or a directory in
|
||||
DISTFILES it will *not* complain; it will just ignore it.
|
||||
|
||||
If you want to test your 'make dist' code, you can try
|
||||
|
||||
```
|
||||
$ cd class/Mono.MyClass
|
||||
$ make dist-local distdir=TEST
|
||||
```
|
||||
|
||||
And your files should be copied into TEST/ in the current directory.
|
||||
There is a toplevel 'make distcheck' target, which will build a dist
|
||||
tarball, try to build it, install files to a temporary prefix, make
|
||||
clean it, make a distribution, and compare the files left over to the
|
||||
files originally in the tarball: they should be the same. But this
|
||||
takes about 15 minutes to run on my 1.1 Ghz computer, so it's not for
|
||||
the faint of heart.
|
||||
|
||||
Lots of files? Use $(wildcard *.foo)
|
||||
------------------------------------
|
||||
|
||||
When specifying the sources to a library or executable, wildcards are
|
||||
not encouraged; in fact they're not allowed if you use library.make or
|
||||
executable.make. But there are times when they're useful, eg:
|
||||
|
||||
```
|
||||
DISTFILES = $(wildcard Test/*.in) $(wildcard Test/*.out)
|
||||
```
|
||||
|
||||
Just so you know that `make` has this feature.
|
||||
|
||||
Referencing files in other directories? Use $(topdir).
|
||||
------------------------------------------------------
|
||||
|
||||
$(topdir) is the path to the top directory from the current build
|
||||
directory. Basically it's a sequence of ../.. computed from the value
|
||||
that you give $(thisdir) at the top of your Makefile. Try to reference
|
||||
things from $(topdir), so your code can be moved or cut-and-pasted
|
||||
around with a minimum of fuss.
|
||||
|
||||
Conditional building? Use ifdef/ifndef/endif
|
||||
--------------------------------------------
|
||||
|
||||
Now in general we want to avoid conditional building, but sometimes
|
||||
something doesn't work on Linux or already exists on Windows or
|
||||
whatnot. (See below on recommended form for how to build
|
||||
platform-specifically.) GNU Make supports the following construction:
|
||||
|
||||
```
|
||||
BUILD_EXPERIMENTAL = yes
|
||||
|
||||
ifdef BUILD_EXPERIMENTAL
|
||||
experimental_stuff = my-experiment.exe
|
||||
else
|
||||
experimental_stuff =
|
||||
endif
|
||||
|
||||
all-local: my-sane.exe $(experimental_stuff)
|
||||
```
|
||||
|
||||
'ifdef' means 'if the variable is set to nonempty', so you could have
|
||||
|
||||
```
|
||||
BUILD_EXPERIMENTAL = colorless green ideas sleep furiously
|
||||
```
|
||||
|
||||
and Make would be happy. I hope that the meaning of 'ifndef' should be
|
||||
obvious. If you want to only sometimes build a target, the above
|
||||
construction is the recommended way to go about it; it's nice to have
|
||||
the rules exist in a Makefile even if they aren't invoked.
|
||||
|
||||
If you want to see why conditionals aren't nice, take a look at
|
||||
library.make or class/corlib/Makefile.
|
||||
|
||||
|
||||
'Private' directories that shouldn't be built by default? Use DIST_ONLY_SUBDIRS
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
Several of the MCS class libraries have demo or experimental
|
||||
implementations that depend on things not included with MCS (say,
|
||||
Gtk#). We don't want to build them by default, because the user might
|
||||
not have those dependencies installed, but it's nice to have a
|
||||
Makefile for them to be built nicely.
|
||||
|
||||
First of all, there's nothing stopping you from writing a Makefile for
|
||||
such a directory; just don't put it in the SUBDIRS line of its parent
|
||||
directory. That way, you can do all the normal build things like 'make
|
||||
all' or 'make clean' in that directory, but people trying to bootstrap
|
||||
their system won't run into problems.
|
||||
|
||||
At the same time you probably want to include this directory in the
|
||||
distribution so that people can use your demo or experimental code if
|
||||
they know what they're doing. Hence the variable
|
||||
$(DIST_ONLY_SUBDIRS). As you might guess, it's like the SUBDIRS
|
||||
variable: it lists subdirectories that a regular shouldn't recurse
|
||||
into, but should have their 'make dist' rules invoked.
|
||||
|
||||
Say you've written Mono.MyFancyLib.dll and you have
|
||||
a demo app using Gtk# called MyFancyDemo. The Makefile rules might
|
||||
look like this:
|
||||
|
||||
class/Mono.MyFancyLib/Makefile
|
||||
```
|
||||
thisdir = class/Mono.MyFancyLib
|
||||
SUBDIRS =
|
||||
DIST_ONLY_SUBDIRS = MyFancyDemo
|
||||
include ../../build/rules.make
|
||||
|
||||
LIBRARY = Mono.MyFancyLib.dll
|
||||
LIB_MCS_FLAGS = /r:System.dll
|
||||
TEST_MCS_FLAGS = $(LIB_MCS_FLAGS)
|
||||
|
||||
include ../../build/library.make
|
||||
```
|
||||
|
||||
class/Mono.MyFancyLib/MyFancyDemo/Makefile
|
||||
```
|
||||
thisdir = class/Mono.MyFancyLib/MyFancyDemo
|
||||
SUBDIRS =
|
||||
include ../../../build/rules.make
|
||||
|
||||
PROGRAM = FancyDemo.exe
|
||||
LOCAL_MCS_FLAGS = /r:gtk-sharp.dll
|
||||
|
||||
include ../../../build/executable.make
|
||||
```
|
||||
|
||||
|
||||
|
||||
|
||||
Special recursion needs?
|
||||
------------------------
|
||||
|
||||
By default, rules.make defines the all, install, clean, etc. targets
|
||||
to look something like this:
|
||||
|
||||
```
|
||||
all: all-recursive
|
||||
$(MAKE) all-local
|
||||
```
|
||||
|
||||
Sometimes that doesn't cut it; say for example you want to check for
|
||||
something before doing a lengthy recursive build (see
|
||||
$(topdir)/Makefile) or you have a something like this
|
||||
|
||||
```
|
||||
class/MyLibrary:
|
||||
Build MyLibrary.dll
|
||||
class/MyLibrary/Test:
|
||||
Build TestMyLibrary.exe
|
||||
```
|
||||
|
||||
`make clean test` will fail here, because the build will happen in
|
||||
the Test subdirectory first, so there will be no `MyLibrary.dll` to link
|
||||
against. (Unless you write a nasty evil relative path rule which is
|
||||
strongly discouraged.)
|
||||
|
||||
Anyway, to solve this problem you can do
|
||||
|
||||
```
|
||||
thisdir = class/MyLibrary
|
||||
SUBDIRS = Test
|
||||
include ../../build/rules.make
|
||||
|
||||
# Normally, make runs 'all-recursive' first, and then 'all-local'
|
||||
# With this, we ensure that 'all-local' is executed first.
|
||||
all-recursive: all-local
|
||||
|
||||
test-recursive: test-local
|
||||
...
|
||||
```
|
||||
|
||||
|
||||
A few implementation details
|
||||
----------------------------
|
||||
|
||||
The way rules.make does its recursion is very standard; it maps
|
||||
`{all,install,clean,dist,test}` to `$@-recursive`, which executes that rule
|
||||
in each directory in `$(SUBDIRS)`, and then calls `$@-local` bin the current
|
||||
directory. So something that gets built in a subdirectory cannot rely on
|
||||
something that gets built in its parent directory. If this is a problem,
|
||||
see the previous section. Note that the recursive rule for 'dist' is
|
||||
different; it makes dist-recursive in subdirectories, so you at least
|
||||
have to define that rule.
|
||||
|
||||
Note that even a directory that doesn't, for example, have any tests
|
||||
must still define test-local; otherwise 'make test' run from the
|
||||
toplevel directory will break.
|
||||
|
||||
Flags for Tools
|
||||
---------------
|
||||
|
||||
We want to make it so that the user can specify certain flags to
|
||||
always be given to a tool, so there's a general way of implementing
|
||||
FLAGS variables:
|
||||
|
||||
* `$(foo_FLAGS)` remains unset or defaulted to something
|
||||
sensible; the user can provide overrides this way.
|
||||
|
||||
* `$(LOCAL_foo_FLAGS)` is set in a specific Makefile to
|
||||
provide necessary values.
|
||||
|
||||
* `$(PLATFORM_foo_FLAGS)` is set in the platform configuration
|
||||
to provide platform-specific values.
|
||||
|
||||
* `$(PROFILE_foo_FLAGS)` is set in the profile configuration
|
||||
to provide profile-specific values.
|
||||
|
||||
* `$(USE_foo_FLAGS)` is defined to be the combination of all of
|
||||
the above, and it's what is actually passed to $(foo).
|
||||
|
||||
`$(MCS_FLAGS)` and `$(CFLAGS)` follow this model. If you end up finding
|
||||
that another tool is used commonly (hm, jay...), please follow this form.
|
||||
|
||||
Portability tips
|
||||
----------------
|
||||
|
||||
Always use the icky Windows /argument way of passing parameters to the C#
|
||||
compiler so that csc can be used.
|
||||
|
||||
Always use `/r:foo.dll`, not `/r:foo`. Windows requires the former.
|
||||
|
||||
Use `/r:$(corlib)`, not `/r:corlib`.
|
||||
|
||||
If you're writing shell script code as part of a make rule, remember
|
||||
that Windows has command-line length limits. So something like
|
||||
|
||||
```
|
||||
mytool $(all_the_sources_to_corlib)
|
||||
```
|
||||
|
||||
Is probably going to cause problems. As I understand it,
|
||||
|
||||
```
|
||||
for f in $(all_the_sources_to_corlib) ; do ...
|
||||
```
|
||||
|
||||
is ok, since the shell itself doesn't have those limitations. Other
|
||||
than that, you should still try to write fairly portable shell
|
||||
script. Linux and Cygwin both use the GNU utilities, but there's at
|
||||
least one hardy soul trying to build Mono on HP/UX, and no doubt there
|
||||
will be ports to more Unices as time goes on.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Misc
|
||||
----
|
||||
|
||||
We still don't use `/d:NET_1_1`; it causes some build problems right
|
||||
now.
|
||||
|
||||
There's a hack in class/System.Data/Makefile to work around a very
|
||||
strange crash in the runtime with some custom attribute stuff. It'd be
|
||||
nice to fix it.
|
||||
|
||||
Also, there's a /lib:$(prefix)/lib in the System.dll Makefile, which
|
||||
is for some reason necessary if System.Xml.dll hasn't been built yet.
|
||||
(Well, it's necessary because of the /r:System.Xml.dll, but that
|
||||
should be in the search path, it seems.)
|
||||
|
||||
A lot of the weird targets in the old makefiles have been dropped; I
|
||||
have a feeling that a lot of them are archaic and not needed anymore.
|
||||
|
||||
I'd really like to write a build tool in C#. It would be nice to have
|
||||
something really extensible and well-designed and clean. NAnt is,
|
||||
IMHO, an apalling abomination and a tragically bad attempt at solving
|
||||
the software building problem. Just so you know.
|
||||
|
||||
(On the other hand, NUnit is really neat.)
|
||||
|
||||
Peter
|
||||
@@ -1,2 +1 @@
|
||||
/Consts.cs
|
||||
/sourcelink.json
|
||||
@@ -38,7 +38,7 @@ static class Consts
|
||||
public const string MonoCompany = "Mono development team";
|
||||
public const string MonoProduct = "Mono Common Language Infrastructure";
|
||||
public const string MonoCopyright = "(c) Various Mono authors";
|
||||
public const string MonoCorlibVersion = "@MONO_CORLIB_VERSION@";
|
||||
public const int MonoCorlibVersion = @MONO_CORLIB_VERSION@;
|
||||
|
||||
#if MOBILE
|
||||
// Versions of .NET Framework for Silverlight 4.0
|
||||
@@ -98,7 +98,7 @@ static class Consts
|
||||
public const string AssemblyMono_Security = "Mono.Security, Version=" + FxVersion + ", Culture=neutral, PublicKeyToken=0738eb9f132ed756";
|
||||
public const string AssemblyMono_Messaging_RabbitMQ = "Mono.Messaging.RabbitMQ, Version=" + FxVersion + ", Culture=neutral, PublicKeyToken=0738eb9f132ed756";
|
||||
public const string AssemblyCorlib = "mscorlib, Version=" + FxVersion + ", Culture=neutral, PublicKeyToken=" + PublicKeyToken;
|
||||
public const string AssemblySystem = "System, Version=" + FxVersion + ", Culture=neutral, PublicKeyToken=" + PublicKeyToken;
|
||||
public const string AssemblySystem = "System, Version=" + FxVersion + ", Culture=neutral, PublicKeyToken=b77a5c561934e089";
|
||||
public const string AssemblySystem_Data = "System.Data, Version=" + FxVersion + ", Culture=neutral, PublicKeyToken=b77a5c561934e089";
|
||||
public const string AssemblySystem_Design = "System.Design, Version=" + FxVersion + ", Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";
|
||||
public const string AssemblySystem_DirectoryServices = "System.DirectoryServices, Version=" + FxVersion + ", Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";
|
||||
@@ -109,13 +109,17 @@ static class Consts
|
||||
public const string AssemblySystem_ServiceProcess = "System.ServiceProcess, Version=" + FxVersion + ", Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";
|
||||
public const string AssemblySystem_Web = "System.Web, Version=" + FxVersion + ", Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";
|
||||
public const string AssemblySystem_Windows_Forms = "System.Windows.Forms, Version=" + FxVersion + ", Culture=neutral, PublicKeyToken=b77a5c561934e089";
|
||||
#if NET_4_0
|
||||
public const string AssemblySystem_2_0 = "System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";
|
||||
public const string AssemblySystemCore_3_5 = "System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";
|
||||
public const string AssemblySystem_Core = "System.Core, Version=" + FxVersion + ", Culture=neutral, PublicKeyToken=" + PublicKeyToken;
|
||||
public const string AssemblySystem_Core = "System.Core, Version=" + FxVersion + ", Culture=neutral, PublicKeyToken=b77a5c561934e089";
|
||||
public const string WindowsBase_3_0 = "WindowsBase, Version=3.0.0.0, PublicKeyToken=31bf3856ad364e35";
|
||||
public const string AssemblyWindowsBase = "WindowsBase, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35";
|
||||
public const string AssemblyPresentationCore_3_5 = "PresentationCore, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35";
|
||||
public const string AssemblyPresentationCore_4_0 = "PresentationCore, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35";
|
||||
public const string AssemblyPresentationFramework_3_5 = "PresentationFramework, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35";
|
||||
public const string AssemblySystemServiceModel_3_0 = "System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";
|
||||
#elif MOBILE
|
||||
public const string AssemblySystem_Core = "System.Core, Version=" + FxVersion + ", Culture=neutral, PublicKeyToken=b77a5c561934e089";
|
||||
#endif
|
||||
}
|
||||
@@ -45,8 +45,6 @@ static partial class SR
|
||||
{
|
||||
return string.Format (CultureInfo.InvariantCulture, resourceFormat, p1, p2, p3);
|
||||
}
|
||||
|
||||
internal static string GetResourceString (string str) => str;
|
||||
}
|
||||
|
||||
#if !INSIDE_CORLIB
|
||||
|
||||
@@ -1,13 +1,14 @@
|
||||
using System;
|
||||
|
||||
interface II
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
class X
|
||||
{
|
||||
static void Foo (II a = default (II), II b = default, II c = (II) null)
|
||||
class X {
|
||||
// Check installed compiler
|
||||
static void Generic<T> ()
|
||||
{
|
||||
// we use 'var' all around in the compiler sources
|
||||
var x = new X ();
|
||||
}
|
||||
|
||||
void DefaultParametersAvailable (int i = 3)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -41,9 +42,9 @@ class X
|
||||
|
||||
Version min_mono_version;
|
||||
#if __MonoCS__
|
||||
min_mono_version = new Version (5, 19);
|
||||
min_mono_version = new Version (5, 11);
|
||||
#else
|
||||
min_mono_version = new Version (5, 10);
|
||||
min_mono_version = new Version (4, 9);
|
||||
#endif
|
||||
|
||||
if (version < min_mono_version)
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
{
|
||||
"documents": {
|
||||
"@mono_topdir@/external/corefx/*": "https://raw.githubusercontent.com/mono/corefx/@corefx_commit_hash@/*",
|
||||
"@mono_topdir@/external/corert/*": "https://raw.githubusercontent.com/mono/corert/@corert_commit_hash@/*",
|
||||
"@mono_topdir@/external/cecil/*": "https://raw.githubusercontent.com/mono/cecil/@cecil_commit_hash@/*",
|
||||
"@mono_topdir@/*": "https://raw.githubusercontent.com/mono/mono/@mono_commit_hash@/*"
|
||||
}
|
||||
}
|
||||
@@ -32,10 +32,9 @@ mono_libdir = $(exec_prefix)/lib
|
||||
sysconfdir = $(prefix)/etc
|
||||
#RUNTIME = mono
|
||||
RUNTIME = false
|
||||
MONO_PATH_TOP = $(topdir)/class/lib/$(PROFILE_DIRECTORY)
|
||||
MONO_PATH_TOP = $(topdir)/class/lib/$(PROFILE_DIRECTORY)/
|
||||
MONO_PATH_TESTS = $(MONO_PATH_TOP)/tests
|
||||
TEST_MONO_PATH = $(MONO_PATH_TOP)$(PLATFORM_PATH_SEPARATOR)$(MONO_PATH_TESTS)$(PLATFORM_PATH_SEPARATOR).
|
||||
TEST_RUNTIME = MONO_PATH="$(TEST_MONO_PATH)$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH" $(RUNTIME) --debug
|
||||
TEST_RUNTIME = MONO_PATH="$(MONO_PATH_TOP)$(PLATFORM_PATH_SEPARATOR)$(TEST_MONO_PATH)$(PLATFORM_PATH_SEPARATOR)$(MONO_PATH_TESTS)$(PLATFORM_PATH_SEPARATOR).$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH" $(RUNTIME) --debug
|
||||
|
||||
# In case you want to add MCS_FLAGS, this lets you not have to
|
||||
# keep track of the default value
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
API_INFO = $(MONO_PATH) $(RUNTIME) $(topdir)/class/lib/$(PROFILE)/mono-api-info.exe
|
||||
API_DIFF = $(MONO_PATH) $(RUNTIME) $(topdir)/class/lib/$(PROFILE)/mono-api-diff.exe
|
||||
API_DIFF = $(MONO_PATH) $(RUNTIME) $(topdir)/tools/corcompare/mono-api-diff.exe
|
||||
TRANSFORM = $(MONO_PATH) $(RUNTIME) $(topdir)/tools/corcompare/transform.exe
|
||||
|
||||
OBJECTS = $(topdir)/build/corcompare/$(LIBRARY_NAME:.dll=.html)
|
||||
|
||||
@@ -42,17 +42,15 @@ executable_CLEAN_FILES += $(build_lib) $(build_lib).so $(build_lib).mdb $(build_
|
||||
|
||||
makefrag = $(depsdir)/$(PROFILE)_$(base_prog).makefrag
|
||||
|
||||
LIB_REFS_ALL = $(DEFAULT_REFERENCES) $(LIB_REFS)
|
||||
|
||||
ifdef TARGET_NET_REFERENCE
|
||||
# System*, mscorlib references come from the TARGET_NET_REFERENCE dir, others from the profile dir
|
||||
LIB_REFS_MONO = $(call _FILTER_OUT,System,$(call _FILTER_OUT,mscorlib,$(LIB_REFS_ALL)))
|
||||
LIB_REFS_SYSTEM = $(filter-out $(LIB_REFS_MONO),$(LIB_REFS_ALL))
|
||||
# System.*.dll references come from the TARGET_NET_REFERENCE dir, others from the profile dir
|
||||
LIB_REFS_MONO = $(call _FILTER_OUT,System,$(LIB_REFS))
|
||||
LIB_REFS_SYSTEM = $(filter-out $(LIB_REFS_MONO),$(LIB_REFS))
|
||||
|
||||
MCS_REFERENCES = $(patsubst %,-r:$(topdir)/../external/binary-reference-assemblies/$(TARGET_NET_REFERENCE)/%.dll,$(LIB_REFS_SYSTEM))
|
||||
MCS_REFERENCES += $(patsubst %,-r:$(topdir)/class/lib/$(PROFILE_DIRECTORY)/%.dll,$(LIB_REFS_MONO))
|
||||
else
|
||||
MCS_REFERENCES = $(patsubst %,-r:$(topdir)/class/lib/$(PROFILE_DIRECTORY)/%.dll,$(LIB_REFS_ALL))
|
||||
MCS_REFERENCES = $(patsubst %,-r:$(topdir)/class/lib/$(PROFILE_DIRECTORY)/%.dll,$(LIB_REFS))
|
||||
endif
|
||||
|
||||
ifdef KEYFILE
|
||||
@@ -191,7 +189,6 @@ csproj-local:
|
||||
echo $(thisdir):$$config_file >> $(topdir)/../msvc/scripts/order; \
|
||||
(echo $(is_boot); \
|
||||
echo $(USE_MCS_FLAGS) $(LIBRARY_FLAGS) $(LIB_MCS_FLAGS) $(patsubst %,-r:%,$(LIB_REFS)); \
|
||||
echo $(sourcefile); \
|
||||
echo $(PROGRAM); \
|
||||
echo $(BUILT_SOURCES_cmdline); \
|
||||
echo $(build_lib); \
|
||||
|
||||
Executable
+113
@@ -0,0 +1,113 @@
|
||||
#! /bin/sh
|
||||
|
||||
outfile=$1
|
||||
incfile=$2
|
||||
excfile=$3
|
||||
extfile=$4
|
||||
extexcfile=$5
|
||||
|
||||
process_includes_1() {
|
||||
sed -e '/^[ \t]*$/d' -e '/^[ \t]*#/d' -e '/*/d' $1 > $2
|
||||
if cmp -s $1 $2; then
|
||||
false
|
||||
else
|
||||
sed -n 's,^[ \t]*#include ,,p' $1 |
|
||||
while read inc; do
|
||||
cat $inc >> $2
|
||||
echo $outfile: $inc >> $outfile.makefrag
|
||||
echo $inc: >> $outfile.makefrag
|
||||
done
|
||||
|
||||
# expand wildcards
|
||||
sed -n '/*/p' $1 | grep -v '#' |
|
||||
while read wildc; do
|
||||
# quick syntax to exclude files:
|
||||
# ../../../MyDir/*.cs:FileToExclude1.cs,FileToExclude2.cs
|
||||
wc=`echo $wildc | cut -d \: -f 1` # ../../../MyDir/*.cs
|
||||
qexc=`echo $wildc | cut -d \: -f 2` # FileToExclude1.cs,FileToExclude2.cs
|
||||
|
||||
if test "$wc" = "$qexc"; then
|
||||
# no quick excludes - just expand the wildcard
|
||||
ls $wildc >> $2
|
||||
else
|
||||
wcdir=`echo $wildc | cut -d \* -f 1` # ../../../MyDir/
|
||||
# Enumerate files from 'FileToExclude1.cs,FileToExclude2.cs'
|
||||
# and save to $outfile.exc
|
||||
oldIFS=$IFS
|
||||
IFS=,
|
||||
for i in $qexc; do
|
||||
echo "$wcdir$i" >> $outfile.exc
|
||||
done
|
||||
IFS=$oldIFS
|
||||
ls $wc >> $2
|
||||
fi
|
||||
done
|
||||
fi
|
||||
}
|
||||
|
||||
process_includes() {
|
||||
i=$1; o=$2; t=${2}.tmp
|
||||
while process_includes_1 $i $o; do
|
||||
mv $o $t
|
||||
i=$t
|
||||
done
|
||||
rm -f $t
|
||||
}
|
||||
|
||||
check_newline_eof() {
|
||||
file=$1
|
||||
if ! test -f "$file"; then return; fi
|
||||
if ! test -z "$(tail -c 1 "$file")"; then echo "$file: missing newline at end of file."; exit 1; fi
|
||||
}
|
||||
|
||||
check_newline_eof $incfile
|
||||
check_newline_eof $excfile
|
||||
check_newline_eof $extfile
|
||||
check_newline_eof $extexcfile
|
||||
|
||||
rm -f $outfile.makefrag
|
||||
|
||||
process_includes $incfile $outfile.inc
|
||||
|
||||
if test x$extfile != x -a -f "$extfile"; then
|
||||
process_includes $extfile $outfile.ext.inc
|
||||
cat $outfile.ext.inc >> $outfile.inc
|
||||
rm -f $outfile.ext.inc
|
||||
fi
|
||||
|
||||
sort -u $outfile.inc > $outfile.inc_s
|
||||
rm -f $outfile.inc
|
||||
|
||||
|
||||
if test -n "$excfile" -a -f "$excfile"; then
|
||||
process_includes $excfile $outfile.exc
|
||||
fi
|
||||
|
||||
if test -n "$extexcfile"; then
|
||||
process_includes $extexcfile $outfile.ext_exc
|
||||
cat $outfile.ext_exc >> $outfile.exc
|
||||
rm -f $outfile.ext_exc
|
||||
fi
|
||||
|
||||
if test -f $outfile.exc; then
|
||||
# So what we're doing below with uniq -u is that we take
|
||||
# lines that have not been duplicated. This computes the
|
||||
# symmetric difference between the files. This is not
|
||||
# what we want. If a file is in the excludes but not in
|
||||
# the sources, we want that file not to show up. By duplicating the
|
||||
# excludes, we ensure that we won't end up in this failure state.
|
||||
sort -u $outfile.exc > $outfile.exc_s
|
||||
|
||||
# Duplicate excludes
|
||||
cat $outfile.exc_s >> $outfile.exc_s_dup
|
||||
cat $outfile.exc_s >> $outfile.exc_s_dup
|
||||
|
||||
rm -f $outfile.exc $outfile.exc_s
|
||||
|
||||
cat $outfile.inc_s $outfile.exc_s_dup | sort | uniq -u > $outfile
|
||||
rm -f $outfile.inc_s $outfile.exc_s_dup
|
||||
else
|
||||
mv $outfile.inc_s $outfile
|
||||
fi
|
||||
|
||||
|
||||
+34
-26
@@ -14,22 +14,23 @@
|
||||
# command line.
|
||||
#
|
||||
|
||||
LIB_REFS_FULL = $(call _FILTER_OUT,=, $(LIB_REFS)) $(DEFAULT_REFERENCES)
|
||||
# All dependent libs become dependent dirs for parallel builds
|
||||
# Have to rename to handle differences between assembly/directory names
|
||||
DEP_LIBS=$(patsubst System.Xml,System.XML,$(LIB_REFS))
|
||||
|
||||
LIB_REFS_FULL = $(call _FILTER_OUT,=, $(LIB_REFS))
|
||||
LIB_REFS_ALIAS = $(filter-out $(LIB_REFS_FULL),$(LIB_REFS))
|
||||
|
||||
# All dependent libs become dependent dirs for parallel builds
|
||||
DEP_LIBS = $(filter-out %=, $(subst =,= ,$(LIB_REFS)))
|
||||
|
||||
ifdef TARGET_NET_REFERENCE
|
||||
# System*, mscorlib references come from the TARGET_NET_REFERENCE dir, others from the profile dir
|
||||
LIB_REFS_MONO_FULL = $(call _FILTER_OUT,System,$(call _FILTER_OUT,mscorlib,$(LIB_REFS_FULL)))
|
||||
# System.*.dll references come from the TARGET_NET_REFERENCE dir, others from the profile dir
|
||||
LIB_REFS_MONO_FULL = $(call _FILTER_OUT,System,$(LIB_REFS_FULL))
|
||||
LIB_REFS_MONO_ALIAS = $(call _FILTER_OUT,System,$(LIB_REFS_ALIAS))
|
||||
|
||||
LIB_REFS_NET_FULL = $(filter-out $(LIB_REFS_MONO_FULL),$(LIB_REFS_FULL))
|
||||
LIB_REFS_NET_ALIAS = $(filter-out $(LIB_REFS_MONO_ALIAS),$(LIB_REFS_ALIAS))
|
||||
LIB_REFS_SYSTEM_FULL = $(filter-out $(LIB_REFS_MONO_FULL),$(LIB_REFS_FULL))
|
||||
LIB_REFS_SYSTEM_ALIAS = $(filter-out $(LIB_REFS_MONO_ALIAS),$(LIB_REFS_ALIAS))
|
||||
|
||||
LIB_MCS_FLAGS += $(patsubst %,-r:$(topdir)/../external/binary-reference-assemblies/$(TARGET_NET_REFERENCE)/%.dll,$(LIB_REFS_NET_FULL))
|
||||
LIB_MCS_FLAGS += $(patsubst %,-r:%.dll, $(subst =,=$(topdir)/../external/binary-reference-assemblies/$(TARGET_NET_REFERENCE)/,$(LIB_REFS_NET_ALIAS)))
|
||||
LIB_MCS_FLAGS += $(patsubst %,-r:$(topdir)/../external/binary-reference-assemblies/$(TARGET_NET_REFERENCE)/%.dll,$(LIB_REFS_SYSTEM_FULL))
|
||||
LIB_MCS_FLAGS += $(patsubst %,-r:%.dll, $(subst =,=$(topdir)/../external/binary-reference-assemblies/$(TARGET_NET_REFERENCE)/,$(LIB_REFS_SYSTEM_ALIAS)))
|
||||
|
||||
LIB_MCS_FLAGS += $(patsubst %,-r:$(topdir)/class/lib/$(PROFILE_DIRECTORY)/%.dll,$(LIB_REFS_MONO_FULL))
|
||||
LIB_MCS_FLAGS += $(patsubst %,-r:%.dll, $(subst =,=$(topdir)/class/lib/$(PROFILE_DIRECTORY)/,$(LIB_REFS_MONO_ALIAS)))
|
||||
@@ -60,9 +61,11 @@ endif
|
||||
the_libdir_base = $(topdir)/class/$(lib_dir)/$(PROFILE_DIRECTORY)/$(if $(LIBRARY_SUBDIR),$(LIBRARY_SUBDIR)/)
|
||||
|
||||
ifdef RESOURCE_STRINGS
|
||||
ifneq (basic, $(PROFILE))
|
||||
RESOURCE_STRINGS_FILES += $(RESOURCE_STRINGS:%=--resourcestrings:%)
|
||||
IL_REPLACE_FILES += $(IL_REPLACE:%=--ilreplace:%)
|
||||
endif
|
||||
endif
|
||||
|
||||
ifdef ENFORCE_LIBRARY_WARN_AS_ERROR
|
||||
ifeq ($(LIBRARY_WARN_AS_ERROR),yes)
|
||||
@@ -72,10 +75,16 @@ endif
|
||||
endif
|
||||
endif
|
||||
|
||||
# add sourcelink information if we're building a portable PDB
|
||||
ifneq (, $(findstring debug:portable, $(PROFILE_MCS_FLAGS)))
|
||||
LIB_MCS_FLAGS += -sourcelink:$(topdir)/build/common/sourcelink.json
|
||||
endif
|
||||
#
|
||||
# The bare directory contains the plain versions of System and System.Xml
|
||||
#
|
||||
bare_libdir = $(the_libdir_base)bare
|
||||
|
||||
#
|
||||
# The secxml directory contains the System version that depends on
|
||||
# System.Xml and Mono.Security
|
||||
#
|
||||
secxml_libdir = $(the_libdir_base)secxml
|
||||
|
||||
the_libdir = $(the_libdir_base)$(intermediate)
|
||||
|
||||
@@ -127,7 +136,6 @@ csproj-library:
|
||||
echo $(thisdir):$$config_file >> $(topdir)/../msvc/scripts/order; \
|
||||
(echo $(is_boot); \
|
||||
echo $(USE_MCS_FLAGS) $(LIBRARY_FLAGS) $(LIB_MCS_FLAGS) $(KEYFILE_MCS_FLAGS); \
|
||||
echo $(LIBRARY); \
|
||||
echo $(LIBRARY_NAME); \
|
||||
echo $(BUILT_SOURCES_cmdline); \
|
||||
echo $(build_lib); \
|
||||
@@ -216,7 +224,7 @@ test-local run-test-local run-test-ondotnet-local:
|
||||
ccomma = ,
|
||||
define RESOURCE_template
|
||||
$(1).resources: $(2)
|
||||
$$(RESGEN) "$$<" "$$@"
|
||||
$(RESGEN) "$$<" "$$@"
|
||||
|
||||
GEN_RESOURCE_DEPS += $(1).resources
|
||||
GEN_RESOURCE_FLAGS += -resource:$(1).resources
|
||||
@@ -228,12 +236,11 @@ ifdef RESOURCE_DEFS
|
||||
$(foreach pair,$(RESOURCE_DEFS), $(eval $(call RESOURCE_template,$(word 1, $(subst $(ccomma), ,$(pair))), $(word 2, $(subst $(ccomma), ,$(pair))))))
|
||||
endif
|
||||
|
||||
DISTFILES = $(wildcard *.sources) $(EXTRA_DISTFILES) $(DIST_LISTED_RESOURCES)
|
||||
DISTFILES = $(wildcard *$(LIBRARY)*.sources) $(EXTRA_DISTFILES) $(DIST_LISTED_RESOURCES)
|
||||
|
||||
ASSEMBLY = $(LIBRARY)
|
||||
ASSEMBLY_EXT = .dll
|
||||
the_assembly = $(the_lib)
|
||||
|
||||
include $(topdir)/build/tests.make
|
||||
|
||||
ifdef HAVE_CS_TESTS
|
||||
@@ -244,7 +251,6 @@ csproj-test:
|
||||
echo $(thisdir):$$config_file >> $(topdir)/../msvc/scripts/order; \
|
||||
(echo false; \
|
||||
echo $(USE_MCS_FLAGS) -r:$(the_assembly) $(TEST_MCS_FLAGS); \
|
||||
echo $(LIBRARY); \
|
||||
echo $(test_lib); \
|
||||
echo $(BUILT_SOURCES_cmdline); \
|
||||
echo $(test_lib); \
|
||||
@@ -289,12 +295,14 @@ endif
|
||||
# The library
|
||||
|
||||
# If the directory contains the per profile include file, generate list file.
|
||||
# TODO: depend on all *.sources (except tests) for now and figure out how to list only needed files later
|
||||
PROFILE_sources = $(filter-out %test.dll.exclude.sources %test.dll.sources, $(wildcard *.sources))
|
||||
PROFILE_sources := $(firstword $(if $(PROFILE_PLATFORM),$(wildcard $(PROFILE_PLATFORM)_$(PROFILE)_$(LIBRARY).sources)) $(wildcard $(PROFILE)_$(LIBRARY).sources) $(wildcard $(LIBRARY).sources))
|
||||
PROFILE_excludes = $(firstword $(if $(PROFILE_PLATFORM),$(wildcard $(PROFILE_PLATFORM)_$(PROFILE)_$(LIBRARY).exclude.sources)) $(wildcard $(PROFILE)_$(LIBRARY).exclude.sources))
|
||||
|
||||
# Note, gensources.sh can create a $(sourcefile).makefrag if it sees any '#include's
|
||||
# We don't include it in the dependencies since it isn't always created
|
||||
sourcefile = $(depsdir)/$(PROFILE_PLATFORM)_$(PROFILE)_$(LIBRARY_SUBDIR)_$(LIBRARY).sources
|
||||
$(sourcefile): $(PROFILE_sources) $(PROFILE_excludes) $(depsdir)/.stamp
|
||||
$(GENSOURCES) --strict --platformsdir:$(topdir)/build "$@" "$(LIBRARY)" "$(PROFILE_PLATFORM)" "$(PROFILE)"
|
||||
$(sourcefile): $(PROFILE_sources) $(PROFILE_excludes) $(topdir)/build/gensources.sh $(depsdir)/.stamp
|
||||
$(SHELL) $(topdir)/build/gensources.sh $@ '$(PROFILE_sources)' '$(PROFILE_excludes)'
|
||||
|
||||
library_CLEAN_FILES += $(sourcefile)
|
||||
|
||||
@@ -382,9 +390,9 @@ gen-deps:
|
||||
|
||||
update-corefx-sr-generic:
|
||||
ifneq ($(RESX_STRINGS),)
|
||||
MONO_PATH="$(topdir)/class/lib/$(BUILD_TOOLS_PROFILE)$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH" $(RUNTIME) $(RUNTIME_FLAGS) $(topdir)/class/lib/$(BUILD_TOOLS_PROFILE)/resx2sr.exe $(RESX_EXTRA_ARGUMENTS) $(RESX_STRINGS) >$(SR_OUTPUT)
|
||||
MONO_PATH="$(topdir)/class/lib/$(BUILD_TOOLS_PROFILE)$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH" $(RUNTIME) $(RUNTIME_FLAGS) $(topdir)/class/lib/$(BUILD_TOOLS_PROFILE)/resx2sr.exe $(RESX_STRINGS) >$(SR_OUTPUT)
|
||||
endif
|
||||
|
||||
update-corefx-sr: $(RESX_RESOURCE_STRING) $(XTEST_RESX_RESOURCE_STRING)
|
||||
make SR_OUTPUT=corefx/SR.cs RESX_STRINGS="$(RESX_RESOURCE_STRING)" RESX_EXTRA_ARGUMENTS="$(RESX_EXTRA_ARGUMENTS)" update-corefx-sr-generic \
|
||||
&& make SR_OUTPUT=corefx/SR.tests.cs RESX_STRINGS=$(XTEST_RESX_RESOURCE_STRING) update-corefx-sr-generic
|
||||
make SR_OUTPUT=corefx/SR.cs RESX_STRINGS="$(RESX_RESOURCE_STRING)" update-corefx-sr-generic \
|
||||
&& make SR_OUTPUT=corefx/SR.tests.cs RESX_STRINGS=$(XTEST_RESX_RESOURCE_STRING) update-corefx-sr-generic
|
||||
@@ -0,0 +1,36 @@
|
||||
# -*- makefile -*-
|
||||
#
|
||||
# Platform-specific makefile rules. This one's for macOS.
|
||||
#
|
||||
|
||||
PLATFORM_MCS_FLAGS =
|
||||
PLATFORM_RUNTIME = $(RUNTIME)
|
||||
PLATFORM_CORLIB = mscorlib.dll
|
||||
PLATFORM_TEST_HARNESS_EXCLUDES = NotOnMac,MacNotWorking,
|
||||
|
||||
EXTERNAL_MCS = mcs
|
||||
EXTERNAL_MBAS = mbas
|
||||
EXTERNAL_RUNTIME = mono
|
||||
#ILDISASM = monodis
|
||||
ILDISASM = false
|
||||
|
||||
PLATFORM_PATH_SEPARATOR = :
|
||||
|
||||
# Define this if this ever will work on Linux
|
||||
# PLATFORM_MAKE_CORLIB_CMP = yes
|
||||
|
||||
# This is for changing / to \ on windows
|
||||
PLATFORM_CHANGE_SEPARATOR_CMD = cat
|
||||
|
||||
hidden_prefix = .
|
||||
hidden_suffix =
|
||||
|
||||
platform-check:
|
||||
@:
|
||||
# I tried this but apparently Make's version strings aren't that
|
||||
# ... consistent between releases. Whatever.
|
||||
#
|
||||
# @if ! $(MAKE) --version |grep '^GNU Make version 3' 1>/dev/null 2>&1 ; then \
|
||||
# echo "*** You need to build MCS with GNU make. Try \`gmake'" ; \
|
||||
# exit 1 ; \
|
||||
# fi
|
||||
@@ -1,38 +0,0 @@
|
||||
# -*- makefile -*-
|
||||
#
|
||||
# Platform-specific makefile rules. This one's for macOS.
|
||||
#
|
||||
|
||||
PLATFORM_MCS_FLAGS =
|
||||
PLATFORM_RUNTIME = $(RUNTIME)
|
||||
PLATFORM_CORLIB = mscorlib.dll
|
||||
PLATFORM_TEST_HARNESS_EXCLUDES = NotOnMac,MacNotWorking,
|
||||
|
||||
EXTERNAL_MCS = mcs
|
||||
EXTERNAL_MBAS = mbas
|
||||
EXTERNAL_RUNTIME = mono
|
||||
#ILDISASM = monodis
|
||||
ILDISASM = false
|
||||
|
||||
PLATFORM_PATH_SEPARATOR = :
|
||||
|
||||
# Define this if this ever will work on Linux
|
||||
# PLATFORM_MAKE_CORLIB_CMP = yes
|
||||
|
||||
# This is for changing / to \ on windows
|
||||
PLATFORM_CHANGE_SEPARATOR_CMD = cat
|
||||
|
||||
hidden_prefix = .
|
||||
hidden_suffix =
|
||||
|
||||
platform-check:
|
||||
@:
|
||||
# I tried this but apparently Make's version strings aren't that
|
||||
# ... consistent between releases. Whatever.
|
||||
#
|
||||
# @if ! $(MAKE) --version |grep '^GNU Make version 3' 1>/dev/null 2>&1 ; then \
|
||||
# echo "*** You need to build MCS with GNU make. Try \`gmake'" ; \
|
||||
# exit 1 ; \
|
||||
# fi
|
||||
|
||||
PLATFORM_MACOS=1
|
||||
@@ -1,36 +0,0 @@
|
||||
# -*- makefile -*-
|
||||
#
|
||||
# Platform-specific makefile rules. This one's for any unix (FreeBSD, OpenBSD, etc.)
|
||||
#
|
||||
|
||||
PLATFORM_MCS_FLAGS =
|
||||
PLATFORM_RUNTIME = $(RUNTIME)
|
||||
PLATFORM_CORLIB = mscorlib.dll
|
||||
PLATFORM_TEST_HARNESS_EXCLUDES =
|
||||
|
||||
EXTERNAL_MCS = mcs
|
||||
EXTERNAL_MBAS = mbas
|
||||
EXTERNAL_RUNTIME = mono
|
||||
#ILDISASM = monodis
|
||||
ILDISASM = false
|
||||
|
||||
PLATFORM_PATH_SEPARATOR = :
|
||||
|
||||
# Define this if this ever will work on Unix
|
||||
# PLATFORM_MAKE_CORLIB_CMP = yes
|
||||
|
||||
# This is for changing / to \ on windows
|
||||
PLATFORM_CHANGE_SEPARATOR_CMD = cat
|
||||
|
||||
hidden_prefix = .
|
||||
hidden_suffix =
|
||||
|
||||
platform-check:
|
||||
@:
|
||||
# I tried this but apparently Make's version strings aren't that
|
||||
# ... consistent between releases. Whatever.
|
||||
#
|
||||
# @if ! $(MAKE) --version |grep '^GNU Make version 3' 1>/dev/null 2>&1 ; then \
|
||||
# echo "*** You need to build MCS with GNU make. Try \`gmake'" ; \
|
||||
# exit 1 ; \
|
||||
# fi
|
||||
@@ -0,0 +1,119 @@
|
||||
# -*- makefile -*-
|
||||
|
||||
monolite_path := $(topdir)/class/lib/monolite-$(BUILD_PLATFORM)/$(MONO_CORLIB_VERSION)
|
||||
|
||||
with_mono_path_monolite = MONO_PATH="$(monolite_path)$(PLATFORM_PATH_SEPARATOR)$(monolite_path)/Facades$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH"
|
||||
|
||||
monolite_flag := $(depsdir)/use-monolite
|
||||
use_monolite := $(wildcard $(monolite_flag))
|
||||
|
||||
MONOLITE_MSCORLIB = $(monolite_path)/mscorlib.dll
|
||||
|
||||
ifdef use_monolite
|
||||
ifdef MCS_MODE
|
||||
CSC_LOCATION = $(monolite_path)/mcs.exe
|
||||
endif
|
||||
|
||||
PROFILE_RUNTIME = $(with_mono_path_monolite) $(RUNTIME)
|
||||
BOOTSTRAP_MCS = $(PROFILE_RUNTIME) $(RUNTIME_FLAGS) $(CSC_LOCATION)
|
||||
|
||||
else
|
||||
PROFILE_RUNTIME = $(EXTERNAL_RUNTIME)
|
||||
ifdef MCS_MODE
|
||||
BOOTSTRAP_MCS = mcs
|
||||
else
|
||||
BOOTSTRAP_MCS = $(PROFILE_RUNTIME) $(RUNTIME_FLAGS) $(CSC_LOCATION)
|
||||
endif
|
||||
endif
|
||||
|
||||
MCS = $(BOOTSTRAP_MCS)
|
||||
|
||||
DEFAULT_REFERENCES = -r:$(topdir)/class/lib/$(PROFILE)/mscorlib.dll
|
||||
|
||||
PROFILE_MCS_FLAGS = -d:NET_4_0 -d:NET_4_5 -d:MONO -d:WIN_PLATFORM -d:BOOTSTRAP_BASIC -nowarn:1699 -nostdlib $(DEFAULT_REFERENCES)
|
||||
API_BIN_PROFILE = v4.7.1
|
||||
|
||||
NO_SIGN_ASSEMBLY = yes
|
||||
NO_TEST = yes
|
||||
NO_INSTALL = yes
|
||||
FRAMEWORK_VERSION = 4.5
|
||||
|
||||
# Compiler all using same bootstrap compiler
|
||||
LIBRARY_COMPILE = $(BOOT_COMPILE)
|
||||
|
||||
# Verbose basic only
|
||||
# V = 1
|
||||
|
||||
#
|
||||
# Copy from rules.make because I don't know how to unset MCS_FLAGS
|
||||
#
|
||||
USE_MCS_FLAGS = /codepage:$(CODEPAGE) /nologo /noconfig /deterministic $(LOCAL_MCS_FLAGS) $(PLATFORM_MCS_FLAGS) $(PROFILE_MCS_FLAGS) $(MCS_FLAGS)
|
||||
|
||||
.PHONY: profile-check do-profile-check
|
||||
profile-check:
|
||||
@:
|
||||
|
||||
ifeq (.,$(thisdir))
|
||||
all-recursive: do-profile-check
|
||||
all-local: post-profile-cleanup
|
||||
clean-local: clean-profile
|
||||
endif
|
||||
|
||||
clean-profile:
|
||||
-rm -f $(PROFILE_EXE) $(PROFILE_OUT) $(monolite_flag)
|
||||
|
||||
post-profile-cleanup:
|
||||
@rm -f $(monolite_flag)
|
||||
|
||||
PROFILE_EXE = $(depsdir)/basic-profile-check.exe
|
||||
PROFILE_OUT = $(PROFILE_EXE:.exe=.out)
|
||||
|
||||
MAKE_Q=$(if $(V),,-s)
|
||||
|
||||
do-profile-check: $(depsdir)/.stamp
|
||||
@ok=:; \
|
||||
rm -f $(PROFILE_EXE) $(PROFILE_OUT); \
|
||||
if [ -z '$(MAKE_Q)' ] && [ -n '$(PROFILE_RUNTIME)' ]; then $(PROFILE_RUNTIME) --version; fi; \
|
||||
$(MAKE) $(MAKE_Q) $(PROFILE_OUT) || ok=false; \
|
||||
if $$ok; then rm -f $(PROFILE_EXE) $(PROFILE_OUT); else \
|
||||
if test ! -s $(MONOLITE_MSCORLIB); then \
|
||||
$(MAKE) $(MAKE_Q) do-get-monolite ; \
|
||||
fi; \
|
||||
if test -f $(MONOLITE_MSCORLIB); then \
|
||||
$(MAKE) $(MAKE_Q) do-profile-check-monolite ; \
|
||||
else \
|
||||
echo "*** The runtime '$(PROFILE_RUNTIME)' doesn't appear to be usable." 1>&2; \
|
||||
echo "*** Check README for information on how to bootstrap a Mono installation." 1>&2 ; \
|
||||
exit 1; fi; fi
|
||||
|
||||
|
||||
ifdef use_monolite
|
||||
|
||||
do-get-monolite:
|
||||
|
||||
do-profile-check-monolite:
|
||||
@echo "*** The contents of your 'monolite-$(BUILD_PLATFORM)/$(MONO_CORLIB_VERSION)' directory may be out-of-date" 1>&2
|
||||
@echo "*** You may want to try 'make get-monolite-latest'" 1>&2
|
||||
rm -f $(monolite_flag)
|
||||
exit 1
|
||||
|
||||
else
|
||||
|
||||
do-get-monolite:
|
||||
@echo "*** Downloading bootstrap required 'monolite-$(BUILD_PLATFORM)/$(MONO_CORLIB_VERSION)'" 1>&2
|
||||
$(MAKE) $(MAKE_Q) -C $(topdir)/class get-monolite-latest
|
||||
|
||||
do-profile-check-monolite: $(depsdir)/.stamp
|
||||
@echo "*** The runtime '$(PROFILE_RUNTIME)' doesn't appear to be usable." 1>&2
|
||||
@echo "*** Trying the 'monolite-$(BUILD_PLATFORM)/$(MONO_CORLIB_VERSION)' directory." 1>&2
|
||||
@echo dummy > $(monolite_flag)
|
||||
$(MAKE) do-profile-check
|
||||
|
||||
endif
|
||||
|
||||
$(PROFILE_EXE): $(topdir)/build/common/basic-profile-check.cs
|
||||
$(MAKE) $(MAKE_Q) -C $(topdir)/packages
|
||||
$(BOOTSTRAP_MCS) /warn:0 /noconfig /r:System.dll /r:mscorlib.dll /out:$@ $<
|
||||
|
||||
$(PROFILE_OUT): $(PROFILE_EXE)
|
||||
$(PROFILE_RUNTIME) $< > $@ 2>&1
|
||||
+12
-115
@@ -1,129 +1,26 @@
|
||||
# -*- makefile -*-
|
||||
|
||||
monolite_path := $(topdir)/class/lib/monolite-$(BUILD_PLATFORM)/$(MONO_CORLIB_VERSION)
|
||||
|
||||
with_mono_path_monolite = MONO_PATH="$(monolite_path)$(PLATFORM_PATH_SEPARATOR)$(monolite_path)/Facades$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH"
|
||||
|
||||
monolite_flag := $(depsdir)/use-monolite
|
||||
use_monolite := $(wildcard $(monolite_flag))
|
||||
|
||||
MONOLITE_MSCORLIB = $(monolite_path)/mscorlib.dll
|
||||
|
||||
ifdef use_monolite
|
||||
ifdef MCS_MODE
|
||||
CSC_LOCATION = $(monolite_path)/mcs.exe
|
||||
endif
|
||||
|
||||
PROFILE_RUNTIME = $(with_mono_path_monolite) $(RUNTIME)
|
||||
BOOTSTRAP_MCS = $(PROFILE_RUNTIME) $(RUNTIME_FLAGS) $(CSC_LOCATION)
|
||||
|
||||
else
|
||||
PROFILE_RUNTIME = $(EXTERNAL_RUNTIME)
|
||||
ifdef MCS_MODE
|
||||
BOOTSTRAP_MCS = mcs
|
||||
else
|
||||
BOOTSTRAP_MCS = $(PROFILE_RUNTIME) $(RUNTIME_FLAGS) $(CSC_LOCATION)
|
||||
endif
|
||||
endif
|
||||
|
||||
#
|
||||
# Special setup for boostrap tools which we want to run with system/monolite core libraries
|
||||
# for all libraries build as part of this profile
|
||||
#
|
||||
ILASM = $(PROFILE_RUNTIME) $(RUNTIME_FLAGS) $(topdir)/class/lib/$(BUILD_TOOLS_PROFILE)/tmp/ilasm.exe
|
||||
STRING_REPLACER = $(PROFILE_RUNTIME) $(RUNTIME_FLAGS) $(topdir)/class/lib/$(BUILD_TOOLS_PROFILE)/tmp/cil-stringreplacer.exe
|
||||
GENSOURCES =$(PROFILE_RUNTIME) $(RUNTIME_FLAGS) $(topdir)/class/lib/$(BUILD_TOOLS_PROFILE)/tmp/gensources.exe
|
||||
BOOTSTRAP_PROFILE = basic
|
||||
BUILD_TOOLS_PROFILE = basic
|
||||
|
||||
BOOTSTRAP_MCS = MONO_PATH="$(topdir)/class/lib/$(BOOTSTRAP_PROFILE)$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH" $(INTERNAL_CSC)
|
||||
MCS = $(BOOTSTRAP_MCS)
|
||||
|
||||
PLATFORMS = macos linux win32 unix
|
||||
PLATFORMS = darwin linux win32
|
||||
|
||||
DEFAULT_REFERENCES = mscorlib
|
||||
# nuttzing!
|
||||
|
||||
PROFILE_MCS_FLAGS = -d:NET_4_0 -d:NET_4_5 -d:MONO -d:WIN_PLATFORM -d:BOOTSTRAP_BASIC -nowarn:1699 -nostdlib
|
||||
profile-check:
|
||||
@:
|
||||
|
||||
DEFAULT_REFERENCES = -r:$(topdir)/class/lib/$(PROFILE_DIRECTORY)/mscorlib.dll
|
||||
PROFILE_MCS_FLAGS = -d:NET_4_0 -d:NET_4_5 -d:MONO -d:WIN_PLATFORM -nowarn:1699 -nostdlib $(DEFAULT_REFERENCES)
|
||||
API_BIN_PROFILE = v4.7.1
|
||||
BOOTSTRAP_BIN_PROFILE = v4.7
|
||||
|
||||
NO_SIGN_ASSEMBLY = yes
|
||||
NO_TEST = yes
|
||||
NO_INSTALL = yes
|
||||
|
||||
FRAMEWORK_VERSION = 4.5
|
||||
MONO_FEATURE_APPLETLS=1
|
||||
|
||||
# Compiler all using same bootstrap compiler
|
||||
LIBRARY_COMPILE = $(BOOT_COMPILE)
|
||||
|
||||
# Verbose basic only
|
||||
# V = 1
|
||||
|
||||
#
|
||||
# Copy from rules.make because I don't know how to unset MCS_FLAGS
|
||||
#
|
||||
USE_MCS_FLAGS = /codepage:$(CODEPAGE) /nologo /noconfig /deterministic $(LOCAL_MCS_FLAGS) $(PLATFORM_MCS_FLAGS) $(PROFILE_MCS_FLAGS) $(MCS_FLAGS)
|
||||
|
||||
.PHONY: profile-check do-profile-check
|
||||
profile-check:
|
||||
@:
|
||||
|
||||
ifeq (.,$(thisdir))
|
||||
all-recursive: do-profile-check
|
||||
all-local: post-profile-cleanup
|
||||
clean-local: clean-profile
|
||||
endif
|
||||
|
||||
clean-profile:
|
||||
-rm -f $(PROFILE_EXE) $(PROFILE_OUT) $(monolite_flag)
|
||||
|
||||
post-profile-cleanup:
|
||||
@rm -f $(monolite_flag)
|
||||
|
||||
PROFILE_EXE = $(depsdir)/basic-profile-check.exe
|
||||
PROFILE_OUT = $(PROFILE_EXE:.exe=.out)
|
||||
|
||||
MAKE_Q=$(if $(V),,-s)
|
||||
|
||||
do-profile-check: $(depsdir)/.stamp
|
||||
@ok=:; \
|
||||
rm -f $(PROFILE_EXE) $(PROFILE_OUT); \
|
||||
if [ -z '$(MAKE_Q)' ] && [ -n '$(PROFILE_RUNTIME)' ]; then $(PROFILE_RUNTIME) --version; fi; \
|
||||
$(MAKE) $(MAKE_Q) $(PROFILE_OUT) || ok=false; \
|
||||
if $$ok; then rm -f $(PROFILE_EXE) $(PROFILE_OUT); else \
|
||||
if test ! -s $(MONOLITE_MSCORLIB); then \
|
||||
$(MAKE) $(MAKE_Q) do-get-monolite ; \
|
||||
fi; \
|
||||
if test -f $(MONOLITE_MSCORLIB); then \
|
||||
$(MAKE) $(MAKE_Q) do-profile-check-monolite ; \
|
||||
else \
|
||||
echo "*** The runtime '$(PROFILE_RUNTIME)' doesn't appear to be usable." 1>&2; \
|
||||
echo "*** Check README for information on how to bootstrap a Mono installation." 1>&2 ; \
|
||||
exit 1; fi; fi
|
||||
|
||||
|
||||
ifdef use_monolite
|
||||
|
||||
do-get-monolite:
|
||||
|
||||
do-profile-check-monolite:
|
||||
@echo "*** The contents of your 'monolite-$(BUILD_PLATFORM)/$(MONO_CORLIB_VERSION)' directory may be out-of-date" 1>&2
|
||||
@echo "*** You may want to try 'make get-monolite-latest'" 1>&2
|
||||
rm -f $(monolite_flag)
|
||||
exit 1
|
||||
|
||||
else
|
||||
|
||||
do-get-monolite:
|
||||
@echo "*** Downloading bootstrap required 'monolite-$(BUILD_PLATFORM)/$(MONO_CORLIB_VERSION)'" 1>&2
|
||||
$(MAKE) $(MAKE_Q) -C $(topdir)/class get-monolite-latest
|
||||
|
||||
do-profile-check-monolite: $(depsdir)/.stamp
|
||||
@echo "*** The runtime '$(PROFILE_RUNTIME)' doesn't appear to be usable." 1>&2
|
||||
@echo "*** Trying the 'monolite-$(BUILD_PLATFORM)/$(MONO_CORLIB_VERSION)' directory." 1>&2
|
||||
@echo dummy > $(monolite_flag)
|
||||
$(MAKE) do-profile-check
|
||||
|
||||
endif
|
||||
|
||||
$(PROFILE_EXE): $(topdir)/build/common/basic-profile-check.cs
|
||||
$(BOOTSTRAP_MCS) /warn:0 /noconfig /langversion:latest /r:System.dll /r:mscorlib.dll /out:$@ $<
|
||||
|
||||
$(PROFILE_OUT): $(PROFILE_EXE)
|
||||
$(PROFILE_RUNTIME) $< > $@ 2>&1
|
||||
@@ -8,7 +8,7 @@ MCS = $(BOOTSTRAP_MCS)
|
||||
profile-check:
|
||||
@:
|
||||
|
||||
DEFAULT_REFERENCES = mscorlib
|
||||
DEFAULT_REFERENCES = -r:$(topdir)/class/lib/$(PROFILE)/mscorlib.dll
|
||||
|
||||
PROFILE_MCS_FLAGS = \
|
||||
-d:NET_1_1 \
|
||||
@@ -24,6 +24,7 @@ PROFILE_MCS_FLAGS = \
|
||||
-d:ANDROID \
|
||||
-nowarn:1699 \
|
||||
-nostdlib \
|
||||
$(DEFAULT_REFERENCES) \
|
||||
$(PLATFORM_DEBUG_FLAGS)
|
||||
|
||||
API_BIN_PROFILE = build/monodroid
|
||||
|
||||
@@ -9,9 +9,9 @@ profile-check:
|
||||
@:
|
||||
|
||||
TARGET_NET_REFERENCE = v4.6
|
||||
DEFAULT_REFERENCES = mscorlib
|
||||
DEFAULT_REFERENCES = -r:$(topdir)/../external/binary-reference-assemblies/$(TARGET_NET_REFERENCE)/mscorlib.dll
|
||||
|
||||
PROFILE_MCS_FLAGS = -d:NET_4_6 -d:MONO -d:WIN_PLATFORM -nowarn:1699 -nostdlib $(PLATFORM_DEBUG_FLAGS)
|
||||
PROFILE_MCS_FLAGS = -d:NET_4_6 -d:MONO -d:WIN_PLATFORM -nowarn:1699 -nostdlib $(DEFAULT_REFERENCES) $(PLATFORM_DEBUG_FLAGS)
|
||||
|
||||
FRAMEWORK_VERSION = 4.5
|
||||
|
||||
|
||||
@@ -2,5 +2,3 @@ include $(topdir)/build/profiles/monotouch_runtime.make
|
||||
|
||||
PROFILE_MCS_FLAGS += \
|
||||
-d:FULL_AOT_RUNTIME
|
||||
|
||||
NO_SRE=1
|
||||
@@ -8,7 +8,7 @@ MCS = $(BOOTSTRAP_MCS)
|
||||
profile-check:
|
||||
@:
|
||||
|
||||
DEFAULT_REFERENCES = mscorlib
|
||||
DEFAULT_REFERENCES = -r:$(topdir)/class/lib/$(PROFILE)/mscorlib.dll
|
||||
PROFILE_MCS_FLAGS = \
|
||||
-d:NET_1_1 \
|
||||
-d:NET_2_0 \
|
||||
@@ -24,6 +24,7 @@ PROFILE_MCS_FLAGS = \
|
||||
-d:FEATURE_INTERCEPTABLE_THREADPOOL_CALLBACK \
|
||||
-nowarn:1699 \
|
||||
-nostdlib \
|
||||
$(DEFAULT_REFERENCES) \
|
||||
$(PLATFORM_DEBUG_FLAGS) \
|
||||
$(MONOTOUCH_MCS_FLAGS)
|
||||
|
||||
@@ -39,4 +40,3 @@ NO_CONSOLE = yes
|
||||
PROFILE_DISABLE_BTLS=1
|
||||
MONO_FEATURE_APPLETLS=1
|
||||
ONLY_APPLETLS=1
|
||||
ENABLE_GSS=1
|
||||
@@ -1,18 +0,0 @@
|
||||
# -*- makefile -*-
|
||||
|
||||
BOOTSTRAP_PROFILE = build
|
||||
|
||||
BOOTSTRAP_MCS = MONO_PATH="$(topdir)/class/lib/$(BOOTSTRAP_PROFILE)$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH" $(INTERNAL_CSC)
|
||||
MCS = $(BOOTSTRAP_MCS)
|
||||
|
||||
profile-check:
|
||||
@:
|
||||
|
||||
TARGET_NET_REFERENCE = v4.6
|
||||
DEFAULT_REFERENCES = mscorlib
|
||||
|
||||
PROFILE_MCS_FLAGS = -d:NET_4_6 -d:MONO -d:WIN_PLATFORM -nowarn:1699 -nostdlib $(PLATFORM_DEBUG_FLAGS)
|
||||
|
||||
FRAMEWORK_VERSION = 4.5
|
||||
|
||||
NO_INSTALL = yes
|
||||
@@ -7,5 +7,3 @@ NO_THREAD_ABORT=1
|
||||
NO_THREAD_SUSPEND_RESUME=1
|
||||
NO_MULTIPLE_APPDOMAINS=1
|
||||
NO_PROCESS_START=1
|
||||
NO_VTS_TEST=1
|
||||
NO_GSS=1
|
||||
@@ -8,5 +8,3 @@ NO_THREAD_SUSPEND_RESUME=1
|
||||
# The binding generator (btv) still needs to execute processes,
|
||||
# so we need a System.dll that can do that.
|
||||
#NO_PROCESS_START=1
|
||||
|
||||
NO_GSS=1
|
||||
@@ -9,8 +9,6 @@ NO_THREAD_SUSPEND_RESUME=1
|
||||
NO_MULTIPLE_APPDOMAINS=1
|
||||
NO_PROCESS_START=1
|
||||
NO_MONO_SECURITY=1
|
||||
NO_GSS=1
|
||||
MONO_FEATURE_APPLETLS=
|
||||
ONLY_APPLETLS=
|
||||
MONO_FEATURE_APPLE_X509=1
|
||||
NO_VTS_TEST=1
|
||||
@@ -6,7 +6,6 @@ PROFILE_MCS_FLAGS += \
|
||||
|
||||
NO_THREAD_ABORT=1
|
||||
NO_THREAD_SUSPEND_RESUME=1
|
||||
NO_GSS=1
|
||||
# The binding generator (bwatch) still needs to execute processes,
|
||||
# so we need a System.dll that can do that.
|
||||
#NO_PROCESS_START=1
|
||||
|
||||
@@ -5,23 +5,19 @@ BOOTSTRAP_PROFILE = build
|
||||
BOOTSTRAP_MCS = MONO_PATH="$(topdir)/class/lib/$(BOOTSTRAP_PROFILE)$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH" $(INTERNAL_CSC)
|
||||
MCS = $(BOOTSTRAP_MCS)
|
||||
|
||||
PLATFORMS = macos linux win32 unix
|
||||
PLATFORMS = darwin linux win32
|
||||
|
||||
# nuttzing!
|
||||
|
||||
profile-check:
|
||||
@:
|
||||
|
||||
DEFAULT_REFERENCES = mscorlib
|
||||
PROFILE_MCS_FLAGS = -d:NET_4_0 -d:NET_4_5 -d:NET_4_6 -d:MONO -d:WIN_PLATFORM -nowarn:1699 -nostdlib $(PLATFORM_DEBUG_FLAGS)
|
||||
DEFAULT_REFERENCES = -r:$(topdir)/class/lib/$(PROFILE_DIRECTORY)/mscorlib.dll
|
||||
PROFILE_MCS_FLAGS = -d:NET_4_0 -d:NET_4_5 -d:NET_4_6 -d:MONO -d:WIN_PLATFORM -d:MULTIPLEX_OS -nowarn:1699 -nostdlib $(DEFAULT_REFERENCES) $(PLATFORM_DEBUG_FLAGS)
|
||||
API_BIN_PROFILE = v4.7.1
|
||||
|
||||
FRAMEWORK_VERSION = 4.5
|
||||
XBUILD_VERSION = 4.0
|
||||
MONO_FEATURE_APPLETLS=1
|
||||
|
||||
ENFORCE_LIBRARY_WARN_AS_ERROR = yes
|
||||
|
||||
ifdef PLATFORM_MACOS
|
||||
MONO_FEATURE_APPLETLS=1
|
||||
ENABLE_GSS=1
|
||||
endif
|
||||
Loaded 100 of 4248 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user