rust-teeny(opt): optimize size further
This commit is contained in:
+12
-1
@@ -11,7 +11,7 @@ build:
|
||||
-Zlocation-detail=none -Zfmt-debug=none \
|
||||
\
|
||||
-Clinker=clang -Clink-arg=-fuse-ld=lld \
|
||||
-Clink-arg=-Wl,--gc-sections -Clink-arg=-Wl,--strip-all \
|
||||
-Clink-arg=-Wl,--gc-sections -Clink-arg=-Wl,--as-needed -Clink-arg=-Wl,--strip-all -Clink-arg=-Wl,--build-id=none \
|
||||
\
|
||||
-Cpanic=immediate-abort --remap-path-prefix=$PWD=[src] \
|
||||
" cargo \
|
||||
@@ -21,6 +21,17 @@ build:
|
||||
\
|
||||
b -r --target {{ target }}
|
||||
|
||||
# Base, does like nothing
|
||||
strip --strip-all --strip-unneeded target/{{ target }}/release/rust-teeny
|
||||
|
||||
# BS, I don't want these
|
||||
strip -R .comment -R .note.\* target/{{ target }}/release/rust-teeny
|
||||
|
||||
# Only OK because we don't do unwinding
|
||||
strip -R .eh_frame\* target/{{ target }}/release/rust-teeny
|
||||
|
||||
# Not sure why .gnu.version and .gnu.hash don't break if I remove them in my machine, but that's very relative and its related to dynamic loading, but they could reduce size by `0.2 KiB`
|
||||
|
||||
stat:
|
||||
stat target/{{ target }}/release/rust-teeny
|
||||
|
||||
|
||||
Reference in New Issue
Block a user