aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUsama Hameed <u_hameed@apple.com>2024-04-05 14:48:16 -0700
committerGitHub <noreply@github.com>2024-04-05 14:48:16 -0700
commit65e5391657147d1bda3a4d9b26c9b3db0ca54fd7 (patch)
treedbd0e2aaece49225c6668b67f3f8c02472b73a9d
parentb329da896c4959f6c56cf5e515d3412322f4b3c5 (diff)
downloadllvm-65e5391657147d1bda3a4d9b26c9b3db0ca54fd7.tar.gz
llvm-65e5391657147d1bda3a4d9b26c9b3db0ca54fd7.tar.bz2
llvm-65e5391657147d1bda3a4d9b26c9b3db0ca54fd7.zip
Pass the linker version to libfuzzer tests on darwin (#87719)
The HOST_LINK_VERSION is a hardcoded string in Darwin clang that detects the linker version at configure time. The driver uses this information to build the correct set of arguments for the linker. This patch detects the linker version again during compiler-rt configuration and passes it to the libfuzzer tests. This allows a clang built on a machine with a new linker to run compiler-rt tests on a machine with an old linker. rdar://125932376
-rw-r--r--compiler-rt/test/fuzzer/lit.cfg.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/compiler-rt/test/fuzzer/lit.cfg.py b/compiler-rt/test/fuzzer/lit.cfg.py
index 4e203236b167..9084254b3b15 100644
--- a/compiler-rt/test/fuzzer/lit.cfg.py
+++ b/compiler-rt/test/fuzzer/lit.cfg.py
@@ -98,6 +98,11 @@ def generate_compiler_cmd(is_cpp=True, fuzzer_enabled=True, msan_enabled=False):
if "windows" in config.available_features:
extra_cmd = extra_cmd + " -D_DISABLE_VECTOR_ANNOTATION -D_DISABLE_STRING_ANNOTATION"
+ if "darwin" in config.available_features and getattr(
+ config, "darwin_linker_version", None
+ ):
+ extra_cmd = extra_cmd + " -mlinker-version=" + config.darwin_linker_version
+
return " ".join(
[
compiler_cmd,