3 # Stop script if unbound variable found (use ${var:-} if intentional)
6 # Stop script if command returns non-zero exit code.
7 # Prevents hidden errors caused by missing error code propagation.
12 echo "Common settings:"
13 echo " --configuration <value> Build configuration: 'Debug' or 'Release' (short: -c)"
14 echo " --help Print help and exit (short: -h)"
18 echo " --clean Clean up the clean targets"
19 echo " --cxx Enable CXX"
20 echo " --reconfigure Force provision and configure"
21 echo " --test Run all tests (short: -t)"
22 echo " --thread Enable WASM threads"
23 echo " --win Enable Windows cross build"
26 echo "Command line arguments starting with '/p:' are passed through to MSBuild."
27 echo "Arguments can also be passed in with a single hyphen."
32 configuration
='Release'
33 force_reconfigure
=false
38 while [[ $# > 0 ]]; do
39 opt
="$(echo "${1/#--/-}" | awk '{print tolower($0)}')"
56 force_reconfigure
=true
68 echo "Invalid argument: $1"
77 CPU_COUNT
=$
(getconf _NPROCESSORS_ONLN ||
echo 4)
80 if [ "$cleanall" = "true" ]; then
85 # provision and configuration
86 if [[ "$force_reconfigure" == "true" ||
! -f .configured
]]; then
87 # re-create Make.config
88 echo "ENABLE_WASM=1" > ..
/Make.config
90 if [ "$win" == "true" ]; then
91 echo "ENABLE_WINDOWS=1" >> ..
/Make.config
94 if [ "$cxx" == "true" ]; then
95 echo "ENABLE_CXX=1" >> ..
/Make.config
98 if [ "$thread" == "true" ]; then
99 echo "ENABLE_WASM_THREADS=1" >> ..
/Make.config
102 if [[ "$configuration" == "Debug" ]]; then
103 echo "CONFIGURATION=debug" >> ..
/Make.config
106 make -C ..
/builds provision-wasm
107 make -j ${CPU_COUNT} -C ..
/builds configure-wasm NINJA
=
111 make -j ${CPU_COUNT} -C ..
/builds archive-wasm NINJA
=
112 make -C ..
/wasm runtime
115 if [ "$test" = "true" ]; then
116 export aot_test_suites
="System.Core"
117 export mixed_test_suites
="System.Core"
118 export xunit_test_suites
="System.Core corlib"
120 make -j ${CPU_COUNT} build
123 #The following tests are not passing yet, so enabling them would make us perma-red
125 make run-all-System.Core
126 for suite
in ${xunit_test_suites}; do make run-
${suite}-xunit; done
127 # disable for now until https://github.com/mono/mono/pull/13622 goes in
128 #make run-debugger-tests
129 make run-browser-tests
130 #make run-browser-threads-tests
131 make -j ${CPU_COUNT} run-aot-mini
132 make -j ${CPU_COUNT} build-aot-all
133 for suite
in ${aot_test_suites}; do make run-aot-
${suite}; done
134 for suite
in ${mixed_test_suites}; do make run-aot-mixed-
${suite}; done