[PATCH] D49709: [CUDA, test-suite] Install clang we've just built.
Artem Belevich via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 23 17:18:21 PDT 2018
tra created this revision.
tra added reviewers: gkistanova, jlebar.
Herald added subscribers: bixia, sanjoy.
Installation is needed for clang to properly find libc++.
Due to the way CUDA headers are handled it's currently impossible to
add libc++ headers to include path without breaking CUDA compilation.
The only way to make it work is to rely on clang picking libc++
installed along with it.
https://reviews.llvm.org/D49709
Files:
zorg/buildbot/builders/CUDATestsuiteBuilder.py
Index: zorg/buildbot/builders/CUDATestsuiteBuilder.py
===================================================================
--- zorg/buildbot/builders/CUDATestsuiteBuilder.py
+++ zorg/buildbot/builders/CUDATestsuiteBuilder.py
@@ -49,6 +49,7 @@
source_dir = 'llvm' # Should match the one used in getClangCMakeBuildFactory.
stage1_build_dir = 'stage1' # Should match the one defined in getClangCMakeBuildFactory.
stage2_build_dir = 'stage2' # Should match the one defined in getClangCMakeBuildFactory.
+ install_dir = 'clang.install'
if useTwoStage:
clang_build_dir = stage2_build_dir
@@ -75,12 +76,28 @@
cuda_test_env = {
'PYTHONPATH': WithProperties("%(workdir)s/" + source_dir +
"/utils/lit:${PYTHONPATH}"),
- 'PATH': WithProperties("%(workdir)s/" + clang_build_dir +
- "/bin:${PATH}"),
+ 'DESTDIR': WithProperties("%(workdir)s/" + install_dir),
+ 'PATH': WithProperties("%(workdir)s/" + install_dir +
+ "/usr/local/bin:${PATH}"),
}
merged_env.update(cuda_test_env)
ts_build_dir = 'test-suite-build'
+ f.addStep(
+ RemoveDirectory(name="Remove old clang install directory",
+ dir=install_dir))
+
+ # Install clang into directory pointed by $DESTDIR
+ f.addStep(NinjaCommand(
+ name='ninja install clang',
+ targets=["install"],
+ jobs=jobs,
+ haltOnFailure=True,
+ description=split("installing clang"),
+ descriptionDone=split("Clang installation is done."),
+ workdir=clang_build_dir,
+ env=merged_env))
+
# Completely remove test suite build dir.
f.addStep(
RemoveDirectory(name="Remove old test-suite build directory",
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D49709.156934.patch
Type: text/x-patch
Size: 1824 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180724/b8fff17c/attachment.bin>
More information about the llvm-commits
mailing list