diff options
| author | Ziv Dunkelman <ziv.dunkelman@nextsilicon.com> | 2022-06-08 17:30:16 +0300 |
|---|---|---|
| committer | Ziv Dunkelman <ziv.dunkelman@nextsilicon.com> | 2022-07-14 22:21:26 +0300 |
| commit | 724c91234dd49b88d70ebead406d09105695c3e5 (patch) | |
| tree | 9ec0f63fb06cfab879d0939d3e467d63decffa59 /compiler/rustc_codegen_ssa/src | |
| parent | 0ed9c64c3e63acac9bd77abce62501696c390450 (diff) | |
| download | rust-724c91234dd49b88d70ebead406d09105695c3e5.tar.gz rust-724c91234dd49b88d70ebead406d09105695c3e5.zip | |
rustc: add ability to output regular LTO bitcode modules
Adding the option to control from rustc CLI if the resulted ".o" bitcode module files are with thinLTO info or regular LTO info. Allows using "-lto-embed-bitcode=optimized" during linkage correctly. Signed-off-by: Ziv Dunkelman <ziv.dunkelman@nextsilicon.com>
Diffstat (limited to 'compiler/rustc_codegen_ssa/src')
| -rw-r--r-- | compiler/rustc_codegen_ssa/src/back/write.rs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/compiler/rustc_codegen_ssa/src/back/write.rs b/compiler/rustc_codegen_ssa/src/back/write.rs index c2ac21eec67..ea60f6055f3 100644 --- a/compiler/rustc_codegen_ssa/src/back/write.rs +++ b/compiler/rustc_codegen_ssa/src/back/write.rs @@ -99,6 +99,7 @@ pub struct ModuleConfig { pub emit_ir: bool, pub emit_asm: bool, pub emit_obj: EmitObj, + pub emit_thin_lto: bool, pub bc_cmdline: String, // Miscellaneous flags. These are mostly copied from command-line @@ -218,6 +219,7 @@ impl ModuleConfig { false ), emit_obj, + emit_thin_lto: sess.opts.unstable_opts.emit_thin_lto, bc_cmdline: sess.target.bitcode_llvm_cmdline.to_string(), verify_llvm_ir: sess.verify_llvm_ir(), |
