Use "clang" command from PATH
authorSimon Richter <Simon.Richter@hogyros.de>
Tue, 2 Apr 2013 13:01:52 +0000 (15:01 +0200)
committerZhigang Gong <zhigang.gong@linux.intel.com>
Thu, 18 Apr 2013 03:21:35 +0000 (11:21 +0800)
This assumes that LLVM is installed in the system path, but avoids
compiling the path of binaries into the library.

Reviewed-by: Zhigang Gong <zhigang.gong@linux.intel.com>
backend/src/backend/program.cpp

index df0df28..d33c533 100644 (file)
@@ -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 += " ";