Skip to content

Commit 65e5391

Browse files
authored
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
1 parent b329da8 commit 65e5391

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

compiler-rt/test/fuzzer/lit.cfg.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,11 @@ def generate_compiler_cmd(is_cpp=True, fuzzer_enabled=True, msan_enabled=False):
9898
if "windows" in config.available_features:
9999
extra_cmd = extra_cmd + " -D_DISABLE_VECTOR_ANNOTATION -D_DISABLE_STRING_ANNOTATION"
100100

101+
if "darwin" in config.available_features and getattr(
102+
config, "darwin_linker_version", None
103+
):
104+
extra_cmd = extra_cmd + " -mlinker-version=" + config.darwin_linker_version
105+
101106
return " ".join(
102107
[
103108
compiler_cmd,

0 commit comments

Comments
 (0)