[PATCH] D117446: [BOLT][CMAKE] Use BOLT_CLANG_EXE and BOLT_LLD_EXE as is

Amir Ayupov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Jan 16 18:10:23 PST 2022


Amir created this revision.
Amir added reviewers: smeenai, maksfb, rafauler.
Herald added a subscriber: ayermolo.
Amir requested review of this revision.
Herald added subscribers: llvm-commits, yota9.
Herald added a project: LLVM.

Add an ability to provide paths that don't match tool name exactly:
e.g. clang-13.
Remove use_lld call that sets up unused extra tools.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D117446

Files:
  bolt/test/lit.cfg.py


Index: bolt/test/lit.cfg.py
===================================================================
--- bolt/test/lit.cfg.py
+++ bolt/test/lit.cfg.py
@@ -55,8 +55,10 @@
 
 llvm_config.use_default_substitutions()
 
-llvm_config.use_clang(additional_tool_dirs=[os.path.dirname(config.bolt_clang)])
-llvm_config.use_lld(additional_tool_dirs=[os.path.dirname(config.bolt_lld)])
+llvm_config.config.environment['BOLT_CLANG_EXE'] = config.bolt_clang
+llvm_config.config.environment['BOLT_LLD_EXE'] = config.bolt_lld
+llvm_config.use_clang(search_env='BOLT_CLANG_EXE')
+llvm_config.use_llvm_tool('lld', required=True, search_env='BOLT_LLD_EXE')
 
 config.substitutions.append(('%cflags', '-no-pie'))
 config.substitutions.append(('%cxxflags', '-no-pie'))


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D117446.400414.patch
Type: text/x-patch
Size: 744 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220117/89c5bb65/attachment.bin>


More information about the llvm-commits mailing list