Skip to content

Can't link a custom wasm target. #49709

@lachlansneff

Description

@lachlansneff

I'm trying to build a custom wasm target (eventually with a custom libstd).

I can build the crate, but it seems to be unable to find the linker.

Here's the error:

error: linker `lld` not found
  |
  = note: No such file or directory (os error 2)

error: aborting due to previous error

error: Could not compile `wasm-target-test`.

Here's my target:

{
  "arch": "wasm32",
  "data-layout": "e-m:e-p:32:32-i64:64-n32:64-S128",
  "default-hidden-visibility": true,
  "dll-prefix": "",
  "dll-suffix": ".wasm",
  "dynamic-linking": true,
  "env": "",
  "exe-suffix": ".wasm",
  "executables": true,
  "linker-flavor": "wasm-ld",
  "llvm-target": "wasm32-unknown-unknown-wasm",
  "max-atomic-width": 32,
  "only-cdylib": true,
  "os": "unknown",
  "panic-strategy": "abort",
  "singlethread": true,
  "target-c-int-width": "32",
  "target-endian": "little",
  "target-pointer-width": "32",
  "vendor": "unknown"
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-linkageArea: linking into static, shared libraries and binariesC-enhancementCategory: An issue proposing an enhancement or a PR with one.O-wasmTarget: WASM (WebAssembly), http://webassembly.org/T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions