-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Enable msvc for run-make/rust-lld #128656
Conversation
This PR modifies cc @jieyouxu |
@bors try |
I don’t remember we’ve implemented self-contained linking other than by using a c/c++ compiler driver link-arg, while msvc needs to change the linker, so it’ll be interesting to see the results. |
Enable msvc for run-make/rust-lld This is simply a matter of using the right argument for lld-link. As a bonus, I also fixed a typo. try-job: i686-msvc try-job: x86_64-msvc
r=me if it works tho |
☀️ Try build successful - checks-actions |
Success! @bors r=lqd rollup |
Ah I think I know why it works even though we didn’t purposefully implement self-contained linking on non-unixy platforms: we can change the linker according to the linker flavor, and we currently use an lld linker-flavor as an implementation detail of self-contained linking. I guess this test will prevent us from being lazy when we refactor this away 😅 . |
Enable msvc for run-make/rust-lld This is simply a matter of using the right argument for lld-link. As a bonus, I also fixed a typo. try-job: i686-msvc try-job: x86_64-msvc
…enton Rollup of 11 pull requests Successful merges: - rust-lang#128026 (std::thread: available_parallelism implementation for vxWorks proposal.) - rust-lang#128471 (rustdoc: Fix handling of `Self` type in search index and refactor its representation) - rust-lang#128607 (Use `object` in `run-make/symbols-visibility`) - rust-lang#128609 (Remove unnecessary constants from flt2dec dragon) - rust-lang#128611 (run-make: Remove cygpath) - rust-lang#128630 (docs(resolve): more explain about `target`) - rust-lang#128638 (run-make: enable msvc for `link-dedup`) - rust-lang#128647 (Enable msvc for link-args-order) - rust-lang#128649 (run-make: Enable msvc for `no-duplicate-libs` and `zero-extend-abi-param-passing`) - rust-lang#128656 (Enable msvc for run-make/rust-lld) - rust-lang#128660 (tests: more crashes) r? `@ghost` `@rustbot` modify labels: rollup
Failed in rollup... on Apple??? Huh. |
tests/run-make/rust-lld/rmake.rs
Outdated
|
||
fn main() { | ||
// lld-link is used if msvc, otherwise a gnu-compatible lld is used. | ||
let linker_version_flag = if is_msvc() { "--version" } else { "Wl,-v" }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, I made a typo of my own. I forgot the dash -
. Silly me.
@bors r- |
This is simply a matter of using the right argument for lld-link.
Let's try that again... @bors r=lqd |
Enable msvc for run-make/rust-lld This is simply a matter of using the right argument for lld-link. As a bonus, I also fixed a typo. try-job: i686-msvc try-job: x86_64-msvc
Rollup of 8 pull requests Successful merges: - rust-lang#122049 (Promote riscv64gc-unknown-linux-musl to tier 2) - rust-lang#125558 (Tweak type inference for `const` operands in inline asm) - rust-lang#128638 (run-make: enable msvc for `link-dedup`) - rust-lang#128647 (Enable msvc for link-args-order) - rust-lang#128649 (run-make: Enable msvc for `no-duplicate-libs` and `zero-extend-abi-param-passing`) - rust-lang#128656 (Enable msvc for run-make/rust-lld) - rust-lang#128688 (custom MIR: add support for tail calls) - rust-lang#128691 (Update `compiler-builtins` to 0.1.115) r? `@ghost` `@rustbot` modify labels: rollup
Enable msvc for run-make/rust-lld This is simply a matter of using the right argument for lld-link. As a bonus, I also fixed a typo. try-job: i686-msvc try-job: x86_64-msvc
Enable msvc for run-make/rust-lld This is simply a matter of using the right argument for lld-link. As a bonus, I also fixed a typo. try-job: i686-msvc try-job: x86_64-msvc
Enable msvc for run-make/rust-lld This is simply a matter of using the right argument for lld-link. As a bonus, I also fixed a typo. try-job: i686-msvc try-job: x86_64-msvc
Enable msvc for run-make/rust-lld This is simply a matter of using the right argument for lld-link. As a bonus, I also fixed a typo. try-job: i686-msvc try-job: x86_64-msvc
Rollup of 7 pull requests Successful merges: - rust-lang#128206 (Make create_dll_import_lib easier to implement) - rust-lang#128221 (Add implied target features to target_feature attribute) - rust-lang#128384 (Add tests to ensure MTE tags are preserved across FFI boundaries) - rust-lang#128656 (Enable msvc for run-make/rust-lld) - rust-lang#128691 (Update `compiler-builtins` to 0.1.117) - rust-lang#128700 (Migrate `simd-ffi` `run-make` test to rmake) - rust-lang#128758 (Specify a minimum supported version for VxWorks) r? `@ghost` `@rustbot` modify labels: rollup
…llaumeGomez Rollup of 9 pull requests Successful merges: - rust-lang#128206 (Make create_dll_import_lib easier to implement) - rust-lang#128424 (minor `effects` cleanups) - rust-lang#128527 (More information for fully-qualified suggestion when there are multiple impls) - rust-lang#128656 (Enable msvc for run-make/rust-lld) - rust-lang#128683 (bootstrap: clear miri's ui test deps when rustc changes) - rust-lang#128700 (Migrate `simd-ffi` `run-make` test to rmake) - rust-lang#128753 (Don't arbitrarily choose one upper bound for hidden captured region error message) - rust-lang#128757 (Migrate `pgo-gen-lto` `run-make` test to rmake) - rust-lang#128758 (Specify a minimum supported version for VxWorks) Failed merges: - rust-lang#128679 (codegen: better centralize function declaration attribute computation) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of rust-lang#128656 - ChrisDenton:rust-lld, r=lqd Enable msvc for run-make/rust-lld This is simply a matter of using the right argument for lld-link. As a bonus, I also fixed a typo. try-job: i686-msvc try-job: x86_64-msvc
This is simply a matter of using the right argument for lld-link.
As a bonus, I also fixed a typo.
try-job: i686-msvc
try-job: x86_64-msvc