Implement flexible target specification#16156
Implement flexible target specification#16156bors merged 7 commits intorust-lang:masterfrom emberian:target-spec
Conversation
|
Still trying to figure out a bug where executables aren't getting the executable bit set... |
|
Seems to have resolved itself with a rebase ¯_(ツ)_/¯ |
src/librustc_back/target/mod.rs
Outdated
There was a problem hiding this comment.
This feature may want to remain unimplemented for now due to some open questions here, but it probably doesn't matter too much.
|
Can you write a run-make test that checks the compiler is correctly searching for, parsing and using external specifications? (E.g. it could run |
|
Another issue: probably needs to allow specifying |
|
(The RFC specifies taking it from the target) |
|
@huonw how do those docs look? |
|
Hm, glaringly obvious problem: |
|
@farcaller we should try this with |
|
Be warned that this isn't quite working yet. My current status is: |
|
(Already fixed I think, still building..) |
src/librustc_back/target/mod.rs
Outdated
There was a problem hiding this comment.
Do we have a story for interacting with cargo?
|
When compiling this on DragonFly I run into these problems: Maybe the |
There was a problem hiding this comment.
Ah nevermind, it would be nice to preserve the comments in the source code to this target specification about why this is false
There was a problem hiding this comment.
Seems like x86_64 linker doesn't understand this option, but i686 does.
|
Rebased, fixed, squashed: https://github.com/vadimcn/rust/tree/flextarget. Passes tests on Windows. |
|
Revived, yay! |
|
Darn it! What's going on here??? |
|
I can't replicate the android failure locally. @alexcrichton do you know what API level the emulators are using? |
|
Looks like #17448, but I think that we're using api version 19 maybe? |
Removes all target-specific knowledge from rustc. Some targets have changed during this, but none of these should be very visible outside of cross-compilation. The changes make our targets more consistent. iX86-unknown-linux-gnu is now only available as i686-unknown-linux-gnu. We used to accept any value of X greater than 1. i686 was released in 1995, and should encompass the bare minimum of what Rust supports on x86 CPUs. The only two windows targets are now i686-pc-windows-gnu and x86_64-pc-windows-gnu. The iOS target has been renamed from arm-apple-ios to arm-apple-darwin. A complete list of the targets we accept now: arm-apple-darwin arm-linux-androideabi arm-unknown-linux-gnueabi arm-unknown-linux-gnueabihf i686-apple-darwin i686-pc-windows-gnu i686-unknown-freebsd i686-unknown-linux-gnu mips-unknown-linux-gnu mipsel-unknown-linux-gnu x86_64-apple-darwin x86_64-unknown-freebsd x86_64-unknown-linux-gnu x86_64-pc-windows-gnu Closes #16093 [breaking-change]
|
@cmr Congrats! :-) |
See commit message.