]> git.lizzy.rs Git - rust.git/commit
rustc: Allow using `clang` for wasm32 targets
authorAlex Crichton <alex@alexcrichton.com>
Tue, 19 Mar 2019 20:06:37 +0000 (13:06 -0700)
committerAlex Crichton <alex@alexcrichton.com>
Wed, 20 Mar 2019 21:42:53 +0000 (14:42 -0700)
commit0e945411f2f54fdb3404b382844b9818ecc10b89
tree52f5730d2bd52ab98de84462bc5b7903e6bbfb41
parent7a4df3b53da369110984a2b57419c05a53e33b38
rustc: Allow using `clang` for wasm32 targets

This commit adds support code for using `clang` directly to link the
wasm32-unknown-unknown target. Currently the target is only really
configured to link with LLD directly, but this ensures that `clang` can
be configured as well.

While not immediately useful in the near term it's likely that more
wasm32 targets will pop up over time with Clang's new native support for
WebAssembly in the 8.0.0 release. Getting support into rustc early
should make it easier to experiment with these targets and try out
various changes here and there.
src/librustc_codegen_ssa/back/linker.rs
src/librustc_target/spec/mod.rs
src/librustc_target/spec/wasm32_base.rs [new file with mode: 0644]
src/librustc_target/spec/wasm32_unknown_unknown.rs