[Beignet] [PATCH 8/8] Use "clang" command from PATH

Zhigang Gong zhigang.gong at linux.intel.com
Wed Apr 17 00:51:59 PDT 2013


From: Simon Richter <Simon.Richter at hogyros.de>

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 at linux.intel.com>
---
 backend/src/backend/program.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

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 += " ";
-- 
1.7.11.7



More information about the Beignet mailing list