From 51f0090555d8936a71c4d0a3ff336fdb329a1210 Mon Sep 17 00:00:00 2001 From: Cheng Zhao Date: Mon, 3 Mar 2014 14:14:02 +0800 Subject: [PATCH] Make sure symbol is dumped from unstripped binary. --- script/create-dist.py | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/script/create-dist.py b/script/create-dist.py index bacb1de..ef3f9a9 100755 --- a/script/create-dist.py +++ b/script/create-dist.py @@ -9,7 +9,7 @@ import tarfile from lib.config import LIBCHROMIUMCONTENT_COMMIT, BASE_URL, NODE_VERSION from lib.util import scoped_cwd, rm_rf, get_atom_shell_version, make_zip, \ - safe_mkdir, execute + safe_mkdir, safe_unlink, execute ATOM_SHELL_VRESION = get_atom_shell_version() @@ -81,6 +81,8 @@ def main(): args = parse_args() + if TARGET_PLATFORM == 'linux': + clean_build() force_build() if TARGET_PLATFORM != 'linux': download_libchromiumcontent_symbols(args.url) @@ -105,6 +107,16 @@ def parse_args(): return parser.parse_args() +def clean_build(): + # On Linux stripping binary would cause them to be rebuilt next time, which + # would make create-dist create symbols from stripped binary if it has been + # ran for twice. + # So in order to make sure we built correct symbols everytime, we have to + # force a rebuild of the binaries. + for binary in TARGET_BINARIES[TARGET_PLATFORM]: + safe_unlink(os.path.join(OUT_DIR, binary)) + + def force_build(): build = os.path.join(SOURCE_ROOT, 'script', 'build.py') execute([sys.executable, build, '-c', 'Release']) -- 2.7.4