Build compiler_rt/c with optimizations if possible

master
LemonBoy 2020-01-28 21:10:03 +01:00 committed by Andrew Kelley
parent 13259acbc3
commit 3ec37c979e
1 changed files with 13 additions and 0 deletions

View File

@ -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;