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

Zachary Turner via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 28 12:50:15 PST 2017


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

Looks like `file(TO_CMAKE_PATH)` won't be an ideal solution then.

I inspected the buildbot code a little more closely and we pass `workdir=build_fuzzer_dir`, whereas the clang is in `build_dir`.  So I prepend a `..` so that the relative path is correct.


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,8 +141,11 @@
                           extract_fn=extractSlaveEnvironment,
                           env=Property('slave_env')))
 
-    # Get absolute path to clang-cl.
-    clang_cl = "%(workdir)s/" + build_dir + "/bin/clang-cl"
+    # Use relative path to clang-cl.  We would just be basing it off of
+    # %(workdir) anyway, but %(workdir) will confuse the setting of
+    # CMAKE_CXX_COMPILER and CMAKE_C_COMPILER.  Since we're already inside of
+    # %(workdir) (by definition), a relative path should be fine.
+    clang_cl = "../" + build_dir + "/bin/clang-cl"
     f.addStep(ShellCommand(name='cmake',
                            command=[cmake, "-G", "Ninja", "../llvm",
                                "-DCMAKE_BUILD_TYPE="+config,


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


More information about the llvm-commits mailing list