]> Zhao Yanbai Git Server - minix.git/commitdiff
build.llvm fix to allow pass arguments 93/2793/2
authorErik van der Kouwe <erik@minix3.org>
Wed, 6 Aug 2014 13:18:41 +0000 (15:18 +0200)
committerGerrit Code Review <gerrit@localhost>
Fri, 29 Aug 2014 16:56:23 +0000 (12:56 -0400)
This allows pass arguments to be specified (written by Cristiano)

minix/llvm/build.llvm

index 641af4dfe5601c72f87f151fc73e6cf3a43f0c05..202b59abcb2232acbed44c5e8e840d94d888715c 100755 (executable)
@@ -76,11 +76,12 @@ function check_args()
                elif [ -f "${MINIX_LLVM_BIN_DIR}/${llvmpass}.so" ]; then
                        llvmpass_path="${MINIX_LLVM_BIN_DIR}/${llvmpass}.so"
                else
-                       echo "The LLVM pass file ${llvmpass}.so doesn't exist."
-                       exit_flag=1
+                       llvmpass_path=""
                fi
-               LLVMPASS_PATHS+=" -load=${llvmpass_path} -${llvmpass}"
-               LLVMPASS+=" ${llvmpass}"
+               if [ "$llvmpass_path" != "" ]; then
+                       LLVMPASS_PATHS+=" -load=${llvmpass_path}"
+               fi
+               LLVMPASS_PATHS+=" -${llvmpass}"
        done
 
        if [ ${exit_flag} == 1 ]; then