Skip to content

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

Closed

Description

@edwin0cheng

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 ?

Activity

  1. edwin0cheng commented on Mar 12, 2018

    @edwin0cheng
    ContributorAuthor

    Original Post. koute/cargo-web#80

  2. 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)[/+] on Mar 12, 2018
  3. 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)[/+] on Mar 12, 2018
  4. added
    O-wasmTarget: WASM (WebAssembly), http://webassembly.org/
    O-windowsOperating system: Windows
    on Mar 12, 2018
  5. alexcrichton commented on Mar 12, 2018

    @alexcrichton
    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

  6. edwin0cheng commented on Mar 16, 2018

    @edwin0cheng
    ContributorAuthor

    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    O-wasmTarget: WASM (WebAssembly), http://webassembly.org/O-windowsOperating system: Windows

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions