[PATCH] D96510: [cross-project-tests] Add lld as a dependency and feature, if in LLVM_ENABLE_PROJECTS - part 3
James Henderson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Mar 5 06:09:53 PST 2021
jhenderson updated this revision to Diff 328497.
jhenderson added a comment.
Rebase and ping!
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D96510/new/
https://reviews.llvm.org/D96510
Files:
cross-project-tests/CMakeLists.txt
cross-project-tests/lit.cfg.py
cross-project-tests/lit.site.cfg.py.in
Index: cross-project-tests/lit.site.cfg.py.in
===================================================================
--- cross-project-tests/lit.site.cfg.py.in
+++ cross-project-tests/lit.site.cfg.py.in
@@ -15,6 +15,7 @@
config.host_triple = "@LLVM_HOST_TRIPLE@"
config.target_triple = "@TARGET_TRIPLE@"
config.is_msvc = lit.util.pythonize_bool("@MSVC@")
+config.llvm_enabled_projects = "@LLVM_ENABLE_PROJECTS@".split(";")
config.mlir_src_root = "@MLIR_SOURCE_DIR@"
Index: cross-project-tests/lit.cfg.py
===================================================================
--- cross-project-tests/lit.cfg.py
+++ cross-project-tests/lit.cfg.py
@@ -67,11 +67,15 @@
tools.append(ToolSubst('%cdb', '"%s"' % os.path.join(win_sdk, 'Debuggers',
arch, 'cdb.exe')))
-# clang_src_dir is not used by these tests, but is required by
-# use_clang(), so set it to "".
+# clang_src_dir and lld_src_dir are not used by these tests, but are required by
+# use_clang() and use_lld() respectively, so set them to "", if needed.
if not hasattr(config, 'clang_src_dir'):
config.clang_src_dir = ""
llvm_config.use_clang()
+if 'lld' in config.llvm_enabled_projects:
+ if not hasattr(config, 'lld_src_dir'):
+ config.lld_src_dir = ""
+ llvm_config.use_lld()
if config.llvm_use_sanitizer:
# Propagate path to symbolizer for ASan/MSan.
Index: cross-project-tests/CMakeLists.txt
===================================================================
--- cross-project-tests/CMakeLists.txt
+++ cross-project-tests/CMakeLists.txt
@@ -52,7 +52,7 @@
endif()
# The Windows builder scripts pass -fuse-ld=lld.
-if (WIN32)
+if (WIN32 OR "lld" IN_LIST LLVM_ENABLE_PROJECTS)
list(APPEND CROSS_PROJECT_TEST_DEPS lld)
endif()
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D96510.328497.patch
Type: text/x-patch
Size: 1791 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210305/60b490ec/attachment.bin>
More information about the llvm-commits
mailing list