about summary refs log tree commit diff
path: root/src/librustc_codegen_llvm/back
AgeCommit message (Collapse)AuthorLines
2018-07-11Deny bare trait objects in in src/librustc_codegen_llvmljedrz-24/+24
2018-07-10Upgrade to LLVM's master branch (LLVM 7)Alex Crichton-47/+38
This commit upgrades the main LLVM submodule to LLVM's current master branch. The LLD submodule is updated in tandem as well as compiler-builtins. Along the way support was also added for LLVM 7's new features. This primarily includes the support for custom section concatenation natively in LLD so we now add wasm custom sections in LLVM IR rather than having custom support in rustc itself for doing so. Some other miscellaneous changes are: * We now pass `--gc-sections` to `wasm-ld` * The optimization level is now passed to `wasm-ld` * A `--stack-first` option is passed to LLD to have stack overflow always cause a trap instead of corrupting static data * The wasm target for LLVM switched to `wasm32-unknown-unknown`. * The syntax for aligned pointers has changed in LLVM IR and tests are updated to reflect this. * The `thumbv6m-none-eabi` target is disabled due to an [LLVM bug][llbug] Nowadays we've been mostly only upgrading whenever there's a major release of LLVM but enough changes have been happening on the wasm target that there's been growing motivation for quite some time now to upgrade out version of LLD. To upgrade LLD, however, we need to upgrade LLVM to avoid needing to build yet another version of LLVM on the builders. The revision of LLVM in use here is arbitrarily chosen. We will likely need to continue to update it over time if and when we discover bugs. Once LLVM 7 is fully released we can switch to that channel as well. [llbug]: https://bugs.llvm.org/show_bug.cgi?id=37382
2018-07-07Auto merge of #52109 - michaelwoerister:ir-objs, r=alexcrichtonbors-6/+5
When doing linker-plugin based LTO, write LLVM bitcode obj-files instead of embedding the bitcode into the regular object file. This PR makes the compiler emit LLVM bitcode object files instead of regular object files with the IR embed when compiling for linker-plugin-based LTO. The reasoning for switching the strategy is this: - Embedding bitcode in a section of the object file actually makes us save bitcode twice in rlibs and Rust dylibs, once for linker-based LTO and once for rustc-based LTO. That's a waste of space. - When compiling for plugin-based LTO, one usually has no use for the machine code also present in the object file. Generating it is a waste of time. - When compiling for plugin-based LTO, `rustc` will skip running ThinLTO because the linker will do that anyway. This has the side effect of then generating poorly optimized machine code, which makes it even less useful (and may lead to users not knowing why their code is slow instead of getting an error). - Not having machine code available makes it impossible for the linker to silently fall back to not inlining stuff across language boundaries. - This is what Clang does and according to [the documentation](https://llvm.org/docs/BitCodeFormat.html#native-object-file-wrapper-format) is the better supported option. - The current behavior (minus the runtime performance problems) is still available via `-Z embed-bitcode` (we might want to do this for `libstd` at some point). r? @alexcrichton
2018-07-06Remove CrossLangLto::NoLink which does not have a use case anymore.Michael Woerister-2/+1
2018-07-06When doing linker-plugin based LTO, write LLVM bitcode obj-filesMichael Woerister-4/+4
instead of embedding the bitcode into the regular object file.
2018-07-06Rollup merge of #52055 - crlf0710:patch-3, r=Mark-Simulacrumkennytm-2/+2
Include VS 2017 in error message. Update error prompt message to indicate that VS 2017 is supported (for a while now).
2018-07-04Shorten the lineCrLF0710-2/+2
Shorten the line to make tidy happy.
2018-07-04Include VS 2017 in error message.CrLF0710-1/+1
Update error prompt message to indicate that VS 2017 is supported (for a while now).
2018-07-03Allow the linker to choose the LTO-plugin (which is useful when using LLD)Michael Woerister-25/+36
2018-06-27Make opaque::Encoder append-only and make it infallibleJohn Kåre Alsaker-2/+1
2018-06-20Fix tidyBastien Orivel-1/+4
2018-06-20Replace tempdir by tempfile in librustc_transBastien Orivel-3/+3
2018-06-14rustc: rename ty::maps to ty::query.Eduard-Mihai Burtescu-1/+1
2018-06-12Rename -Z no-verify to -Z verify-llvm-irNikita Popov-6/+6
This disables IR verification by default.
2018-06-12Respect -Z no-verify during LTONikita Popov-7/+12
Currently -Z no-verify only controls IR verification prior to LLVM codegen, while verification is performed unconditionally both before and after linking with (Thin)LTO.
2018-05-31musl: don't use the included startfiles with -crt-staticJohannes Nixdorf-0/+16
This fixes (only for -crt-static) #36710.
2018-05-22Add -Z no-parallel-llvm flagNikita Popov-2/+6
Codegen issues commonly only manifest under specific circumstances, e.g. if multiple codegen units are used and ThinLTO is enabled. However, these configuration are threaded, making the use of LLVM debugging facilities hard, as output is interleaved. This patch adds a -Z no-parallel-llvm flag, which allows disabling parallelization of codegen and linking, while otherwise preserving behavior with regard to codegen units and LTO.
2018-05-17Revert "musl: don't use the included startfiles with -crt-static"Alex Crichton-16/+0
This reverts commit a5a875d17b34b61326d803eb2edea526d3bd6914.
2018-05-17Revert "musl: link crt{begin,end}.o from the system compiler"Alex Crichton-11/+0
This reverts commit 6d9154a830dd9773fe8a4e34e1fc3dfb1ca6f935.
2018-05-17Rename trans to codegen everywhere.Irina Popa-0/+7429