build: preserve timestamps when stripping files (#22094)
* build: preserve timestamps when stripping files Resolves an issue where the binaries in mksnapshot.zip were not getting stripped. * Add missing comma * Update script/strip-binaries.py Co-Authored-By: Jeremy Apthorp <jeremya@chromium.org> * Don't try to run strip on macOS Co-authored-by: Jeremy Apthorp <nornagon@nornagon.net>
This commit is contained in:
parent
ea89120c9e
commit
5e49aafe55
2 changed files with 9 additions and 7 deletions
|
@ -406,7 +406,7 @@ step-maybe-electron-dist-strip: &step-maybe-electron-dist-strip
|
|||
fi
|
||||
cd src
|
||||
electron/script/copy-debug-symbols.py --target-cpu="$target_cpu" --out-dir=out/Default/debug --compress
|
||||
electron/script/strip-binaries.py -v --target-cpu="$target_cpu"
|
||||
electron/script/strip-binaries.py --target-cpu="$target_cpu"
|
||||
electron/script/add-debug-link.py --target-cpu="$target_cpu" --debug-dir=out/Default/debug
|
||||
fi
|
||||
|
||||
|
@ -470,7 +470,9 @@ step-electron-chromedriver-build: &step-electron-chromedriver-build
|
|||
export CHROMEDRIVER_DIR="out/Default"
|
||||
fi
|
||||
ninja -C $CHROMEDRIVER_DIR electron:electron_chromedriver -j $NUMBER_OF_NINJA_PROCESSES
|
||||
electron/script/strip-binaries.py -v --target-cpu="$TARGET_ARCH" --file $PWD/$CHROMEDRIVER_DIR/chromedriver
|
||||
if [ "`uname`" == "Linux" ]; then
|
||||
electron/script/strip-binaries.py --target-cpu="$TARGET_ARCH" --file $PWD/$CHROMEDRIVER_DIR/chromedriver
|
||||
fi
|
||||
ninja -C $CHROMEDRIVER_DIR electron:electron_chromedriver_zip
|
||||
if [ "$TARGET_ARCH" == "arm" ] || [ "$TARGET_ARCH" == "arm64" ]; then
|
||||
cp out/chromedriver/chromedriver.zip out/Default
|
||||
|
@ -632,12 +634,12 @@ step-mksnapshot-build: &step-mksnapshot-build
|
|||
gn desc out/Default v8:run_mksnapshot_default args > out/Default/mksnapshot_args
|
||||
if [ "`uname`" != "Darwin" ]; then
|
||||
if [ "$TARGET_ARCH" == "arm" ]; then
|
||||
electron/script/strip-binaries.py -v --file $PWD/out/Default/clang_x86_v8_arm/mksnapshot
|
||||
electron/script/strip-binaries.py --file $PWD/out/Default/clang_x86_v8_arm/mksnapshot
|
||||
elif [ "$TARGET_ARCH" == "arm64" ]; then
|
||||
electron/script/strip-binaries.py -v --file $PWD/out/Default/clang_x64_v8_arm64/mksnapshot
|
||||
electron/script/strip-binaries.py --file $PWD/out/Default/clang_x64_v8_arm64/mksnapshot
|
||||
else
|
||||
electron/script/strip-binaries.py -v --file $PWD/out/Default/mksnapshot
|
||||
electron/script/strip-binaries.py -v --file $PWD/out/Default/v8_context_snapshot_generator
|
||||
electron/script/strip-binaries.py --file $PWD/out/Default/mksnapshot
|
||||
electron/script/strip-binaries.py --file $PWD/out/Default/v8_context_snapshot_generator
|
||||
fi
|
||||
fi
|
||||
if [ "$SKIP_DIST_ZIP" != "1" ]; then
|
||||
|
|
|
@ -22,7 +22,7 @@ def strip_binary(binary_path, target_cpu):
|
|||
strip = 'mips64el-redhat-linux-strip'
|
||||
else:
|
||||
strip = 'strip'
|
||||
execute([strip, binary_path])
|
||||
execute([strip, '--preserve-dates', binary_path])
|
||||
|
||||
def main():
|
||||
args = parse_args()
|
||||
|
|
Loading…
Reference in a new issue