From b8e38ad14ea96e551f34da5ae9089407d979c02f Mon Sep 17 00:00:00 2001 From: Cheng Zhao Date: Thu, 9 Apr 2015 09:05:51 +0800 Subject: [PATCH] linux: Strip binaries wen creating distribution --- script/create-dist.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/script/create-dist.py b/script/create-dist.py index 59e4a28a..c2dc4645 100755 --- a/script/create-dist.py +++ b/script/create-dist.py @@ -80,6 +80,7 @@ def main(): copy_license() if TARGET_PLATFORM == 'linux': + strip_binaries() copy_system_libraries() create_version() @@ -130,6 +131,12 @@ def copy_license(): shutil.copy2(os.path.join(SOURCE_ROOT, 'LICENSE'), DIST_DIR) +def strip_binaries(): + for binary in TARGET_BINARIES[TARGET_PLATFORM]: + if binary.endswith('.so') or '.' not in binary: + execute(['strip', os.path.join(DIST_DIR, binary)]) + + def copy_system_libraries(): ldd = execute(['ldd', os.path.join(OUT_DIR, 'atom')]) lib_re = re.compile('\t(.*) => (.+) \(.*\)$') -- 2.43.0