Procházet zdrojové kódy

Merge branch 'master' of https://github.com/odin-lang/Odin

gingerBill před 3 roky
rodič
revize
5f3bfa66c5
2 změnil soubory, kde provedl 5 přidání a 1 odebrání
  1. 1 1
      core/runtime/entry_unix.odin
  2. 4 0
      src/main.cpp

+ 1 - 1
core/runtime/entry_unix.odin

@@ -30,4 +30,4 @@ when ODIN_BUILD_MODE == .Dynamic {
 		#force_no_inline _cleanup_runtime()
 		return 0
 	}
-}
+}

+ 4 - 0
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.