diff options
| author | Nakst <djnakst2@gmail.com> | 2017-11-26 11:03:11 +0000 |
|---|---|---|
| committer | Nakst <djnakst2@gmail.com> | 2017-11-26 11:03:11 +0000 |
| commit | b0d3fbba4761aff3dfc3bcded3da7000699a7766 (patch) | |
| tree | 0e01e8d853324dad51addbd416c1fe8156c097a3 /src/build_settings.cpp | |
| parent | adb6c7637e8748b19e550e45cba42d1155657249 (diff) | |
essence cross compile
Diffstat (limited to 'src/build_settings.cpp')
| -rw-r--r-- | src/build_settings.cpp | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/build_settings.cpp b/src/build_settings.cpp index 496de46ba..95c418839 100644 --- a/src/build_settings.cpp +++ b/src/build_settings.cpp @@ -309,6 +309,8 @@ String get_fullpath_core(gbAllocator a, String path) { String const ODIN_VERSION = str_lit("0.7.1"); +String cross_compile_target = str_lit(""); +String cross_compile_lib_dir = str_lit(""); void init_build_context(void) { BuildContext *bc = &build_context; @@ -330,6 +332,10 @@ void init_build_context(void) { bc->ODIN_OS = str_lit("linux"); #endif + if (cross_compile_target.len) { + bc->ODIN_OS = cross_compile_target; + } + #if defined(GB_ARCH_64_BIT) bc->ODIN_ARCH = str_lit("amd64"); #else @@ -376,7 +382,11 @@ void init_build_context(void) { bc->max_align = 16; bc->llc_flags = str_lit("-march=x86-64 "); - bc->link_flags = str_lit(LINK_FLAG_X64 " "); + if (str_eq_ignore_case(cross_compile_target, str_lit("Essence"))) { + bc->link_flags = str_lit(" "); + } else { + bc->link_flags = str_lit(LINK_FLAG_X64 " "); + } } else if (bc->ODIN_ARCH == "x86") { bc->word_size = 4; bc->max_align = 8; |