zig

fork of https://codeberg.org/ziglang/zig
Log | Files | Refs | README | LICENSE

commit 3ec37c979ec6ad3e375b391791dff2fbc0a7dddf (tree)
parent 13259acbc3a9bf87db7245daf8132a7194264c51
Author: LemonBoy <thatlemon@gmail.com>
Date:   Tue, 28 Jan 2020 21:10:03 +0100

Build compiler_rt/c with optimizations if possible

Diffstat:
Msrc/link.cpp | 13+++++++++++++
1 file changed, 13 insertions(+), 0 deletions(-)

diff --git a/src/link.cpp b/src/link.cpp @@ -1502,6 +1502,19 @@ static Buf *build_a_raw(CodeGen *parent_gen, const char *aname, Buf *full_path, new_link_lib->provided_explicitly = parent_gen->libc_link_lib->provided_explicitly; } + // Override the inherited build mode parameter + if (!parent_gen->is_test_build) { + switch (parent_gen->build_mode) { + case BuildModeDebug: + case BuildModeFastRelease: + case BuildModeSafeRelease: + child_gen->build_mode = BuildModeFastRelease; + break; + case BuildModeSmallRelease: + break; + } + } + child_gen->function_sections = true; child_gen->want_stack_check = WantStackCheckDisabled;