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

-C target-cpu=native #14

Open
jhpratt opened this issue May 7, 2020 · 7 comments
Open

-C target-cpu=native #14

jhpratt opened this issue May 7, 2020 · 7 comments
Labels
enhancement New feature or request

Comments

@jhpratt
Copy link

jhpratt commented May 7, 2020

By using RUSTFLAGS="-C target-cpu=native", the resulting binary will be far less portable, but it can reduce the binary size a fair amount.

@tesuji
Copy link

tesuji commented May 8, 2020

But beware of codegen bug which occasionally happened.
Please report issue if that happens.

@tesuji
Copy link

tesuji commented May 8, 2020

Also can you measure it?

@jhpratt
Copy link
Author

jhpratt commented May 8, 2020

I haven't heard of any issues with codegen, but I may just not be aware.

I'm not sure where this would be inserted, which would obviously affect the measurement. It's relatively trivial to do so, however.

@tesuji
Copy link

tesuji commented May 8, 2020

Like this: rust-lang/rust#63791

@jhpratt
Copy link
Author

jhpratt commented May 8, 2020

That's closed as fixed. Bugs happen in the compiler, that's not terribly surprising.

@tesuji
Copy link

tesuji commented May 8, 2020

I just want to add a small note to raise awareness for using target-cpu=native.

@tesuji
Copy link

tesuji commented May 13, 2020

And this one may seems serious: rust-lang/rust#64609

@johnthagen johnthagen added the enhancement New feature or request label Jun 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants