File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -30,12 +30,17 @@ export CARGO_TARGET_DIR=$PWD/target/lambda
30
30
31
31
function package() {
32
32
file=" $1 "
33
- strip " $file "
33
+ if [[ " ${PROFILE} " == " release" ]]; then
34
+ objcopy --only-keep-debug " $file " " $file .debug"
35
+ objcopy --strip-debug --strip-unneeded " $file "
36
+ objcopy --add-gnu-debuglink=" $file .debug" " $file "
37
+ fi
34
38
rm " $file .zip" > 2& > /dev/null || true
35
39
# note: would use printf "@ $(basename $file)\n@=bootstrap" | zipnote -w "$file.zip"
36
40
# if not for https://bugs.launchpad.net/ubuntu/+source/zip/+bug/519611
37
41
if [ " $file " != ./bootstrap ] && [ " $file " != bootstrap ]; then
38
42
mv " ${file} " bootstrap
43
+ mv " ${file} .debug" bootstrap.debug > 2& > /dev/null || true
39
44
fi
40
45
zip " $file .zip" bootstrap
41
46
rm bootstrap
@@ -53,4 +58,4 @@ cd "${CARGO_TARGET_DIR}/${TARGET_PROFILE}"
53
58
package " $BIN "
54
59
fi
55
60
56
- ) 1>&2
61
+ ) 1>&2
You can’t perform that action at this time.
0 commit comments