This repository has been archived by the owner on Mar 20, 2024. It is now read-only.
forked from move-language/move
-
Notifications
You must be signed in to change notification settings - Fork 32
[Bug] Reduce the binary size of move program #429
Labels
bug
Something isn't working
Comments
The libmove_native is contributing to those symbols in the final binary $ language/tools/move-mv-llvm-compiler/tests/rbpf-tests/assert-build/scripts/main.o $ llvm-objdump -D language/tools/move-mv-llvm-compiler/tests/rbpf-tests/assert-build/output.so | grep '<.*>:'| cut -f2- -d' ' | sed 's/[<>:]//g'
|
while the main.o only refers to abort function
|
|
Oz reduces the size to 208k. Number of symbols are still the same. --- a/.cargo/config
+++ b/.cargo/config
@@ -12,5 +12,8 @@ nextest = "run --package x --bin x -- nextest"
[target.x86_64-pc-windows-msvc]
rustflags = ["-C", "link-arg=/STACK:8000000"]
+[build]
+rustflags = ["-C", "opt-level=z"] # custom flags to pass to all compiler invocations
+ |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
A simple assert.move program results in 268k of output.so binary. Run the optimizer to reduce binary size.
The text was updated successfully, but these errors were encountered: