[llvm] Propogate --enable-llvm-asserts to llvm/build.mk (mono/mono#17149)
authorEgor Bogatov <egorbo@gmail.com>
Fri, 4 Oct 2019 15:27:01 +0000 (18:27 +0300)
committerLarry Ewing <lewing@microsoft.com>
Fri, 4 Oct 2019 15:27:01 +0000 (10:27 -0500)
* fix Enable llvm asserts

* fix chmod

Commit migrated from https://github.com/mono/mono/commit/26754eecff93d568f4531e31c7c1bce3202645b1

src/mono/netcore/build.sh

index cd9fa81..5e83023 100755 (executable)
@@ -34,6 +34,7 @@ force_rebuild=false
 test=false
 skipmscorlib=false
 skipnative=false
+llvm=false
 autogen_params=''
 
 while [[ $# > 0 ]]; do
@@ -64,7 +65,7 @@ while [[ $# > 0 ]]; do
       skipnative=true
       ;;
     -llvm)
-      autogen_params="$autogen_params --enable-llvm"
+      llvm=true
       ;;
     -p:*|/p:*)
       properties="$properties $1"
@@ -98,6 +99,11 @@ elif [[ "$configuration" == "Release" ]]; then
   EXTRA_CXXFLAGS="-O2 -g"
 fi
 
+if [ "$llvm" = "true" ]; then
+  git submodule update --init -- ../external/llvm
+  autogen_params="$autogen_params --enable-llvm"
+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")