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

Bin-crate build fail with new LLD linker in windows (linker-arguments: invalid argument) #48948

Closed
edwin0cheng opened this issue Mar 12, 2018 · 3 comments
Labels
O-wasm Target: WASM (WebAssembly), http://webassembly.org/ O-windows Operating system: Windows

Comments

@edwin0cheng
Copy link
Member

edwin0cheng commented Mar 12, 2018

We just try to update to the new nightly compiler to build my project.

rustc --version -> 1.26.0-nightly (2789b067d 2018-03-06)

but it fail to build in my Windows machine (it is working in nightly-2018-02-28), and the error message is following:

cargo build --target=wasm32-unknown-unknown
[...]
  = note: C:\Users\jice\.rustup\toolchains\nightly-x86_64-pc-windows-msvc\lib\rustlib\x86_64-pc-windows-msvc\bin\lld.exe: error: no output file specified
          C:\Users\jice\.rustup\toolchains\nightly-x86_64-pc-windows-msvc\lib\rustlib\x86_64-pc-windows-msvc\bin\lld.exe: error: cannot open @C:\Users\jice\AppData\Local\Temp\rustc.EgJv1gS5jdF9\linker-arguments:
invalid argument
          C:\Users\jice\.rustup\toolchains\nightly-x86_64-pc-windows-msvc\lib\rustlib\x86_64-pc-windows-msvc\bin\lld.exe: error: no input files

And then i tested in my mac machine, it works. It seem to be Windows only problem ?

@edwin0cheng
Copy link
Member Author

Original Post. koute/cargo-web#80

@edwin0cheng edwin0cheng changed the title Build fail with new LLD linker in windows (linker-arguments: invalid argument) Bin-Crate Build fail with new LLD linker in windows (linker-arguments: invalid argument) Mar 12, 2018
@edwin0cheng edwin0cheng changed the title Bin-Crate Build fail with new LLD linker in windows (linker-arguments: invalid argument) Bin-crate build fail with new LLD linker in windows (linker-arguments: invalid argument) Mar 12, 2018
@alexcrichton alexcrichton added O-wasm Target: WASM (WebAssembly), http://webassembly.org/ O-windows Operating system: Windows labels Mar 12, 2018
@alexcrichton
Copy link
Member

Thanks for the report! Turns out while linkers like link.exe accept arguments of the form @file LLD does not! We should probably disable this logic and this conditional on Windows

kennytm added a commit to kennytm/rust that referenced this issue Mar 14, 2018
…aelwoerister

rustc: Don't invoke `lld` with an `@`-file

Looks like LLD doesn't support this yet, so always try to use the OS before we
fall back to using `@`

cc rust-lang#48948
@edwin0cheng
Copy link
Member Author

Just checked, it fixed in rustc 1.26.0-nightly (3926453 2018-03-15), i will close this issue now, thank you so much.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
O-wasm Target: WASM (WebAssembly), http://webassembly.org/ O-windows Operating system: Windows
Projects
None yet
Development

No branches or pull requests

2 participants