[PATCH] D30467: Use relative path to clang-cl

Zachary Turner via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 1 09:02:17 PST 2017


zturner updated this revision to Diff 90192.
zturner added a comment.

Previous method didn't work, but in the step right before the failing step we are already adding the `bin` directory to the system's `PATH`.  So just specify `clang-cl.exe` with no path at all, and CMake should be able to find it.


https://reviews.llvm.org/D30467

Files:
  zorg/buildbot/builders/SanitizerBuilderWindows.py


Index: zorg/buildbot/builders/SanitizerBuilderWindows.py
===================================================================
--- zorg/buildbot/builders/SanitizerBuilderWindows.py
+++ zorg/buildbot/builders/SanitizerBuilderWindows.py
@@ -141,14 +141,14 @@
                           extract_fn=extractSlaveEnvironment,
                           env=Property('slave_env')))
 
-    # Get absolute path to clang-cl.
-    clang_cl = "%(workdir)s/" + build_dir + "/bin/clang-cl"
+    # clang-cl.exe should already be on the path (because of the previous step)
+    # so we don't need to specify its path, cmake should be able to find it.
     f.addStep(ShellCommand(name='cmake',
                            command=[cmake, "-G", "Ninja", "../llvm",
                                "-DCMAKE_BUILD_TYPE="+config,
                                "-DLLVM_ENABLE_ASSERTIONS=ON",
-                               WithProperties("-DCMAKE_C_COMPILER="+clang_cl),
-                               WithProperties("-DCMAKE_CXX_COMPILER="+clang_cl),
+                               "-DCMAKE_C_COMPILER=clang-cl.exe",
+                               "-DCMAKE_CXX_COMPILER=clang-cl.exe",
                                "-DLLVM_USE_SANITIZER=Address",
                                "-DLLVM_USE_SANITIZE_COVERAGE=YES"]
                                + extra_cmake_args,


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D30467.90192.patch
Type: text/x-patch
Size: 1352 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170301/a64b152b/attachment.bin>


More information about the llvm-commits mailing list