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

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

Issue 2101243005: Add a snapshot of flutter/engine/src/build to our sdk (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: add README.dart Created 4 years, 6 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/config/mips.gni ('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
new file mode 100644
index 0000000000000000000000000000000000000000..899695127e83fb97e3a87616945266f6b16d267d
--- /dev/null
+++ b/build/config/sanitizers/BUILD.gn
@@ -0,0 +1,59 @@
+# Copyright 2014 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+import("//build/config/sanitizers/sanitizers.gni")
+
+# Contains the dependencies needed for sanitizers to link into executables and
+# shared_libraries. Unconditionally depend upon this target as it is empty if
+# |is_asan|, |is_lsan|, |is_tsan|, |is_msan| and |use_custom_libcxx| are false.
+group("deps") {
+ deps = [
+ "//third_party/instrumented_libraries:deps",
+ ]
+ if (is_asan || is_lsan || is_tsan || is_msan) {
+ public_configs = [ ":sanitizer_options_link_helper" ]
+ deps += [ ":options_sources" ]
+ }
+ if (use_custom_libcxx) {
+ deps += [ "//buildtools/third_party/libc++:libcxx_proxy" ]
+ }
+}
+
+config("sanitizer_options_link_helper") {
+ ldflags = [ "-Wl,-u_sanitizer_options_link_helper" ]
+ if (is_asan) {
+ ldflags += [ "-fsanitize=address" ]
+ }
+ if (is_lsan) {
+ ldflags += [ "-fsanitize=leak" ]
+ }
+ if (is_tsan) {
+ ldflags += [ "-fsanitize=thread" ]
+ }
+ if (is_msan) {
+ ldflags += [ "-fsanitize=memory" ]
+ }
+}
+
+source_set("options_sources") {
+ visibility = [
+ ":deps",
+ "//:gn_visibility",
+ ]
+ sources = [
+ "//build/sanitizers/sanitizer_options.cc",
+ ]
+
+ if (is_asan) {
+ sources += [ "//build/sanitizers/asan_suppressions.cc" ]
+ }
+
+ if (is_lsan) {
+ sources += [ "//build/sanitizers/lsan_suppressions.cc" ]
+ }
+
+ if (is_tsan) {
+ sources += [ "//build/sanitizers/tsan_suppressions.cc" ]
+ }
+}
« no previous file with comments | « build/config/mips.gni ('k') | build/config/sanitizers/sanitizers.gni » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698