Closed Bug 1430886 Opened 2 years ago Closed 2 years ago

cargo-linker.bat: The command line is too long with rust 1.24

Categories

(Firefox Build System :: General, defect)

defect
Not set

Tracking

(firefox59 fixed)

RESOLVED FIXED
mozilla59
Tracking Status
firefox59 --- fixed

People

(Reporter: rillian, Assigned: rillian)

References

Details

Attachments

(1 file)

Building with rust 1.24.0-beta.3 on try failed with a too-long command line linking the style-derive crate.

> error: linking with `z:/build/build/src/obj-firefox/build/win64/cargo-linker.bat` failed: exit code: 1
>   |
>   = note: "z:/build/build/src/obj-firefox/build/win64/cargo-linker.bat" "/NOLOGO" "/NXCOMPAT" "/LIBPATH:Z:\\task_1516046371\\build\\src\\rustc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib" "z:/build/build/src/obj-firefox/toolkit/library\\debug\\deps\\style_derive-e1b4b56f14c4a823.11j0gc463nqnd7cz.rcgu.o" "z:/build/build/src/obj-firefox/toolkit/library\\debug\\deps\\style_derive-e1b4b56f14c4a823.16u6js6g0l3k1ic6.rcgu.o" "z:/build/build/src/obj-firefox/toolkit/library\\debug\\deps\\style_derive-e1b4b56f14c4a823.1dqesegdb4nvzjrd.rcgu.o" "z:/build/build/src/obj-firefox/toolkit/library\\debug\\deps\\style_derive-e1b4b56f14c4a823.1e698527iprj2v8f.rcgu.o" "z:/build/build/src/obj-firefox/toolkit/library\\debug\\deps\\style_derive-e1b4b56f14c4a823.1e6xiyur245d4uqu.rcgu.o" "z:/build/build/src/obj-firefox/toolkit/library\\debug\\deps\\style_derive-e1b4b56f14c4a823.1gfn7dbe1euq5fpq.rcgu.o" "z:/build/build/src/obj-firefox/toolkit/library\\debug\\deps\\style_derive-e1b4b56f14c4a823.1im38lueib99jsk0.rcgu.o" "z:/build/build/src/obj-firefox/toolkit/library\\debug\\deps\\style_derive-e1b4b56f14c4a823.1mvmz58owquyropc.rcgu.o" "z:/build/build/src/obj-firefox/toolkit/library\\debug\\deps\\style_derive-e1b4b56f14c4a823.1rltizuwkvdx5uja.rcgu.o" "z:/build/build/src/obj-firefox/toolkit/library\\debug\\deps\\style_derive-e1b4b56f14c4a823.1vtp4ohcqw3alji.rcgu.o" "z:/build/build/src/obj-firefox/toolkit/library\\debug\\deps\\style_derive-e1b4b56f14c4a823.1ynjk5qf2rfkrmgl.rcgu.o" "z:/build/build/src/obj-firefox/toolkit/library\\debug\\deps\\style_derive-e1b4b56f14c4a823.1zeawhkbeobww1zn.rcgu.o" "z:/build/build/src/obj-firefox/toolkit/library\\debug\\deps\\style_derive-e1b4b56f14c4a823.1zwd8n7bcl3vhvvh.rcgu.o" "z:/build/build/src/obj-firefox/toolkit/library\\debug\\deps\\style_derive-e1b4b56f14c4a823.23x9x6j2vq161a97.rcgu.o" "z:/build/build/src/obj-firefox/toolkit/library\\debug\\deps\\style_derive-e1b4b56f14c4a823.2ffatjifsh7hal82.rcgu.o" "z:/build/build/src/obj-firefox/toolkit/library\\debug\\deps\\style_derive-e1b4b56f14c4a823.2jqywn86b2gsqohu.rcgu.o" "z:/build/build/src/obj-firefox/toolkit/library\\debug\\deps\\style_derive-e1b4b56f14c4a823.2kjrmm4fe2aha78f.rcgu.o" "z:/build/build/src/obj-firefox/toolkit/library\\debug\\deps\\style_derive-e1b4b56f14c4a823.2pk65aqriei97j03.rcgu.o" "z:/build/build/src/obj-firefox/toolkit/library\\debug\\deps\\style_derive-e1b4b56f14c4a823.2w6xsa2hbi53xhak.rcgu.o" "z:/build/build/src/obj-firefox/toolkit/library\\debug\\deps\\style_derive-e1b4b56f14c4a823.3171x0bwu82dptu7.rcgu.o" "z:/build/build/src/obj-firefox/toolkit/library\\debug\\deps\\style_derive-e1b4b56f14c4a823.318a6u9ytyoxo2w6.rcgu.o" "z:/build/build/src/obj-firefox/toolkit/library\\debug\\deps\\style_derive-e1b4b56f14c4a823.347ctspmfobbga2.rcgu.o" "z:/build/build/src/obj-firefox/toolkit/library\\debug\\deps\\style_derive-e1b4b56f14c4a823.36wtu1uowrrd30cq.rcgu.o" "z:/build/build/src/obj-firefox/toolkit/library\\debug\\deps\\style_derive-e1b4b56f14c4a823.390dtt1nsneb5ttx.rcgu.o" "z:/build/build/src/obj-firefox/toolkit/library\\debug\\deps\\style_derive-e1b4b56f14c4a823.394vo29rvfgcvb2j.rcgu.o" "z:/build/build/src/obj-firefox/toolkit/library\\debug\\deps\\style_derive-e1b4b56f14c4a823.3ayaeypdcro9d6yk.rcgu.o" "z:/build/build/src/obj-firefox/toolkit/library\\debug\\deps\\style_derive-e1b4b56f14c4a823.3cx7oljifvb206q7.rcgu.o" "z:/build/build/src/obj-firefox/toolkit/library\\debug\\deps\\style_derive-e1b4b56f14c4a823.3kfx4ynvkmi2y9i5.rcgu.o" "z:/build/build/src/obj-firefox/toolkit/library\\debug\\deps\\style_derive-e1b4b56f14c4a823.3ldk0i2zxftngav8.rcgu.o" "z:/build/build/src/obj-firefox/toolkit/library\\debug\\deps\\style_derive-e1b4b56f14c4a823.3oqznv5oym7l3m4e.rcgu.o" "z:/build/build/src/obj-firefox/toolkit/library\\debug\\deps\\style_derive-e1b4b56f14c4a823.3wjizd1o3tqzuf0n.rcgu.o" "z:/build/build/src/obj-firefox/toolkit/library\\debug\\deps\\style_derive-e1b4b56f14c4a823.3yhpbr4rud6zk7i6.rcgu.o" "z:/build/build/src/obj-firefox/toolkit/library\\debug\\deps\\style_derive-e1b4b56f14c4a823.40mv2bo8bxf7ur21.rcgu.o" "z:/build/build/src/obj-firefox/toolkit/library\\debug\\deps\\style_derive-e1b4b56f14c4a823.43v6g0y2xsxoggnt.rcgu.o" "z:/build/build/src/obj-firefox/toolkit/library\\debug\\deps\\style_derive-e1b4b56f14c4a823.45pc7c65foh9i35f.rcgu.o" "z:/build/build/src/obj-firefox/toolkit/library\\debug\\deps\\style_derive-e1b4b56f14c4a823.48pf7e3puosscmtp.rcgu.o" "z:/build/build/src/obj-firefox/toolkit/library\\debug\\deps\\style_derive-e1b4b56f14c4a823.49a7n47po4ttqjl7.rcgu.o" "z:/build/build/src/obj-firefox/toolkit/library\\debug\\deps\\style_derive-e1b4b56f14c4a823.49b27vi6lo5at459.rcgu.o" "z:/build/build/src/obj-firefox/toolkit/library\\debug\\deps\\style_derive-e1b4b56f14c4a823.49lx1q7cxvpykyv0.rcgu.o" "z:/build/build/src/obj-firefox/toolkit/library\\debug\\deps\\style_derive-e1b4b56f14c4a823.4a6dgwgsyclvnmy1.rcgu.o" "z:/build/build/src/obj-firefox/toolkit/library\\debug\\deps\\style_derive-e1b4b56f14c4a823.4brwxiorhmgsb6oc.rcgu.o" "z:/build/build/src/obj-firefox/toolkit/library\\debug\\deps\\style_derive-e1b4b56f14c4a823.4ezmh1vbs95c5ack.rcgu.o" "z:/build/build/src/obj-firefox/toolkit/library\\debug\\deps\\style_derive-e1b4b56f14c4a823.4g4m3v5x9045spb3.rcgu.o" "z:/build/build/src/obj-firefox/toolkit/library\\debug\\deps\\style_derive-e1b4b56f14c4a823.4jdnq7xfjeka1bt.rcgu.o" "z:/build/build/src/obj-firefox/toolkit/library\\debug\\deps\\style_derive-e1b4b56f14c4a823.4lyvjyx12se4jtm2.rcgu.o" "z:/build/build/src/obj-firefox/toolkit/library\\debug\\deps\\style_derive-e1b4b56f14c4a823.4sewadyg4wilbf46.rcgu.o" "z:/build/build/src/obj-firefox/toolkit/library\\debug\\deps\\style_derive-e1b4b56f14c4a823.4tbdb3n9grxbxp7m.rcgu.o" "z:/build/build/src/obj-firefox/toolkit/library\\debug\\deps\\style_derive-e1b4b56f14c4a823.4uk87y793ot8cr2r.rcgu.o" "z:/build/build/src/obj-firefox/toolkit/library\\debug\\deps\\style_derive-e1b4b56f14c4a823.4v6u21o40xrtteig.rcgu.o" "z:/build/build/src/obj-firefox/toolkit/library\\debug\\deps\\style_derive-e1b4b56f14c4a823.4ypvbwho0bu5tnww.rcgu.o" "z:/build/build/src/obj-firefox/toolkit/library\\debug\\deps\\style_derive-e1b4b56f14c4a823.56dly8q07ws8ucdq.rcgu.o" "z:/build/build/src/obj-firefox/toolkit/library\\debug\\deps\\style_derive-e1b4b56f14c4a823.56o7a5xfs5itdzs8.rcgu.o" "z:/build/build/src/obj-firefox/toolkit/library\\debug\\deps\\style_derive-e1b4b56f14c4a823.5gcc4uajl6w1dvrb.rcgu.o" "z:/build/build/src/obj-firefox/toolkit/library\\debug\\deps\\style_derive-e1b4b56f14c4a823.63mmpc50mjcb0lb.rcgu.o" "z:/build/build/src/obj-firefox/toolkit/library\\debug\\deps\\style_derive-e1b4b56f14c4a823.8xzrsc1ux72v29j.rcgu.o" "z:/build/build/src/obj-firefox/toolkit/library\\debug\\deps\\style_derive-e1b4b56f14c4a823.9elsx31vb4it187.rcgu.o" "z:/build/build/src/obj-firefox/toolkit/library\\debug\\deps\\style_derive-e1b4b56f14c4a823.aab12lqq9mmq2yn.rcgu.o" "z:/build/build/src/obj-firefox/toolkit/library\\debug\\deps\\style_derive-e1b4b56f14c4a823.e19kx9t7xhzajfl.rcgu.o" "z:/build/build/src/obj-firefox/toolkit/library\\debug\\deps\\style_derive-e1b4b56f14c4a823.g1ocmwqfqx543lf.rcgu.o" "z:/build/build/src/obj-firefox/toolkit/library\\debug\\deps\\style_derive-e1b4b56f14c4a823.g407jmopsa86xcy.rcgu.o" "z:/build/build/src/obj-firefox/toolkit/library\\debug\\deps\\style_derive-e1b4b56f14c4a823.i8bg7gevp1ffy0v.rcgu.o" "z:/build/build/src/obj-firefox/toolkit/library\\debug\\deps\\style_derive-e1b4b56f14c4a823.ljx5mx55mmigyzm.rcgu.o" "z:/build/build/src/obj-firefox/toolkit/library\\debug\\deps\\style_derive-e1b4b56f14c4a823.xxz95nhleh79zqx.rcgu.o" "/OUT:z:/build/build/src/obj-firefox/toolkit/library\\debug\\deps\\style_derive-e1b4b56f14c4a823.dll" "/DEF:C:\\Users\\task_1516046371\\AppData\\Local\\Temp\\rustc.IG1chbzuLKk5\\lib.def" "z:/build/build/src/obj-firefox/toolkit/library\\debug\\deps\\style_derive-e1b4b56f14c4a823.crate.metadata.rcgu.o" "z:/build/build/src/obj-firefox/toolkit/library\\debug\\deps\\style_derive-e1b4b56f14c4a823.crate.allocator.rcgu.o" "/OPT:REF,ICF" "/DEBUG" "/NATVIS:Z:\\task_1516046371\\build\\src\\rustc\\lib\\rustlib\\etc\\intrinsic.natvis" "/NATVIS:Z:\\task_1516046371\\build\\src\\rustc\\lib\\rustlib\\etc\\liballoc.natvis" "/NATVIS:Z:\\task_1516046371\\build\\src\\rustc\\lib\\rustlib\\etc\\libcore.natvis" "/LIBPATH:z:/build/build/src/obj-firefox/toolkit/library\\debug\\deps" "/LIBPATH:Z:\\task_1516046371\\build\\src\\rustc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib" "Z:\\task_1516046371\\build\\src\\obj-firefox\\toolkit\\library\\debug\\deps\\libsynstructure-489c70dfea5c3164.rlib" "Z:\\task_1516046371\\build\\src\\obj-firefox\\toolkit\\library\\debug\\deps\\libdarling-8bf1a0157a3e4db6.rlib" "Z:\\task_1516046371\\build\\src\\obj-firefox\\toolkit\\library\\debug\\deps\\libdarling_core-4bd79cfb83c67549.rlib" "Z:\\task_1516046371\\build\\src\\obj-firefox\\toolkit\\library\\debug\\deps\\libident_case-2bdf061f028ee451.rlib" "Z:\\task_1516046371\\build\\src\\obj-firefox\\toolkit\\library\\debug\\deps\\libsyn-dbb2326aac66aba6.rlib" "Z:\\task_1516046371\\build\\src\\obj-firefox\\toolkit\\library\\debug\\deps\\liblazy_static-9b1191bea076ed67.rlib" "Z:\\task_1516046371\\build\\src\\obj-firefox\\toolkit\\library\\debug\\deps\\libquote-22926e177a2db3dd.rlib" "Z:\\task_1516046371\\build\\src\\obj-firefox\\toolkit\\library\\debug\\deps\\libsynom-2ab0c852424b5b11.rlib" "Z:\\task_1516046371\\build\\src\\obj-firefox\\toolkit\\library\\debug\\deps\\libunicode_xid-e21c4225cd4099d2.rlib" "/LIBPATH:Z:\\task_1516046371\\build\\src\\rustc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib" "proc_macro-63c0e650b1499e7e.dll.lib" "/LIBPATH:Z:\\task_1516046371\\build\\src\\rustc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib" "syntax-ce534482a75f67bf.dll.lib" "/LIBPATH:Z:\\task_1516046371\\build\\src\\rustc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib" "rustc_errors-396f1d4a1411abfb.dll.lib" "/LIBPATH:Z:\\task_1516046371\\build\\src\\rustc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib" "term-0cc3ce70f644aee1.dll.lib" "/LIBPATH:Z:\\task_1516046371\\build\\src\\rustc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib" "rustc_cratesio_shim-207e33bcb68b906c.dll.lib" "/LIBPATH:Z:\\task_1516046371\\build\\src\\rustc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib" "syntax_pos-9cf58b10acc81ec2.dll.lib" "/LIBPATH:Z:\\task_1516046371\\build\\src\\rustc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib" "rustc_data_structures-64c66af9120bd3a2.dll.lib" "/LIBPATH:Z:\\task_1516046371\\build\\src\\rustc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib" "serialize-27e5cd93776fd8ed.dll.lib" "/LIBPATH:Z:\\task_1516046371\\build\\src\\rustc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib" "std-78ef126d861e918e.dll.lib" "Z:\\task_1516046371\\build\\src\\rustc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\libcompiler_builtins-a54b5cbf3b97a6ad.rlib" "kernel32.lib" "kernel32.lib" "advapi32.lib" "advapi32.lib" "ws2_32.lib" "userenv.lib" "shell32.lib" "msvcrt.lib" "/DLL" "/IMPLIB:z:/build/build/src/obj-firefox/toolkit/library\\debug\\deps\\style_derive-e1b4b56f14c4a823.dll.lib"
>   = note: The command line is too long.
> error: aborting due to previous error
> error: Could not compile `style_derive`.
> Caused by:
>   process didn't exit successfully: `z:/build/build/src/sccache2/sccache.exe z:/build/build/src/rustc/bin/rustc.exe --crate-name style_derive Z:\build\build\src\servo\components\style_derive\lib.rs --crate-type proc-macro --emit=dep-info,link -C prefer-dynamic -C opt-level=1 -C codegen-units=4 -C debuginfo=2 -C debug-assertions=on -C metadata=e1b4b56f14c4a823 -C extra-filename=-e1b4b56f14c4a823 --out-dir z:/build/build/src/obj-firefox/toolkit/library\debug\deps -C linker=z:/build/build/src/obj-firefox/build/win64/cargo-linker.bat -C incremental=z:/build/build/src/obj-firefox/toolkit/library\debug\incremental -L dependency=z:/build/build/src/obj-firefox/toolkit/library\debug\deps --extern synstructure=z:/build/build/src/obj-firefox/toolkit/library\debug\deps\libsynstructure-489c70dfea5c3164.rlib --extern syn=z:/build/build/src/obj-firefox/toolkit/library\debug\deps\libsyn-dbb2326aac66aba6.rlib --extern quote=z:/build/build/src/obj-firefox/toolkit/library\debug\deps\libquote-22926e177a2db3dd.rlib --extern darling=z:/build/build/src/obj-firefox/toolkit/library\debug\deps\libdarling-8bf1a0157a3e4db6.rlib` (exit code: 101)
On irc, :ted suggested we could switch to a response file.
...although if this is rustc's invocation of the linker failing, we might not be able to fix that directly. Is it just that Rust 1.24 is producing a longer link line than 1.23? Maybe we were already precariously close and something pushed us over the limit?
rustc does already have some code to try to re-execute the linker in this situation:
https://github.com/rust-lang/rust/blob/da569fa9ddf8369a9809184d43c600dc06bd4b4d/src/librustc_trans/back/link.rs#L751

Maybe something isn't working right here?
Per Raymond Chen, the command line length limit is 32k using CreateProcess, but only 8k for cmd.exe:
https://blogs.msdn.microsoft.com/oldnewthing/20031210-00/?p=41553

That's unfortunate!
Oh dear, this sounds bad! I believe this was chagned to using 16 codegen units by default in release/debug mode, and it looks like those 16 object files are taking up a lot of space on the command line.

This also looks the same as another issue (https://github.com/rust-lang/rust/issues/46999) which is about emscripten but specifically has to do with bat files rather than executables. The reason for this is that we do indeed have logic for switching to response files (the `@`-prefixed argument) as Ted pointed out but it's only triggered when the child process literally failed to spawn with `ERROR_FILENAME_EXCED_RANGE` on Windows (like CreateProcessW returned an error).

With bat files though I believe it's different. We're successfully spawning a process (CreateProcessW succeeds) but then during `cmd.exe`'s (I think?) execution it's then printing out an error saying it can't spawn a process because it's too big. I think what we need to do is to update rustc's logic for "did the linker fail because arguments are too big?" to account for this case as well (probably only on Windows). Either that or we could just start approximating the size of the command line and automatically switch to `@` when it looks too big.

In any case I think next steps are:

* Probably specify `codegen-units = 1` in Cargo.toml for Gecko and make sure there are no other regressions.
* Fix upstream rustc to pass `@` more aggressively either by calculating command line limits or otherwise detecting differently what happened.

Does that sounds reasonable?
That looks like a lot of style_derive objects (a fair number more than the codegen-units default of 16...where are all those coming from?  We also specified codegen-units=4 on the command line:

z:/build/build/src/sccache2/sccache.exe z:/build/build/src/rustc/bin/rustc.exe ... -C codegen-units=4 -C debuginfo=2 -C debug-assertions=on ...

Uh, Alex, help?

We haven't specified codegen-units for release profiles because rustc complains that it's incompatible with LTO.

Making rustc smarter will definitely help here...
Flags: needinfo?(acrichton)
Oh dear, another good question! Do y'all have incremental enabled perchance? That's the other avenue to get a whole bunch of object files. Also yeah counting by hand there's 30+...

The LTO restriction with multiple codegen units should also be lifted now (maybe only fixed in 1.24 though, I forget about 1.23).
Flags: needinfo?(acrichton)
(In reply to Alex Crichton [:acrichto] from comment #5)
> * Fix upstream rustc to pass `@` more aggressively either by calculating
> command line limits or otherwise detecting differently what happened.

Yeah, I was thinking this. The limits on Windows are well-known, so you should be able to determine ahead of time whether you're going to go over the 32k limit (when running a process directly) or the 8k limit (when invoking a .bat script) and just use a response file in that case.
Out of curiosity, what version are y'all using for the build that generated this failure? As of 1.23.0 we should spawn `cmd /c foo.bat ...` instead of just `foo.bat ...` but that doesn't appear to be what happened in the gist'd error message above
Sorry, the full log is https://treeherder.mozilla.org/logviewer.html#?job_id=156425071&repo=try&lineNumber=16987 which says:

> checking rustc version... 1.24.0-beta.3
> checking cargo version... 0.25.0

Maybe something wonky happens later?
Aha looks like that's a regression! -- https://github.com/rust-lang/rust/pull/47505

FWIW yes y'all are using incremental compilation which is what's causing all the codegen units.

I'm working on a patch to more aggresively revert to using a response file.
(In reply to Alex Crichton [:acrichto] from comment #11)
> Aha looks like that's a regression! --
> https://github.com/rust-lang/rust/pull/47505
> 
> FWIW yes y'all are using incremental compilation which is what's causing all
> the codegen units.

That sounds wrong. We shouldn't be.
Ok I've posted a PR to fix this and nominated it for beta inclusion at https://github.com/rust-lang/rust/pull/47507

> That sounds wrong. We shouldn't be.

Oh dear! FWIW in 1.24 incremental compilation is now turned on by default for `cargo build`, but it remains disabled by default for `cargo build --release`. Looking at the logs it looks like `--release` wasn't specified, so that may be why it's incremental?

You should be able to disable incremental by adding this to the workspace Cargo.toml:

    [profile.dev]
    incremental = false
(or by setting CARGO_INCREMENTAL=0)
Oh wait, we're talking about debug builds here? I thought the error was on an opt build.
The 'command line is too long' failure only happens on debug Windows, which supports Alex's suggestion that it's incremental.

Windows opt builds also fail, but with the same "Fn() + 'static is not Sync" in slog issue as the Linux builds. I believe that's a separate issue.
Comment on attachment 8943330 [details]
Bug 1430886 - Disable incremental rust in automation.

https://reviewboard.mozilla.org/r/213662/#review219400
Attachment #8943330 - Flags: review+
Comment on attachment 8943330 [details]
Bug 1430886 - Disable incremental rust in automation.

https://reviewboard.mozilla.org/r/213662/#review219402

::: commit-message-4e429:3
(Diff revision 1)
> +Work around excessive command-line length issues by
> +disabling incremental rust compilation, which is enabled
> +by default outside `cargo --release` starting with Rust 1.24.
> +
> +Incremental rust builds shouldn't help much in automation,
> +where sccache provides the only continuity between build
> +environments. In the meantime, they add a lot of object
> +files to the link line.

Actually, this is a problem for anybody building on Windows, right?  Should we be turning off incremental compilation completely on Windows until the fixes make it to stable?  Or should we just say that if you're compiling with beta Rust and you run into problems, you're on your own?
Attachment #8943330 - Flags: review?(core-build-config-reviews)
Comment on attachment 8943330 [details]
Bug 1430886 - Disable incremental rust in automation.

https://reviewboard.mozilla.org/r/213662/#review219402

> Actually, this is a problem for anybody building on Windows, right?  Should we be turning off incremental compilation completely on Windows until the fixes make it to stable?  Or should we just say that if you're compiling with beta Rust and you run into problems, you're on your own?

I think it's fine to say people building with beta are on their own. Hopefully Alex's fix will make it into 1.23.0 release, and there will be no problem. I'd rather leave it on for default builds in expectation of that given the importance of build times for development.

I also assumed the reason Glandium didn't want us building with incremental in automation is that there might be a performance impact on the generated code. That doesn't matter much for debug builds, but it made it worth turning off for automation builds, not just Windows.

If Alex's fix doesn't make it, we can revisit then.
Pushed by rgiles@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/261725e65af9
Disable incremental rust in automation. r=froydnj
FWIW, I don't see this issue on a local windows debug build. I think we don't use cargo-linker.bat outside of automation? In my objdir/config.status WIN64_CARGO_LINKER_CONFIG is empty and there's no generated cargo-linker.bat. In that case, rustc's fallback behaviour should handle the issue.
https://hg.mozilla.org/mozilla-central/rev/261725e65af9
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla59
Right, it's only necessary if you have PATH/LIB/etc set in the environment explicitly *and* you don't have Visual C++ actually installed on your system such that rustc could find it via registry entries, which is basically never true for a developer machine, only our systems in CI.
Product: Core → Firefox Build System
Assignee: nobody → giles
You need to log in before you can comment on or make changes to this bug.