Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cargo-size (any maybe others?) seem to not pass along -Z flags appropriately #139

Open
jamesmunns opened this issue Oct 25, 2023 · 2 comments

Comments

@jamesmunns
Copy link
Member

jamesmunns commented Oct 25, 2023

I noticed that passing -Z flags seems not to work as I expect:

cargo build --release -Z build-std=core -Z build-std-features=panic_immediate_abort --target thumbv7em-none-eabi && arm-none-eabi-size target/thumbv7em-none-eabi/release/redacted
    Finished release [optimized + debuginfo] target(s) in 0.13s
   text     data      bss      dec      hex  filename
  15448       56   205248   220752    35e50  target/thumbv7em-none-eabi/release/redacted

cargo size --release -Z build-std=core -Z build-std-features=panic_immediate_abort --target thumbv7em-none-eabi
    Finished release [optimized + debuginfo] target(s) in 0.10s
   text     data      bss      dec      hex  filename
  19688       56   205248   224992    36ee0  redacted

cargo size --release --target thumbv7em-none-eabi 
    Finished release [optimized + debuginfo] target(s) in 0.10s
   text	   data	    bss	    dec	    hex	filename
  19688	     56	 205248	 224992	  36ee0	redacted

In the second invocation, the size SHOULD be the same, but 19K is what I see when I don't enable build-std(-features).

@Emilgardis
Copy link
Member

This should be fixed on the master branch with #128, we've just not had a release since then. Not sure why

@Coekjan
Copy link

Coekjan commented Nov 20, 2023

I also met this problem today.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants