From 00161023cda147daa5638539df5d46fb18aebfa6 Mon Sep 17 00:00:00 2001 From: gingerBill Date: Sun, 2 Dec 2018 15:53:52 +0000 Subject: Endian specific integers: e.g. i32 i32le i32be --- src/build_settings.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/build_settings.cpp') diff --git a/src/build_settings.cpp b/src/build_settings.cpp index e8c872c0a..b30ad7527 100644 --- a/src/build_settings.cpp +++ b/src/build_settings.cpp @@ -80,6 +80,8 @@ struct BuildContext { String ODIN_ROOT; // Odin ROOT bool ODIN_DEBUG; // Odin in debug mode + TargetEndianKind endian_kind; + // In bytes i64 word_size; // Size of a pointer, must be >= 4 i64 max_align; // max alignment, must be >= 1 (and typically >= word_size) @@ -539,6 +541,7 @@ void init_build_context(void) { bc->ODIN_OS = target_os_names[metrics.os]; bc->ODIN_ARCH = target_arch_names[metrics.arch]; bc->ODIN_ENDIAN = target_endian_names[target_endians[metrics.arch]]; + bc->endian_kind = target_endians[metrics.arch]; bc->word_size = metrics.word_size; bc->max_align = metrics.max_align; bc->link_flags = str_lit(" "); -- cgit v1.2.3