[PATCH] D110086: [gn build] Don't pass -Wl,-z,defs for sanitizer builds
Nico Weber via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 20 10:55:16 PDT 2021
thakis added inline comments.
================
Comment at: llvm/utils/gn/build/BUILD.gn:374
+config("zdefs") {
+ # -Wl,-z,defs doesn't work with sanitizers.
+ # https://clang.llvm.org/docs/AddressSanitizer.html
----------------
Only on Linux (or non-win non-mac non-ios i guess. Maybe non-android non-fuchsia too, not sure there without looking it up)
Also, do we need a separate config for this? Can we edit llvm/utils/gn/build/BUILD.gn around line 91 and put something like
```
if (current_os != "ios" && current_os != "mac" && !(current_os == "linux" && (use_asan || use_tsan || use_ubsan))) {
ldflags += [ "-Wl,-z,defs" ]
}
```
there?
(Things only go in configs if some configs need to opt out of them, which here doesn't seem to be the case as far as I can tell.)
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D110086/new/
https://reviews.llvm.org/D110086
More information about the llvm-commits
mailing list