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

Unified Diff: chrome/BUILD.gn

Issue 2054893002: [Mac/GN] Add targets to run dump_syms and create the dSYM archive. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address comments 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/redirect_stdout.py ('k') | chrome/tools/build/mac/archive_symbols.py » ('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 6b82fe74f6539dbaaf249144f7bbc6fbb8058262..f4c7cbf247a0f5d49a8d8f25096ec863cea60b2f 100644
--- a/chrome/BUILD.gn
+++ b/chrome/BUILD.gn
@@ -435,6 +435,13 @@ if (is_win) {
if (debug_devtools) {
deps += [ ":devtools_debug_resources" ]
}
+
+ if (is_chrome_branded && is_official_build) {
+ deps += [
+ ":chrome_dsym_archive",
+ ":chrome_dump_syms",
+ ]
+ }
}
tweak_info_plist("chrome_app_plist") {
@@ -1004,6 +1011,85 @@ if (is_win) {
]
}
}
+
+ if (enable_dsyms) {
+ # This list must be updated with the two targets' deps list below, and
+ # the list of _dsyms in :chrome_dsym_archive.
+ _chrome_symbols_sources = [
+ "$root_out_dir/$chrome_framework_name.framework/$chrome_framework_name",
+ "$root_out_dir/$chrome_helper_name.app/Contents/MacOS/$chrome_helper_name",
+ "$root_out_dir/$chrome_product_full_name.app/Contents/MacOS/$chrome_product_full_name",
+ "$root_out_dir/crashpad_handler",
+ ]
+
+ # It is possible to run dump_syms on unstripped products without dSYMs,
+ # but doing so isn't logical and won't happen in practice.
+ action_foreach("chrome_dump_syms") {
+ script = "//build/redirect_stdout.py"
+
+ sources = _chrome_symbols_sources
+
+ outputs = [
+ "$root_out_dir/{{source_file_part}}-$chrome_version_full.breakpad",
+ ]
+
+ # Use an aboslute path to dump_syms in case a user has it in their path.
+ args = rebase_path(outputs, root_out_dir) + [
+ rebase_path("$root_out_dir/dump_syms"),
+ "-g",
+ rebase_path(
+ "$root_out_dir/{{source_name_part}}.dSYM/Contents/Resources/DWARF/{{source_name_part}}",
+ root_out_dir),
+ "{{source}}",
+ ]
+
+ deps = [
+ ":chrome_app",
+ ":chrome_framework",
+ ":chrome_helper_app",
+ "//breakpad:dump_syms",
+ "//third_party/crashpad/crashpad/handler:crashpad_handler",
+ ]
+ }
+
+ action("chrome_dsym_archive") {
+ script = "//chrome/tools/build/mac/archive_symbols.py"
+
+ # These are the dSYMs that will be archived. The sources list must be
+ # are the target outputs that correspond to the dSYMs (since a dSYM is
+ # a directory it cannot be listed as a source file). The targets that
+ # generate both the dSYM and binary image are listed in deps.
+ _dsyms = [
+ "$root_out_dir/$chrome_framework_name.dSYM",
+ "$root_out_dir/$chrome_helper_name.dSYM",
+ "$root_out_dir/$chrome_product_full_name.dSYM",
+ "$root_out_dir/crashpad_handler.dSYM",
+ ]
+
+ sources = _chrome_symbols_sources
+
+ _output = "$root_out_dir/$chrome_product_full_name.dSYM.tar.bz2"
+
+ outputs = [
+ _output,
+ ]
+
+ args = [ rebase_path(_output, root_out_dir) ] +
+ rebase_path(_dsyms, root_out_dir)
+
+ deps = [
+ ":chrome_app",
+ ":chrome_framework",
+ ":chrome_helper_app",
+ "//third_party/crashpad/crashpad/handler:crashpad_handler",
+ ]
+ }
+ } else {
+ group("chrome_dump_syms") {
+ }
+ group("chrome_symbol_archive") {
+ }
+ }
}
# GYP version: chromium_browser_dependencies variable in chrome.gyp
« no previous file with comments | « build/redirect_stdout.py ('k') | chrome/tools/build/mac/archive_symbols.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698