mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-05 15:18:49 +00:00
Add WINDOWS_SUBSYSTEM constant bool
true when -subsystem:windows for Windows targets, false otherwise.
This commit is contained in:
+9
-10
@@ -298,6 +298,7 @@ struct BuildContext {
|
|||||||
bool ODIN_DEFAULT_TO_NIL_ALLOCATOR; // Whether the default allocator is a "nil" allocator or not (i.e. it does nothing)
|
bool ODIN_DEFAULT_TO_NIL_ALLOCATOR; // Whether the default allocator is a "nil" allocator or not (i.e. it does nothing)
|
||||||
bool ODIN_FOREIGN_ERROR_PROCEDURES;
|
bool ODIN_FOREIGN_ERROR_PROCEDURES;
|
||||||
bool ODIN_VALGRIND_SUPPORT;
|
bool ODIN_VALGRIND_SUPPORT;
|
||||||
|
bool WINDOWS_SUBSYSTEM; // True only for Windows targets with -subsystem:windows
|
||||||
|
|
||||||
ErrorPosStyle ODIN_ERROR_POS_STYLE;
|
ErrorPosStyle ODIN_ERROR_POS_STYLE;
|
||||||
|
|
||||||
@@ -1282,8 +1283,6 @@ gb_internal void init_build_context(TargetMetrics *cross_target, Subtarget subta
|
|||||||
GB_ASSERT(metrics->int_size == 2*metrics->ptr_size);
|
GB_ASSERT(metrics->int_size == 2*metrics->ptr_size);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
bc->metrics = *metrics;
|
bc->metrics = *metrics;
|
||||||
switch (subtarget) {
|
switch (subtarget) {
|
||||||
case Subtarget_Default:
|
case Subtarget_Default:
|
||||||
@@ -1300,14 +1299,14 @@ gb_internal void init_build_context(TargetMetrics *cross_target, Subtarget subta
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
bc->ODIN_OS = target_os_names[metrics->os];
|
bc->ODIN_OS = target_os_names[metrics->os];
|
||||||
bc->ODIN_ARCH = target_arch_names[metrics->arch];
|
bc->ODIN_ARCH = target_arch_names[metrics->arch];
|
||||||
bc->endian_kind = target_endians[metrics->arch];
|
bc->endian_kind = target_endians[metrics->arch];
|
||||||
bc->ptr_size = metrics->ptr_size;
|
bc->ptr_size = metrics->ptr_size;
|
||||||
bc->int_size = metrics->int_size;
|
bc->int_size = metrics->int_size;
|
||||||
bc->max_align = metrics->max_align;
|
bc->max_align = metrics->max_align;
|
||||||
bc->max_simd_align = metrics->max_simd_align;
|
bc->max_simd_align = metrics->max_simd_align;
|
||||||
bc->link_flags = str_lit(" ");
|
bc->link_flags = str_lit(" ");
|
||||||
|
|
||||||
#if defined(DEFAULT_TO_THREADED_CHECKER)
|
#if defined(DEFAULT_TO_THREADED_CHECKER)
|
||||||
bc->threaded_checker = true;
|
bc->threaded_checker = true;
|
||||||
|
|||||||
@@ -973,6 +973,8 @@ gb_internal void init_universal(void) {
|
|||||||
add_global_string_constant("ODIN_ROOT", bc->ODIN_ROOT);
|
add_global_string_constant("ODIN_ROOT", bc->ODIN_ROOT);
|
||||||
add_global_string_constant("ODIN_BUILD_PROJECT_NAME", bc->ODIN_BUILD_PROJECT_NAME);
|
add_global_string_constant("ODIN_BUILD_PROJECT_NAME", bc->ODIN_BUILD_PROJECT_NAME);
|
||||||
|
|
||||||
|
add_global_bool_constant("WINDOWS_SUBSYSTEM", bc->use_subsystem_windows);
|
||||||
|
|
||||||
{
|
{
|
||||||
GlobalEnumValue values[TargetOs_COUNT] = {
|
GlobalEnumValue values[TargetOs_COUNT] = {
|
||||||
{"Unknown", TargetOs_Invalid},
|
{"Unknown", TargetOs_Invalid},
|
||||||
|
|||||||
Reference in New Issue
Block a user