diff options
| author | gingerBill <bill@gingerbill.org> | 2018-12-02 15:53:52 +0000 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2018-12-02 15:53:52 +0000 |
| commit | 00161023cda147daa5638539df5d46fb18aebfa6 (patch) | |
| tree | b2b811d47b9306e273382f4840c6c3ae9e6099ca /src/build_settings.cpp | |
| parent | 784c48c9e36c11595b23fb0df002c063dd42a2bf (diff) | |
Endian specific integers: e.g. i32 i32le i32be
Diffstat (limited to 'src/build_settings.cpp')
| -rw-r--r-- | src/build_settings.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
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(" "); |