From 0810704c3d16fd9d4e53c432f0b61b4450b43dbe Mon Sep 17 00:00:00 2001 From: Cristiano Giuffrida Date: Sun, 22 Jun 2014 11:09:51 +0200 Subject: [PATCH] llvm: Preserve default OPTFLAGS when adding instrumentation. --- minix/llvm/build.llvm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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"` -- 2.44.0