rustc: Attempt to handle super long linker invocations#44094
rustc: Attempt to handle super long linker invocations#44094bors merged 1 commit intorust-lang:masterfrom
Conversation
|
r? @pnkfelix (rust_highfive has picked a reviewer for you, use r? to override) |
ab7551f to
c8c4657
Compare
|
@alexcrichton I've heard that @michaelwoerister is on vacation; perhaps you want to select another reviewer? |
|
Ah that's ok, this is in no rush regardless |
|
@bors r+ Nice! Thanks, Alex! |
|
📌 Commit c8c4657 has been approved by |
|
⌛ Testing commit c8c4657 with merge e7074e71c010e390089c13a146f7d84aa868f4dc... |
|
💔 Test failed - status-appveyor |
|
Seems like a legitimate error: https://ci.appveyor.com/project/rust-lang/rust/build/1.0.4538/job/f3auqt7jdxn3icc3#L7729 |
|
@kennytm |
c8c4657 to
98e25a4
Compare
|
@bors: r=michaelweorister |
|
📌 Commit 98e25a4 has been approved by |
|
⌛ Testing commit 98e25a41de8a093188171d2d94e1357b355ab9d6 with merge f3457796c3c61c6507fd47da84947d260eb8dd73... |
|
💔 Test failed - status-appveyor |
|
@bors retry
Details |
This commit adds logic to the compiler to attempt to handle super long linker invocations by falling back to the `@`-file syntax if the invoked command is too large. Each OS has a limit on how many arguments and how large the arguments can be when spawning a new process, and linkers tend to be one of those programs that can hit the limit! The logic implemented here is to unconditionally attempt to spawn a linker and then if it fails to spawn with an error from the OS that indicates the command line is too big we attempt a fallback. The fallback is roughly the same for all linkers where an argument pointing to a file, prepended with `@`, is passed. This file then contains all the various arguments that we want to pass to the linker. Closes rust-lang#41190
98e25a4 to
ed938f0
Compare
|
@bors: r=michaelwoerister |
|
📌 Commit ed938f0 has been approved by |
rustc: Attempt to handle super long linker invocations This commit adds logic to the compiler to attempt to handle super long linker invocations by falling back to the `@`-file syntax if the invoked command is too large. Each OS has a limit on how many arguments and how large the arguments can be when spawning a new process, and linkers tend to be one of those programs that can hit the limit! The logic implemented here is to unconditionally attempt to spawn a linker and then if it fails to spawn with an error from the OS that indicates the command line is too big we attempt a fallback. The fallback is roughly the same for all linkers where an argument pointing to a file, prepended with `@`, is passed. This file then contains all the various arguments that we want to pass to the linker. Closes #41190
|
☀️ Test successful - status-appveyor, status-travis |
|
@alexcrichton How do you feel about backporting this? It's a fairly small, targeted patch, and people are hitting on the build of the Rust compiler (#44898)... I'm somewhat hesitant, myself. |
|
@Mark-Simulacrum we're about 2 weeks away from a release and incremental only "sorta works" on beta right now, so I think I'd be inclined to not backport. |
|
With the state of incremental in the current beta (i.e. halfway through the big tracking system refactoring) I'd rather make |
|
De-nominating for beta |
This commit adds logic to the compiler to attempt to handle super long linker
invocations by falling back to the
@-file syntax if the invoked command is toolarge. Each OS has a limit on how many arguments and how large the arguments can
be when spawning a new process, and linkers tend to be one of those programs
that can hit the limit!
The logic implemented here is to unconditionally attempt to spawn a linker and
then if it fails to spawn with an error from the OS that indicates the command
line is too big we attempt a fallback. The fallback is roughly the same for all
linkers where an argument pointing to a file, prepended with
@, is passed.This file then contains all the various arguments that we want to pass to the
linker.
Closes #41190