diff options
| author | Mazdak Farrokhzad <twingoow@gmail.com> | 2019-02-13 04:36:59 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-02-13 04:36:59 +0100 |
| commit | 1c1d2e44c53b578b99d1ec34a1a6e69c5386fe4d (patch) | |
| tree | da6973fc442f652f2e9d6fd534ec396b27f4cd0a /src/rustllvm/RustWrapper.cpp | |
| parent | 0ab1057a56097e73f26a1c27b4fc05b551b5737a (diff) | |
| parent | 3a9d171b0a118d8f0ecda1bf44775ec4ba9bb79d (diff) | |
| download | rust-1c1d2e44c53b578b99d1ec34a1a6e69c5386fe4d.tar.gz rust-1c1d2e44c53b578b99d1ec34a1a6e69c5386fe4d.zip | |
Rollup merge of #58057 - michaelwoerister:stabilize-xlto, r=alexcrichton
Stabilize linker-plugin based LTO (aka cross-language LTO) This PR stabilizes [linker plugin based LTO](https://github.com/rust-lang/rust/issues/49879), also known as "cross-language LTO" because it allows for doing inlining and other optimizations across language boundaries in mixed Rust/C/C++ projects. As described in the tracking issue, it works by making `rustc` emit LLVM bitcode instead of machine code, the same as `clang` does. A linker with the proper plugin (like LLD) can then run (Thin)LTO across all modules. The feature has been implemented over a number of pull requests and there are various [codegen](https://github.com/rust-lang/rust/blob/master/src/test/codegen/no-dllimport-w-cross-lang-lto.rs) and [run](https://github.com/rust-lang/rust/tree/master/src/test/run-make-fulldeps/cross-lang-lto-clang)-[make](https://github.com/rust-lang/rust/tree/master/src/test/run-make-fulldeps/cross-lang-lto-upstream-rlibs) [tests](https://github.com/rust-lang/rust/tree/master/src/test/run-make-fulldeps/cross-lang-lto) that make sure that it keeps working. It also works for building big projects like [Firefox](https://treeherder.mozilla.org/#/jobs?repo=try&revision=2ce2d5ddcea6fbff790503eac406954e469b2f5d). The PR makes the feature available under the `-C linker-plugin-lto` flag. As discussed in the tracking issue it is not cross-language specific and also not LLD specific. `-C linker-plugin-lto` is descriptive of what it does. If someone has a better name, let me know `:)`
Diffstat (limited to 'src/rustllvm/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions
