From: Simon Richter Date: Tue, 2 Apr 2013 13:01:52 +0000 (+0200) Subject: Use "clang" command from PATH X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0546d2e673712282a08874a09f6d825f327f6396;p=contrib%2Fbeignet.git Use "clang" command from PATH This assumes that LLVM is installed in the system path, but avoids compiling the path of binaries into the library. Reviewed-by: Zhigang Gong --- diff --git a/backend/src/backend/program.cpp b/backend/src/backend/program.cpp index df0df28..d33c533 100644 --- a/backend/src/backend/program.cpp +++ b/backend/src/backend/program.cpp @@ -119,9 +119,9 @@ namespace gbe { // Now compile the code to llvm using clang #if LLVM_VERSION_MINOR <= 1 - std::string compileCmd = LLVM_PREFIX "/bin/clang -x cl -fno-color-diagnostics -emit-llvm -O3 -ccc-host-triple ptx32 -c "; + std::string compileCmd = "clang -x cl -fno-color-diagnostics -emit-llvm -O3 -ccc-host-triple ptx32 -c "; #else - std::string compileCmd = LLVM_PREFIX "/bin/clang -ffp-contract=off -emit-llvm -O3 -target nvptx -x cl -c "; + std::string compileCmd = "clang -ffp-contract=off -emit-llvm -O3 -target nvptx -x cl -c "; #endif /* LLVM_VERSION_MINOR <= 1 */ compileCmd += clName; compileCmd += " ";