mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-05 07:08:48 +00:00
Merge pull request #1671 from colrdavidson/add_nocrt
Make no crt work on Linux
This commit is contained in:
@@ -30,4 +30,4 @@ when ODIN_BUILD_MODE == .Dynamic {
|
|||||||
#force_no_inline _cleanup_runtime()
|
#force_no_inline _cleanup_runtime()
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -436,6 +436,10 @@ i32 linker_stage(lbGenerator *gen) {
|
|||||||
String output_ext = {};
|
String output_ext = {};
|
||||||
gbString link_settings = gb_string_make_reserve(heap_allocator(), 32);
|
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
|
// 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
|
// other runtime and compiler support libraries that need to be linked in
|
||||||
// very specific orders such as libgcc_s, ld-linux-so, unwind, etc.
|
// very specific orders such as libgcc_s, ld-linux-so, unwind, etc.
|
||||||
|
|||||||
Reference in New Issue
Block a user