[PATCH] D91112: [compiler-rt][tests] Fix plugin support detection when no ld.gold
David Tenty via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Nov 11 20:35:35 PST 2020
daltenty added inline comments.
================
Comment at: compiler-rt/test/lit.common.cfg.py:413
for exe in (config.gnu_ld_executable, config.gold_executable):
- ld_cmd = subprocess.Popen([exe, '--help'], stdout=subprocess.PIPE, env={'LANG': 'C'})
+ try:
+ ld_cmd = subprocess.Popen([exe, '--help'], stdout=subprocess.PIPE, env={'LANG': 'C'})
----------------
Hmm, it would be nice if we avoided making the subprocess call in the first place if CMake found no gold executable. This also doesn't look like the only place to make this mistake either, some other places in the lit config (e.g. `is_gold_linker_available()` ) seem to be treating it as equal false if it is unset, but that's clearly not what will happen from what we see here.
Perhaps we should consider checking the validity of the value passed through from CMake in the `.cfg.in` and convert the `-NOTFOUND`s to `None`s?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D91112/new/
https://reviews.llvm.org/D91112
More information about the llvm-commits
mailing list