Skip to content
This repository has been archived by the owner on Jan 4, 2019. It is now read-only.

Commit

Permalink
Merge pull request #551 from brave/win-create-dist
Browse files Browse the repository at this point in the history
fix windows create_dist
  • Loading branch information
bridiver authored Mar 27, 2018
2 parents 0b57d3e + 8aa8be7 commit 628e7a6
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
3 changes: 3 additions & 0 deletions app/win/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -195,11 +195,14 @@ action("generate_breakpad_symbols") {
args = [
"--symbols-dir=" + rebase_path(symbols_dir),
"--jobs=16",
"--clear",
"--dump-syms-exe=" + rebase_path(root_out_dir) + "/dump_syms.exe",
rebase_path(root_out_dir)
]

deps = [
":electron_app",
"//third_party/breakpad:dump_syms",
]

script = "//electron/tools/win/generate_breakpad_symbols.py"
Expand Down
13 changes: 11 additions & 2 deletions tools/win/generate_breakpad_symbols.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@

CONCURRENT_TASKS=4
SOURCE_ROOT=os.path.abspath(os.path.dirname(os.path.dirname(os.path.dirname(os.path.dirname(__file__)))))
DUMP_SYMS=os.path.join(SOURCE_ROOT, 'breakpad', 'src', 'tools', 'windows', 'binaries', 'dump_syms.exe')


def GetCommandOutput(command):
Expand Down Expand Up @@ -61,7 +60,7 @@ def _Worker():
with print_lock:
print "Generating symbols for %s" % binary

syms = GetCommandOutput([DUMP_SYMS, binary])
syms = GetCommandOutput([options.dump_syms_exe, binary])
module_line = re.match("MODULE [^ ]+ [^ ]+ ([0-9A-Fa-f]+) (.*)\r\n", syms)
if module_line == None:
with print_lock:
Expand Down Expand Up @@ -101,13 +100,23 @@ def main():
type='int', help='Number of parallel tasks to run.')
parser.add_option('-v', '--verbose', action='store_true',
help='Print verbose status output.')
parser.add_option('--dump-syms-exe', default='', action='store',
type='string', help='Location of dump_syms.exe.')

(options, directories) = parser.parse_args()

if not options.symbols_dir:
print "Required option --symbols-dir missing."
return 1

if not options.dump_syms_exe:
print "Required option --dump-syms-exe missing."
return 1

if not os.path.isfile(options.dump_syms_exe):
print "%s does is missing. Please check the path for --dump-syms-exe." % options.dump_syms_exe
return 1

if options.clear:
try:
shutil.rmtree(options.symbols_dir)
Expand Down

0 comments on commit 628e7a6

Please sign in to comment.