[llvm] 81291b6 - [gn build] Add -fsanitize=fuzzer to link flags in fuzzer targets when llvm_use_sanitize_coverage
Arthur Eubanks via llvm-commits
llvm-commits at lists.llvm.org
Tue Mar 1 16:14:11 PST 2022
Author: Arthur Eubanks
Date: 2022-03-01T16:10:51-08:00
New Revision: 81291b636d318455eca5cda9e77fa027236d2247
URL: https://github.com/llvm/llvm-project/commit/81291b636d318455eca5cda9e77fa027236d2247
DIFF: https://github.com/llvm/llvm-project/commit/81291b636d318455eca5cda9e77fa027236d2247.diff
LOG: [gn build] Add -fsanitize=fuzzer to link flags in fuzzer targets when llvm_use_sanitize_coverage
Added:
Modified:
llvm/utils/gn/build/fuzzer.gni
Removed:
################################################################################
diff --git a/llvm/utils/gn/build/fuzzer.gni b/llvm/utils/gn/build/fuzzer.gni
index b5aaf9425a404..ec177d364a577 100644
--- a/llvm/utils/gn/build/fuzzer.gni
+++ b/llvm/utils/gn/build/fuzzer.gni
@@ -40,7 +40,11 @@ template("fuzzer") {
if (!defined(cflags)) {
cflags = []
}
+ if (!defined(ldflags)) {
+ ldflags = []
+ }
cflags += [ "-fsanitize=fuzzer" ]
+ ldflags += [ "-fsanitize=fuzzer" ]
not_needed(invoker, [ "dummy_main" ])
} else {
sources += [ invoker.dummy_main ]
More information about the llvm-commits
mailing list