Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAleksey Kliger (λgeek) <alklig@microsoft.com>2020-01-13 23:15:09 +0300
committerAlexander Köplinger <alex.koeplinger@outlook.com>2020-01-13 23:15:09 +0300
commit6abab691ec71c3cb4f72dd6d8f630088c8330357 (patch)
treee005473fb8390a9a52fe798a2c7ddd740d562e99 /netcore
parenta5cc4cd9ec6a595231c7aeb84a8166c736b867e3 (diff)
[netcore] Require use of MonoClass getters in Debug builds (#18267)
1. Update `build.sh` to use `--enable-checked-build=private_types` which forces the use of getter methods to access `MonoClass` fields. 2. Fix up some places that were accessing MonoClass directly. 3. Get rid of a spurious comma operator usage from an earlier refactoring: ```c z = a, b, c; ``` is the same as ```c z = a; b; c; ``` which is the same as just `z = a;` if `b` and `c` have no side-effects.
Diffstat (limited to 'netcore')
-rwxr-xr-xnetcore/build.sh4
1 files changed, 4 insertions, 0 deletions
diff --git a/netcore/build.sh b/netcore/build.sh
index 53eb9d9ba69..a57401e8195 100755
--- a/netcore/build.sh
+++ b/netcore/build.sh
@@ -123,6 +123,10 @@ if [ "$llvm" = "true" ]; then
autogen_params="$autogen_params --enable-llvm"
fi
+if [[ "$configuration" == "Debug" ]]; then
+ autogen_params="$autogen_params --enable-checked-build=private_types"
+fi
+
# run .././autogen.sh only once or if "--rebuild" argument is provided
if [[ "$force_rebuild" == "true" || ! -f .configured ]]; then
(cd .. && ./autogen.sh --with-core=only $autogen_params CFLAGS="$EXTRA_CFLAGS" CXXFLAGS="$EXTRA_CXXFLAGS") || (Write-PipelineTelemetryError -c "configure" -e 1 "Error running autogen" && exit 1)