Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1777)

Unified Diff: build/config/sanitizers/BUILD.gn

Issue 1818273002: [libfuzzer] supporting libfuzzer on mac with asan (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: wrapping copy in if (is_mac) Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « BUILD.gn ('k') | build/config/sanitizers/sanitizers.gni » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/config/sanitizers/BUILD.gn
diff --git a/build/config/sanitizers/BUILD.gn b/build/config/sanitizers/BUILD.gn
index 0da971cc59443fc84d3191d445f90baff208f67c..aa05aab9d5410cdf8de21567c8a5d77c1b8bd1d6 100644
--- a/build/config/sanitizers/BUILD.gn
+++ b/build/config/sanitizers/BUILD.gn
@@ -28,12 +28,17 @@ group("deps") {
}
if (use_custom_libcxx) {
deps += [ "//buildtools/third_party/libc++:libcxx_proxy" ]
+ if (is_mac) {
Alexander Potapenko 2016/03/30 11:05:00 Why is this flag checked only under use_custom_lib
+ deps += [ ":copy_libclang_rt_dyn" ]
+ }
}
}
}
config("sanitizer_options_link_helper") {
- ldflags = [ "-Wl,-u_sanitizer_options_link_helper" ]
+ if (!is_mac) {
+ ldflags = [ "-Wl,-u_sanitizer_options_link_helper" ]
+ }
}
source_set("options_sources") {
@@ -284,6 +289,10 @@ config("default_sanitizer_flags") {
]
}
}
+
+ if (is_mac && is_asan) {
+ libs = [ "clang_rt.asan_osx_dynamic" ]
+ }
}
config("default_sanitizer_coverage_flags") {
@@ -294,3 +303,17 @@ config("default_sanitizer_coverage_flags") {
cflags += [ "-fsanitize-coverage=edge,indirect-calls,8bit-counters" ]
}
}
+
+# Copy dynamic clang_rt sanitizer libraries to output directory.
+if (is_mac) {
+ copy("copy_libclang_rt_dyn") {
+ sources = [
+ "//third_party/llvm-build/Release+Asserts/compiler-rt/lib/darwin/libclang_rt.asan_osx_dynamic.dylib",
Alexander Potapenko 2016/03/30 11:05:00 This path is incorrect.
kjellander_chromium 2016/03/30 14:25:08 Right, on my Mac the path is: third_party/llvm-bui
+ "//third_party/llvm-build/Release+Asserts/compiler-rt/lib/darwin/libclang_rt.tsan_osx_dynamic.dylib",
+ "//third_party/llvm-build/Release+Asserts/compiler-rt/lib/darwin/libclang_rt.ubsan_osx_dynamic.dylib",
+ ]
+ outputs = [
+ "$root_build_dir/{{source_file_part}}",
+ ]
+ }
+}
« no previous file with comments | « BUILD.gn ('k') | build/config/sanitizers/sanitizers.gni » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698