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

Does not compiles with target-feature=-sse2 #261

Closed
tower120 opened this issue Mar 8, 2023 · 3 comments
Closed

Does not compiles with target-feature=-sse2 #261

tower120 opened this issue Mar 8, 2023 · 3 comments

Comments

@tower120
Copy link

tower120 commented Mar 8, 2023

When I trying to compile num-traits with

[build]
rustflags = ["-Ctarget-feature=-sse2"] 

I get:

   Compiling num-traits v0.2.15
error: src\lib.rs:386:0: in function _ZN39_$LT$f64$u20$as$u20$num_traits..Num$GT$14from_str_radix17h59b1ae50b18378abE void (ptr, ptr, i64, i32): SSE2 register return with SSE2 disable
@CryZe
Copy link
Contributor

CryZe commented Mar 8, 2023

You can't turn off sse2 like that because std is pre-compiled with sse2. Look into using the i586 target(s) instead.

@tower120
Copy link
Author

tower120 commented Mar 8, 2023

That's not that I'm trying to disable sse2 specifically for num-traits....

So, sse2 required for num-traits? Does that means it can't be used with arm/mac?
If so - that should be mentioned somewhere in the docs.

@tower120
Copy link
Author

tower120 commented Mar 8, 2023

You can't turn off sse2 like that because std is pre-compiled with sse2

Oh I lost std word, first time I read that.

https://docs.rs/safe_arch/latest/safe_arch/#compile-time-cpu-target-features

Now I see that.

@tower120 tower120 closed this as completed Mar 8, 2023
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

2 participants