mirror of
https://github.com/Ed94/Odin.git
synced 2026-07-17 16:31:25 -07:00
Make ODIN_BUILD_MODE a enum type
This commit is contained in:
@@ -386,6 +386,19 @@ Raw_Cstring :: struct {
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
// Defined internally by the compiler
|
||||
Odin_Build_Mode_Type :: enum int {
|
||||
Executable,
|
||||
Dynamic,
|
||||
Object,
|
||||
Assembly,
|
||||
LLVM_IR,
|
||||
}
|
||||
*/
|
||||
Odin_Build_Mode_Type :: type_of(ODIN_BUILD_MODE)
|
||||
|
||||
|
||||
/////////////////////////////
|
||||
// Init Startup Procedures //
|
||||
/////////////////////////////
|
||||
|
||||
@@ -4,7 +4,7 @@ package runtime
|
||||
|
||||
import "core:intrinsics"
|
||||
|
||||
when ODIN_BUILD_MODE == "dynamic" {
|
||||
when ODIN_BUILD_MODE == .Dynamic {
|
||||
@(link_name="_odin_entry_point", linkage="strong", require, link_section=".init")
|
||||
_odin_entry_point :: proc "c" () {
|
||||
context = default_context()
|
||||
|
||||
@@ -4,7 +4,7 @@ package runtime
|
||||
|
||||
import "core:intrinsics"
|
||||
|
||||
when ODIN_BUILD_MODE == "dynamic" {
|
||||
when ODIN_BUILD_MODE == .Dynamic {
|
||||
@(link_name="DllMain", linkage="strong", require)
|
||||
DllMain :: proc "stdcall" (hinstDLL: rawptr, fdwReason: u32, lpReserved: rawptr) -> b32 {
|
||||
context = default_context()
|
||||
|
||||
@@ -8,7 +8,7 @@ IS_WASM :: ODIN_ARCH == "wasm32" || ODIN_ARCH == "wasm64"
|
||||
@(private)
|
||||
RUNTIME_LINKAGE :: "strong" when (
|
||||
(ODIN_USE_SEPARATE_MODULES ||
|
||||
ODIN_BUILD_MODE == "dynamic" ||
|
||||
ODIN_BUILD_MODE == .Dynamic ||
|
||||
!ODIN_NO_CRT) &&
|
||||
!IS_WASM) else "internal"
|
||||
RUNTIME_REQUIRE :: true
|
||||
|
||||
Reference in New Issue
Block a user