diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2021-01-24 11:09:48 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-01-24 11:09:48 -0800 |
| commit | 15278b7f4b74e659fd968571cb9b96929da3d82c (patch) | |
| tree | 52afdf98a47470a20067188fcd7b6a85dff61675 /src/stage1/codegen.cpp | |
| parent | 843d91e75d166ac41d7c9b27b86b236f14865e31 (diff) | |
| parent | 0d4b6ac7417d1094ac972981b0241444ce2380ba (diff) | |
| download | zig-15278b7f4b74e659fd968571cb9b96929da3d82c.tar.gz zig-15278b7f4b74e659fd968571cb9b96929da3d82c.zip | |
Merge pull request #7856 from ziglang/lto
add LTO support
Diffstat (limited to 'src/stage1/codegen.cpp')
| -rw-r--r-- | src/stage1/codegen.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/stage1/codegen.cpp b/src/stage1/codegen.cpp index 7a973285df..d850b3ee31 100644 --- a/src/stage1/codegen.cpp +++ b/src/stage1/codegen.cpp @@ -8449,8 +8449,9 @@ static void zig_llvm_emit_output(CodeGen *g) { // Unfortunately, LLVM shits the bed when we ask for both binary and assembly. So we call the entire // pipeline multiple times if this is requested. if (asm_filename != nullptr && bin_filename != nullptr) { - if (ZigLLVMTargetMachineEmitToFile(g->target_machine, g->module, &err_msg, g->build_mode == BuildModeDebug, - is_small, g->enable_time_report, g->tsan_enabled, nullptr, bin_filename, llvm_ir_filename)) + if (ZigLLVMTargetMachineEmitToFile(g->target_machine, g->module, &err_msg, + g->build_mode == BuildModeDebug, is_small, g->enable_time_report, g->tsan_enabled, + g->have_lto, nullptr, bin_filename, llvm_ir_filename)) { fprintf(stderr, "LLVM failed to emit file: %s\n", err_msg); exit(1); @@ -8459,8 +8460,9 @@ static void zig_llvm_emit_output(CodeGen *g) { llvm_ir_filename = nullptr; } - if (ZigLLVMTargetMachineEmitToFile(g->target_machine, g->module, &err_msg, g->build_mode == BuildModeDebug, - is_small, g->enable_time_report, g->tsan_enabled, asm_filename, bin_filename, llvm_ir_filename)) + if (ZigLLVMTargetMachineEmitToFile(g->target_machine, g->module, &err_msg, + g->build_mode == BuildModeDebug, is_small, g->enable_time_report, g->tsan_enabled, + g->have_lto, asm_filename, bin_filename, llvm_ir_filename)) { fprintf(stderr, "LLVM failed to emit file: %s\n", err_msg); exit(1); |
