rust/src/librustc_codegen_llvm
bors b4d9835f6c Auto merge of #54766 - alexcrichton:wasm-all-symbols, r=michaelwoerister
wasm: Explicitly export all symbols with LLD

This commit fixes an oddity on the wasm target where LTO can produce
working executables but plain old optimizations doesn't. The compiler
already knows what set of symbols it would like to export, but LLD only
discovers this list transitively through symbol visibilities. LLD may
not, however, always find all the symbols that we'd like to export.

For example if you depend on an rlib with a `#[no_mangle]` symbol, then
if you don't actually use anything from the rlib then the symbol won't
appear in the final artifact! It will appear, however, with LTO. This
commit attempts to rectify this situation by ensuring that all symbols
rustc would otherwise preserve through LTO are also preserved through
the linking process with LLD by default.
2018-10-06 10:44:11 +00:00
..
back wasm: Explicitly export all symbols with LLD 2018-10-02 13:49:51 -07:00
debuginfo Introduce TyKind::UnnormalizedProjection 2018-10-03 17:06:28 +02:00
llvm Auto merge of #54568 - levex:issue-54130, r=nagisa 2018-09-28 09:17:28 +00:00
mir Record whether a Call in MIR corresponds to a call in HIR 2018-10-03 19:54:55 +01:00
abi.rs Remove Ty prefix from Ty{Adt|Array|Slice|RawPtr|Ref|FnDef|FnPtr|Dynamic|Closure|Generator|GeneratorWitness|Never|Tuple|Projection|Anon|Infer|Error} 2018-08-22 16:07:44 +01:00
allocator.rs rustc: Tweak visibility of some lang items 2018-08-07 08:42:38 -07:00
asm.rs codegen_llvm: check inline assembly constraints with LLVM 2018-09-25 20:38:35 +02:00
attributes.rs Rollup merge of #52514 - DiamondLovesYou:amdgpu-fixes, r=eddyb 2018-09-12 12:17:22 +08:00
base.rs incr.comp.: Allow for more fine-grained testing of CGU reuse and use it to test incremental ThinLTO. 2018-09-18 16:33:24 +02:00
build.rs Rename trans to codegen everywhere. 2018-05-17 15:08:30 +03:00
builder.rs fixup! codegen_llvm: check inline assembly constraints with LLVM 2018-09-26 06:43:19 +02:00
callee.rs AMDGPU ignores noinline when it slaps alwaysinline everywhere. 2018-08-23 14:30:57 -05:00
Cargo.toml Support local ThinLTO with incremental compilation. 2018-08-31 15:22:52 +02:00
common.rs Remove Ty prefix from Ty{Adt|Array|Slice|RawPtr|Ref|FnDef|FnPtr|Dynamic|Closure|Generator|GeneratorWitness|Never|Tuple|Projection|Anon|Infer|Error} 2018-08-22 16:07:44 +01:00
consts.rs Rename hir::map::NodeKind to hir::Node 2018-08-27 21:46:23 +01:00
context.rs Remove Ty prefix from Ty{Bool|Char|Int|Uint|Float|Str} 2018-08-22 16:08:49 +01:00
declare.rs use is_uninhabited in more places 2018-09-30 17:27:06 +02:00
diagnostics.rs fixup! codegen_llvm: check inline assembly constraints with LLVM 2018-09-26 10:19:09 +02:00
glue.rs Remove Ty prefix from Ty{Bool|Char|Int|Uint|Float|Str} 2018-08-22 16:08:49 +01:00
intrinsic.rs renamed mk_nil to mk_unit 2018-09-10 11:07:13 +09:00
lib.rs Bump to 1.31.0 and bootstrap from 1.30 beta 2018-09-27 20:52:53 -07:00
llvm_util.rs Auto merge of #53878 - alexcrichton:wasm-atomics-feature, r=eddyb 2018-09-05 13:19:19 +00:00
metadata.rs Move path2cstr to rustc_fs_util 2018-08-09 10:00:25 -06:00
meth.rs Make globals with private linkage unnamed. Fixes #50862. 2018-07-31 23:45:18 -04:00
mono_item.rs AMDGPU ignores noinline when it slaps alwaysinline everywhere. 2018-08-23 14:30:57 -05:00
README.md Rename trans to codegen everywhere. 2018-05-17 15:08:30 +03:00
type_.rs Introduce SmallCStr and use it where applicable. 2018-08-10 11:13:00 +02:00
type_of.rs Do not put noalias annotations by default 2018-09-29 13:00:41 +03:00
value.rs rustc_codegen_llvm: use safe references for Value. 2018-07-30 19:49:18 +03:00

The codegen crate contains the code to convert from MIR into LLVM IR, and then from LLVM IR into machine code. In general it contains code that runs towards the end of the compilation process.

For more information about how codegen works, see the rustc guide.