summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
authorbrettw <brettw@chromium.org>2015-08-31 15:17:39 -0700
committerCommit bot <commit-bot@chromium.org>2015-08-31 22:18:18 +0000
commitba7a73dd61db639f42cc6283939f8b44cc4ecc6c (patch)
tree8a39315021584d7097ff63d478e9a94c045f9adc /chrome
parentd1ffb22d3c2864efbad907cd690fef7b31b585b9 (diff)
downloadchromium_src-ba7a73dd61db639f42cc6283939f8b44cc4ecc6c.zip
chromium_src-ba7a73dd61db639f42cc6283939f8b44cc4ecc6c.tar.gz
chromium_src-ba7a73dd61db639f42cc6283939f8b44cc4ecc6c.tar.bz2
Annotate GN executables and shared_libraries with sanitizer deps.
These are needed to link in asan/lsan/etc. mode. GYP injects these automatically but GN doesn't have automatic dependency injection. All tests and components (which cover the vast majority of such targets in actual use) are templates which add these dependencies already, so most of the time it never comes up. Only a few of these changes are actually necessary to link all tests run on the asan bot (which is also what engineers will typically build, since almost nobody will build all in asan mode). But to reduce confusion from linker errors in asan mode, I annotated all executables and shared libraries I could find with the sanitizer dependency. I moved a config out of a target in yasm, and sorted a fews deps on other targets. TBR=xhwang@chromium.org (widevine) TBR=achuith@chromium.org (tools/perf, tools/telemetry) Review URL: https://codereview.chromium.org/1318343003 Cr-Commit-Position: refs/heads/master@{#346490}
Diffstat (limited to 'chrome')
-rw-r--r--chrome/BUILD.gn6
-rw-r--r--chrome/android/BUILD.gn2
-rw-r--r--chrome/chrome_watcher/BUILD.gn1
-rw-r--r--chrome/installer/mini_installer/BUILD.gn1
-rw-r--r--chrome/installer/setup/BUILD.gn1
-rw-r--r--chrome/installer/test/BUILD.gn1
-rw-r--r--chrome/test/chromedriver/BUILD.gn1
-rw-r--r--chrome/tools/convert_dict/BUILD.gn1
-rw-r--r--chrome/tools/profile_reset/BUILD.gn1
-rw-r--r--chrome/tools/service_discovery_sniffer/BUILD.gn1
10 files changed, 15 insertions, 1 deletions
diff --git a/chrome/BUILD.gn b/chrome/BUILD.gn
index f306bbef..b412904 100644
--- a/chrome/BUILD.gn
+++ b/chrome/BUILD.gn
@@ -27,7 +27,9 @@ if (!is_android) {
]
defines = []
public_deps = []
- deps = []
+ deps = [
+ "//build/config/sanitizers:deps",
+ ]
data = [
"$root_out_dir/resources.pak",
@@ -201,6 +203,7 @@ shared_library("main_dll") {
deps = [
":browser_dependencies",
"//base/allocator",
+ "//build/config/sanitizers:deps",
]
if (is_win) {
output_name = "chrome"
@@ -302,6 +305,7 @@ if (is_multi_dll_chrome) {
":chrome_child_manifest",
":chrome_dll_version",
"//base/allocator",
+ "//build/config/sanitizers:deps",
"//chrome/browser/policy:path_parser",
"//content/public/app:child",
]
diff --git a/chrome/android/BUILD.gn b/chrome/android/BUILD.gn
index 49e3598..99ecb178 100644
--- a/chrome/android/BUILD.gn
+++ b/chrome/android/BUILD.gn
@@ -247,6 +247,7 @@ shared_library("chrome_shell") {
]
deps = [
":chrome_shell_base",
+ "//build/config/sanitizers:deps",
]
}
@@ -627,6 +628,7 @@ jinja_template_resources("chrome_public_template_resources") {
# GYP: //chrome/android/chrome_apk.gyp:libchrome_public
shared_library("chrome_public") {
deps = [
+ "//build/config/sanitizers:deps",
"//chrome:chrome_android_core",
]
gypi_values = exec_script(
diff --git a/chrome/chrome_watcher/BUILD.gn b/chrome/chrome_watcher/BUILD.gn
index ac00808..e639861 100644
--- a/chrome/chrome_watcher/BUILD.gn
+++ b/chrome/chrome_watcher/BUILD.gn
@@ -34,6 +34,7 @@ shared_library("chrome_watcher") {
":client",
"//chrome/installer/util",
"//base",
+ "//build/config/sanitizers:deps",
"//components/browser_watcher",
]
ldflags = [ "/DEF:" + rebase_path("chrome_watcher.def", root_build_dir) ]
diff --git a/chrome/installer/mini_installer/BUILD.gn b/chrome/installer/mini_installer/BUILD.gn
index 4631b69..54aaea0 100644
--- a/chrome/installer/mini_installer/BUILD.gn
+++ b/chrome/installer/mini_installer/BUILD.gn
@@ -182,6 +182,7 @@ executable("mini_installer") {
deps = [
":archive",
":lib",
+ "//build/config/sanitizers:deps",
"//build/win:default_exe_manifest",
"//chrome/installer/setup",
]
diff --git a/chrome/installer/setup/BUILD.gn b/chrome/installer/setup/BUILD.gn
index bff865f..3f59861c9 100644
--- a/chrome/installer/setup/BUILD.gn
+++ b/chrome/installer/setup/BUILD.gn
@@ -22,6 +22,7 @@ if (is_win) {
deps = [
":lib",
+ "//build/config/sanitizers:deps",
]
}
diff --git a/chrome/installer/test/BUILD.gn b/chrome/installer/test/BUILD.gn
index 97c3c66..2f5dfc2 100644
--- a/chrome/installer/test/BUILD.gn
+++ b/chrome/installer/test/BUILD.gn
@@ -16,6 +16,7 @@ executable("alternate_version_generator") {
":alternate_version_generator_lib",
"//base",
"//base/test:test_support",
+ "//build/config/sanitizers:deps",
"//chrome/common:constants",
"//chrome/installer/util",
"//testing/gtest",
diff --git a/chrome/test/chromedriver/BUILD.gn b/chrome/test/chromedriver/BUILD.gn
index 20a1d82..6ef1817 100644
--- a/chrome/test/chromedriver/BUILD.gn
+++ b/chrome/test/chromedriver/BUILD.gn
@@ -184,6 +184,7 @@ executable("chromedriver") {
deps = [
":lib",
+ "//build/config/sanitizers:deps",
]
}
diff --git a/chrome/tools/convert_dict/BUILD.gn b/chrome/tools/convert_dict/BUILD.gn
index 108eb19..e55a144 100644
--- a/chrome/tools/convert_dict/BUILD.gn
+++ b/chrome/tools/convert_dict/BUILD.gn
@@ -32,6 +32,7 @@ executable("convert_dict") {
":lib",
"//base",
"//base:i18n",
+ "//build/config/sanitizers:deps",
"//third_party/hunspell",
]
}
diff --git a/chrome/tools/profile_reset/BUILD.gn b/chrome/tools/profile_reset/BUILD.gn
index b1c488f..1cebad1 100644
--- a/chrome/tools/profile_reset/BUILD.gn
+++ b/chrome/tools/profile_reset/BUILD.gn
@@ -11,6 +11,7 @@ executable("jtl_compiler") {
deps = [
":jtl_compiler_lib",
"//base",
+ "//build/config/sanitizers:deps",
"//crypto",
]
}
diff --git a/chrome/tools/service_discovery_sniffer/BUILD.gn b/chrome/tools/service_discovery_sniffer/BUILD.gn
index 91c3bee..8fc3195 100644
--- a/chrome/tools/service_discovery_sniffer/BUILD.gn
+++ b/chrome/tools/service_discovery_sniffer/BUILD.gn
@@ -15,6 +15,7 @@ executable("service_discovery_sniffer") {
"//base",
"//base/allocator",
"//base/test:test_support",
+ "//build/config/sanitizers:deps",
"//chrome/utility",
"//net",
]