[PATCH] D133358: [compiler-rt] [test] Handle missing ld.gold gracefully
Michał Górny via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Sep 6 22:15:08 PDT 2022
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rGea953b9d9a65: [compiler-rt] [test] Handle missing ld.gold gracefully (authored by mgorny).
Herald added a project: Sanitizers.
Herald added a subscriber: Sanitizers.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D133358/new/
https://reviews.llvm.org/D133358
Files:
compiler-rt/test/lit.common.cfg.py
Index: compiler-rt/test/lit.common.cfg.py
===================================================================
--- compiler-rt/test/lit.common.cfg.py
+++ compiler-rt/test/lit.common.cfg.py
@@ -538,9 +538,12 @@
# We require both ld.bfd and ld.gold exist and support plugins. They are in
# the same repository 'binutils-gdb' and usually built together.
for exe in (config.gnu_ld_executable, config.gold_executable):
- ld_cmd = subprocess.Popen([exe, '--help'], stdout=subprocess.PIPE, env={'LANG': 'C'})
- ld_out = ld_cmd.stdout.read().decode()
- ld_cmd.wait()
+ try:
+ ld_cmd = subprocess.Popen([exe, '--help'], stdout=subprocess.PIPE, env={'LANG': 'C'})
+ ld_out = ld_cmd.stdout.read().decode()
+ ld_cmd.wait()
+ except OSError:
+ return False
if not '-plugin' in ld_out:
return False
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D133358.458359.patch
Type: text/x-patch
Size: 842 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20220907/8ba70354/attachment.bin>
More information about the cfe-commits
mailing list