diff options
| author | Colin Davidson <colrdavidson@gmail.com> | 2022-03-30 04:45:22 -0700 |
|---|---|---|
| committer | Colin Davidson <colrdavidson@gmail.com> | 2022-03-30 04:45:22 -0700 |
| commit | a632db361849f80b888faf282b1b95c43ec37432 (patch) | |
| tree | 56a1f3e103a8874609a1214e4cb0c71cdb55d3c4 /src/main.cpp | |
| parent | 4474144c24d30cce896f4a8a562ad14cf5be96b6 (diff) | |
Make no crt work on Linux
Diffstat (limited to 'src/main.cpp')
| -rw-r--r-- | src/main.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/main.cpp b/src/main.cpp index 63b2c8386..383997719 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -433,6 +433,10 @@ i32 linker_stage(lbGenerator *gen) { String output_ext = {}; gbString link_settings = gb_string_make_reserve(heap_allocator(), 32); + if (build_context.no_crt) { + link_settings = gb_string_append_fmt(link_settings, "-nostdlib "); + } + // NOTE(dweiler): We use clang as a frontend for the linker as there are // other runtime and compiler support libraries that need to be linked in // very specific orders such as libgcc_s, ld-linux-so, unwind, etc. |