| ... | @@ -1502,6 +1502,19 @@ static Buf *build_a_raw(CodeGen *parent_gen, const char *aname, Buf *full_path, | ... | @@ -1502,6 +1502,19 @@ static Buf *build_a_raw(CodeGen *parent_gen, const char *aname, Buf *full_path, |
| 1502 | new_link_lib->provided_explicitly = parent_gen->libc_link_lib->provided_explicitly; | 1502 | new_link_lib->provided_explicitly = parent_gen->libc_link_lib->provided_explicitly; |
| 1503 | } | 1503 | } |
| 1504 | | 1504 | |
| | 1505 | // Override the inherited build mode parameter |
| | 1506 | if (!parent_gen->is_test_build) { |
| | 1507 | switch (parent_gen->build_mode) { |
| | 1508 | case BuildModeDebug: |
| | 1509 | case BuildModeFastRelease: |
| | 1510 | case BuildModeSafeRelease: |
| | 1511 | child_gen->build_mode = BuildModeFastRelease; |
| | 1512 | break; |
| | 1513 | case BuildModeSmallRelease: |
| | 1514 | break; |
| | 1515 | } |
| | 1516 | } |
| | 1517 | |
| 1505 | child_gen->function_sections = true; | 1518 | child_gen->function_sections = true; |
| 1506 | child_gen->want_stack_check = WantStackCheckDisabled; | 1519 | child_gen->want_stack_check = WantStackCheckDisabled; |
| 1507 | | 1520 | |