diff options
author | Fabian Meumertzheim <meumertzheim@code-intelligence.com> | 2021-08-10 21:08:44 +0200 |
---|---|---|
committer | Fabian Meumertzheim <fabian@meumertzhe.im> | 2021-08-11 19:10:05 +0200 |
commit | 016c0adda7cb1a1ab7850abdd9229037d9097bda (patch) | |
tree | bb3a954e70d3a317102daafca3be8ee8a3cd4fc1 /driver | |
parent | 62c8e674a61cfefb13dd6cddaaa80bddfe64e9fc (diff) | |
download | jazzer-api-016c0adda7cb1a1ab7850abdd9229037d9097bda.tar.gz |
Use lld on Linux
Since we require building with a relatively modern clang, we might as
well use its linker (and in the future, its C++ standard library).
Diffstat (limited to 'driver')
-rw-r--r-- | driver/BUILD.bazel | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/driver/BUILD.bazel b/driver/BUILD.bazel index 8a0762ea..8e095559 100644 --- a/driver/BUILD.bazel +++ b/driver/BUILD.bazel @@ -79,7 +79,10 @@ cc_binary( ], linkopts = [ "-rdynamic", - ], + ] + select({ + "@platforms//os:linux": ["-fuse-ld=lld"], + "//conditions:default": [], + }), visibility = ["//visibility:public"], deps = [":driver_lib"], ) @@ -103,7 +106,10 @@ cc_binary( "-fsanitize=address", "-static-libsan", "-rdynamic", - ], + ] + select({ + "@platforms//os:linux": ["-fuse-ld=lld"], + "//conditions:default": [], + }), visibility = ["//visibility:public"], deps = [":driver_lib"] + select({ # There is no static ASan runtime on macOS, so link to the dynamic @@ -123,7 +129,10 @@ cc_binary( # Link UBSan statically, even on macOS. "-static-libsan", "-rdynamic", - ], + ] + select({ + "@platforms//os:linux": ["-fuse-ld=lld"], + "//conditions:default": [], + }), visibility = ["//visibility:public"], deps = [":driver_lib"], ) |