Chromium Code Reviews| Index: chrome/BUILD.gn |
| diff --git a/chrome/BUILD.gn b/chrome/BUILD.gn |
| index 6b82fe74f6539dbaaf249144f7bbc6fbb8058262..02916f25dd9604ab27107b3af78d98c15af44b0b 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) { |
|
Mark Mentovai
2016/06/09 18:48:04
We don’t have a better variable for “want dumped s
Robert Sesek
2016/06/09 20:53:46
This is making the top-level "chrome" target depen
|
| + 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", |
| + ] |
| + |
| + # Prefix dump_syms with a ./ in case a user has it in their path. |
|
Mark Mentovai
2016/06/09 18:48:04
Does this mean that gn or something puts an implic
Robert Sesek
2016/06/09 20:53:46
No, the way I had rebase_path'd it, there was no p
|
| + args = rebase_path(outputs, root_out_dir) + [ |
| + "./" + rebase_path("$root_out_dir/dump_syms", root_build_dir), |
| + "-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 |