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

Unified Diff: chrome/BUILD.gn

Issue 2188473002: [Mac/GN] Configure ASan for bundled targets. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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/toolchain/mac/linker_driver.py ('k') | content/shell/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/BUILD.gn
diff --git a/chrome/BUILD.gn b/chrome/BUILD.gn
index 8b3ab7afb6430940a862c39fa1554cd08621a7b0..f49157b8e449ecf257c1f4d0621527d4efcaf4b5 100644
--- a/chrome/BUILD.gn
+++ b/chrome/BUILD.gn
@@ -517,14 +517,20 @@ if (is_win) {
"//chrome/common:version_header",
]
+ ldflags = []
+
# Remove the default strip configuration (which strips all symbols) so that
# a saves file can be specified.
if (enable_stripping) {
remove_configs = [ "//build/config/mac:strip_all" ]
- ldflags =
+ ldflags +=
[ "-Wcrl,strip,-s," + rebase_path("app/app.saves", root_build_dir) ]
}
+
+ if (using_sanitizer) {
+ ldflags += [ "-Wcrl,installname,@executable_path/$asan_runtime_basename,@executable_path/../Versions/$chrome_version_full/$chrome_framework_name.framework/Helpers/$asan_runtime_basename" ]
+ }
}
compiled_action("chrome_app_strings") {
@@ -694,6 +700,10 @@ if (is_win) {
ldflags +=
[ "-Wcrl,strip,-s," + rebase_path("app/app.saves", root_build_dir) ]
}
+
+ if (using_sanitizer) {
+ ldflags += [ "-Wcrl,installname,@executable_path/$asan_runtime_basename,@executable_path/../../../$chrome_framework_name.framework/Helpers/$asan_runtime_basename" ]
+ }
}
bundle_data("chrome_framework_locales") {
@@ -723,6 +733,11 @@ if (is_win) {
public_deps = [
"//third_party/crashpad/crashpad/handler:crashpad_handler",
]
+
+ if (using_sanitizer) {
+ sources += [ "$root_out_dir/$asan_runtime_basename" ]
+ public_deps += [ "//build/config/sanitizers:copy_asan_runtime" ]
+ }
}
bundle_data("chrome_framework_resources") {
@@ -1043,6 +1058,10 @@ if (is_win) {
":chrome_dll",
]
}
+
+ if (using_sanitizer) {
+ ldflags += [ "-Wcrl,installname,@executable_path/$asan_runtime_basename,@loader_path/Helpers/$asan_runtime_basename" ]
+ }
}
if (!is_asan && !is_component_build) {
« no previous file with comments | « build/toolchain/mac/linker_driver.py ('k') | content/shell/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698