From: Cristiano Giuffrida Date: Sun, 22 Jun 2014 09:09:51 +0000 (+0200) Subject: llvm: Preserve default OPTFLAGS when adding instrumentation. X-Git-Tag: v3.3.0~143 X-Git-Url: http://zhaoyanbai.com/repos/%22http:/www.isc.org/icons/Bv9ARM.ch02.html?a=commitdiff_plain;h=0810704c3d16fd9d4e53c432f0b61b4450b43dbe;p=minix.git llvm: Preserve default OPTFLAGS when adding instrumentation. --- diff --git a/minix/llvm/build.llvm b/minix/llvm/build.llvm index 2dd0f0568..142f47084 100755 --- a/minix/llvm/build.llvm +++ b/minix/llvm/build.llvm @@ -16,7 +16,6 @@ MINIX_LLVM_DIR= LLVMPASS= LLVMARGS= LLVMPASS_PATHS= -OPTFLAGS=" " TARGET_MODULES= MINIX_MODS= @@ -113,9 +112,11 @@ if [ "${GENERATE_MAP}" != "" ] && [[ ${GENERATE_MAP} =~ [yY][eE][sS] ]]; then generate_modules_map fi +: ${OPTFLAGS="-disable-opt -disable-internalize -disable-inlining -load ${MINIX_LLVM_DIR}/bin/weak-alias-module-override.so -weak-alias-module-override"} + # If we are really instrumenting with some pass... if [ "${LLVMPASS_PATHS}" != "" ]; then - OPTFLAGS=" -disable-opt ${LLVMPASS_PATHS} ${LLVMARGS}" + OPTFLAGS=" ${OPTFLAGS} ${LLVMPASS_PATHS} ${LLVMARGS}" fi TARGET_MODULES=`echo $C | sed -e "s/,/ /g"`