rust/src/test
Alex Crichton ef89cc8f04 Store LLVM bitcode in object files, not compressed
This commit is an attempted resurrection of #70458 where LLVM bitcode
emitted by rustc into rlibs is stored into object file sections rather
than in a separate file. The main rationale for doing this is that when
rustc emits bitcode it will no longer use a custom compression scheme
which makes it both easier to interoperate with existing tools and also
cuts down on compile time since this compression isn't happening.

The blocker for this in #70458 turned out to be that native linkers
didn't handle the new sections well, causing the sections to either
trigger bugs in the linker or actually end up in the final linked
artifact. This commit attempts to address these issues by ensuring that
native linkers ignore the new sections by inserting custom flags with
module-level inline assembly.

Note that this does not currently change the API of the compiler at all.
The pre-existing `-C bitcode-in-rlib` flag is co-opted to indicate
whether the bitcode should be present in the object file or not.

Finally, note that an important consequence of this commit, which is also
one of its primary purposes, is to enable rustc's `-Clto` bitcode
loading to load rlibs produced with `-Clinker-plugin-lto`. The goal here
is that when you're building with LTO Cargo will tell rustc to skip
codegen of all intermediate crates and only generate LLVM IR. Today
rustc will generate both object code and LLVM IR, but the object code is
later simply thrown away, wastefully.
2020-04-29 11:57:26 -07:00
..
assembly
auxiliary Auto merge of #68452 - msizanoen1:riscv-abi, r=nagisa,eddyb 2020-02-08 18:10:48 +00:00
codegen Fix codegen and mir-opt tests 2020-04-20 21:18:20 +02:00
codegen-units Keep codegen units unmerged when building compiler builtins 2020-04-06 00:00:00 +00:00
compile-fail typeck: workaround WF hole in to_const. 2020-04-14 19:31:31 +03:00
debuginfo Update the minimum external LLVM to 8 2020-04-14 12:44:41 -07:00
incremental const prop: don't special case return place 2020-04-20 21:18:20 +02:00
mir-opt Bless 32-bit test output 2020-04-20 21:18:20 +02:00
pretty Update tests to use llvm_asm! 2020-03-26 15:49:22 +00:00
run-fail better lint names 2020-02-18 22:49:47 +01:00
run-make Auto merge of #67878 - Others:opt-3, r=Mark-Simulacrum 2020-01-31 00:03:55 +00:00
run-make-fulldeps Auto merge of #71023 - mati865:mingw-unwind-linking-cleanup, r=Amanieu 2020-04-13 00:59:36 +00:00
run-pass-valgrind
rustdoc Fix show-const-contents rustdoc test 2020-04-20 23:38:07 +02:00
rustdoc-js Add tests for struct variant field in search 2020-02-02 19:18:31 +01:00
rustdoc-js-std Add tests for new of variables 2020-03-16 18:30:26 +01:00
rustdoc-ui Moving all rustdoc-ui tests to check-pass 2020-04-19 16:40:53 -07:00
rustfix
ui Store LLVM bitcode in object files, not compressed 2020-04-29 11:57:26 -07:00
ui-fulldeps rustc: Add a warning count upon completion 2020-04-11 16:15:24 +02:00
COMPILER_TESTS.md rust-lang.github.io/rustc-dev-guide -> rustc-dev-guide.rust-lang.org 2020-03-10 17:08:18 -03:00