]> khamidou — GitHub mirrors - electron.git/commitdiff
Make sure symbol is dumped from unstripped binary.
authorCheng Zhao <zcbenz@gmail.com>
Mon, 3 Mar 2014 06:14:02 +0000 (14:14 +0800)
committerCheng Zhao <zcbenz@gmail.com>
Mon, 3 Mar 2014 06:14:02 +0000 (14:14 +0800)
script/create-dist.py

index bacb1deeab9c6ffe7242daefb51bd5aa95622078..ef3f9a9bbaf810ad4ce2dae0d641d66bddcbc574 100755 (executable)
@@ -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'])