aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorgingerBill <gingerBill@users.noreply.github.com>2022-03-30 12:58:12 +0100
committerGitHub <noreply@github.com>2022-03-30 12:58:12 +0100
commitabf0fd7efccdb3e85381261c4c69b058d8289f2d (patch)
treeba7463d5210c21d1736000f94246b3c40a1fe7f2 /src
parenta3c81374bebedf87374e0e15ffda3cae0e2d8cfe (diff)
parenta632db361849f80b888faf282b1b95c43ec37432 (diff)
Merge pull request #1671 from colrdavidson/add_nocrt
Make no crt work on Linux
Diffstat (limited to 'src')
-rw-r--r--src/main.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/main.cpp b/src/main.cpp
index 905571f44..9e470923d 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -436,6 +436,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.