rust/src/librustc_trans
bors 8b00355119 Auto merge of #36339 - brson:emscripten-new, r=alexcrichton
Working asmjs and wasm targets

This patch set results in a working standard library for the asmjs-unknown-emscripten and wasm32-unknown-emscripten targets. It is based on the work of @badboy and @rschulman.

It does a few things:

- Updates LLVM with the emscripten [fastcomp](https://github.com/rust-lang/llvm/pull/50) patches, which include the pnacl IR legalizer and the asm.js backend. This patch is thought not to have any significant effect on existing targets.
- Teaches rustbuild to correctly link C code with emscripten
- Updates gcc-rs to work correctly with emscripten
- Teaches rustbuild to run crate tests for emscripten with node
- Modifies Thread::new to return an error on emscripten, to facilitate debugging a common failure mode
- Modifies libtest to run in single-threaded mode for emscripten
- Ignores a host of tests that don't work yet, mostly dealing with threads and I/O
- Updates libc with wasm32 definitions (presently the same as asmjs)
- Adds a wasm32-unknown-emscripten target that feeds the output of LLVM's asmjs backend through emcc to generate wasm

Notes and caveats:

- This is only known to work with `--enable-rustbuild`.
- The wasm32 target can't be tested correctly yet because of issues in compiletest and limitations in node https://github.com/kripken/emscripten/issues/4542, but hello.rs does seem to work when run on node via the binaryen interpreter
- This requires an up to date installation of the emscripten sdk from its incoming branch
- Unwinding is very broken
- When enabling the emscripten targets jemalloc is disabled for all targets, which results in test failures for the host

Next steps are to fix the jemalloc issue, start building the two emscripten targets on the auto builders, then start producing nightlies.

https://github.com/rust-lang/rust/issues/36317 tracks work on this.

Fixes https://github.com/rust-lang/rust/issues/36515
Fixes https://github.com/rust-lang/rust/issues/36515
Fixes https://github.com/rust-lang/rust/issues/36356
2016-09-30 19:00:36 -07:00
..
back rustc: More fixes for arch-independent hashing 2016-09-30 14:31:32 -07:00
debuginfo Rename MIR local iterators to match convention 2016-09-26 22:50:03 +02:00
mir Change the local prefix to _ 2016-09-29 01:11:54 +02:00
abi.rs Preliminary wasm32 support 2016-09-30 14:02:45 -07:00
adt.rs Incorporate review comments. 2016-09-25 20:14:34 -04:00
asm.rs rustc_trans: remove the bulk of old trans and most of its support code. 2016-08-24 13:23:37 +03:00
assert_module_sources.rs Refactor away AttrMetaMethods. 2016-08-25 20:41:40 +00:00
attributes.rs finish type-auditing rustllvm 2016-08-03 15:08:47 +03:00
base.rs Completely kill represent_type and the adt::Repr type that goes with it. 2016-09-24 18:21:10 -04:00
basic_block.rs Delete obviously-unreachable blocks 2016-03-30 13:00:02 +13:00
build.rs split the FFI part of rustc_llvm to rustc_llvm::ffi 2016-08-03 15:08:47 +03:00
builder.rs finish type-auditing rustllvm 2016-08-03 15:08:47 +03:00
cabi_aarch64.rs Move ty_align and ty_size out of most C ABI code 2016-09-24 18:27:39 -06:00
cabi_arm.rs Move ty_align and ty_size out of most C ABI code 2016-09-24 18:27:39 -06:00
cabi_asmjs.rs rustc_trans: move the contents of the trans module to top-level. 2016-03-27 01:23:28 +02:00
cabi_mips.rs Move ty_align and ty_size out of most C ABI code 2016-09-24 18:27:39 -06:00
cabi_mips64.rs Move ty_align and ty_size out of most C ABI code 2016-09-24 18:27:39 -06:00
cabi_powerpc.rs Move ty_align and ty_size out of most C ABI code 2016-09-24 18:27:39 -06:00
cabi_powerpc64.rs Move ty_align and ty_size out of most C ABI code 2016-09-24 18:27:39 -06:00
cabi_s390x.rs Move ty_align and ty_size out of most C ABI code 2016-09-24 18:27:39 -06:00
cabi_x86.rs Handle integer-extending for C ABI 2016-04-04 22:14:10 +02:00
cabi_x86_64.rs Move ty_align and ty_size out of most C ABI code 2016-09-24 18:27:39 -06:00
cabi_x86_win64.rs Handle integer-extending for C ABI 2016-04-04 22:14:10 +02:00
callee.rs rustc_trans: simplify vtable and symbol handling. 2016-09-20 20:30:52 +03:00
Cargo.toml Move errors from libsyntax to its own crate 2016-06-23 08:07:35 -04:00
cleanup.rs rustc_trans: remove the bulk of old trans and most of its support code. 2016-08-24 13:23:37 +03:00
closure.rs rustc_trans: simplify vtable and symbol handling. 2016-09-20 20:30:52 +03:00
collector.rs Rollup merge of #36559 - grimreaper:eax/fix/r1, r=nikomatsakis 2016-09-24 00:15:45 +02:00
common.rs Completely kill represent_type and the adt::Repr type that goes with it. 2016-09-24 18:21:10 -04:00
consts.rs Fix incorrect LLVM Linkage enum 2016-09-04 16:12:01 -05:00
context.rs Optimize struct_field_ptr 2016-09-24 18:21:12 -04:00
declare.rs Fix incorrect LLVM Linkage enum 2016-09-04 16:12:01 -05:00
diagnostics.rs Small error code explanations improvements 2016-08-26 17:28:47 +02:00
disr.rs rustc_trans: move the contents of the trans module to top-level. 2016-03-27 01:23:28 +02:00
glue.rs Completely kill represent_type and the adt::Repr type that goes with it. 2016-09-24 18:21:10 -04:00
intrinsic.rs Completely kill represent_type and the adt::Repr type that goes with it. 2016-09-24 18:21:10 -04:00
lib.rs rustc_metadata: go only through rustc_serialize in astencode. 2016-09-20 20:07:54 +03:00
machine.rs Completely kill represent_type and the adt::Repr type that goes with it. 2016-09-24 18:21:10 -04:00
macros.rs rustc_trans: move the contents of the trans module to top-level. 2016-03-27 01:23:28 +02:00
meth.rs rustc_trans: simplify vtable and symbol handling. 2016-09-20 20:30:52 +03:00
monomorphize.rs cache projections in trans 2016-08-31 17:47:33 -04:00
partitioning.rs trans: Allow base::internalize_symbols() to internalize #[no_mangle] symbols 2016-09-15 20:39:58 -04:00
README.txt Make librustc's markdown README.txt claim to be markdown. 2015-03-20 13:29:13 +01:00
symbol_map.rs collector-driven-trans: Take care of nits. 2016-07-08 10:42:47 -04:00
symbol_names_test.rs Refactor away AttrMetaMethods. 2016-08-25 20:41:40 +00:00
trans_item.rs trans: Allow base::internalize_symbols() to internalize #[no_mangle] symbols 2016-09-15 20:39:58 -04:00
tvec.rs Fix optimization regressions for operations on [x; n]-initialized arrays. 2016-09-01 00:27:03 +03:00
type_.rs Incorporate review comments. 2016-09-25 20:14:34 -04:00
type_of.rs Completely kill represent_type and the adt::Repr type that goes with it. 2016-09-24 18:21:10 -04:00
value.rs begin auditing the C++ types in RustWrapper 2016-08-03 15:08:47 +03:00

See the README.md in ../librustc.