diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2021-01-22 23:36:30 -0700 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2021-01-23 18:18:07 -0700 |
| commit | 0d4b6ac7417d1094ac972981b0241444ce2380ba (patch) | |
| tree | 52afdf98a47470a20067188fcd7b6a85dff61675 /lib/std/Thread | |
| parent | ab4f3aee3da8f2658c019c05de2cce991d010f01 (diff) | |
| download | zig-0d4b6ac7417d1094ac972981b0241444ce2380ba.tar.gz zig-0d4b6ac7417d1094ac972981b0241444ce2380ba.zip | |
add LTO support
The CLI gains -flto and -fno-lto options to override the default.
However, the cool thing about this is that the defaults are great! In
general when you use build-exe in release mode, Zig will enable LTO if
it would work and it would help.
zig cc supports detecting and honoring the -flto and -fno-lto flags as
well. The linkWithLld functions are improved to all be the same with
regards to copying the artifact instead of trying to pass single objects
through LLD with -r. There is possibly a future improvement here as
well; see the respective TODOs.
stage1 is updated to support outputting LLVM bitcode instead of machine
code when lto is enabled. This allows LLVM to optimize across the Zig and
C/C++ code boundary.
closes #2845
Diffstat (limited to 'lib/std/Thread')
0 files changed, 0 insertions, 0 deletions
