aboutsummaryrefslogtreecommitdiff
path: root/src/main.cpp
diff options
context:
space:
mode:
authorgingerBill <bill@gingerbill.org>2021-02-25 00:39:44 +0000
committergingerBill <bill@gingerbill.org>2021-02-25 00:39:44 +0000
commit4d13a435900c6668760b6099a998c41fa1fb1717 (patch)
treeb34bbd6d6de806e3c2a9ec616e31468504619020 /src/main.cpp
parentb2fdb53e26b431f98abec1e522b242a4be906ec2 (diff)
Enforce -llvm-api on Mac M1
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/main.cpp b/src/main.cpp
index 4545f6f21..4ab4df7be 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -1842,6 +1842,15 @@ void print_show_unused(Checker *c) {
print_usage_line(0, "");
}
+void enforce_platform_settings(void) {
+#if defined(GB_SYSTEM_OSX) && defined(GB_CPU_ARM)
+ #if defined(USE_NEW_LLVM_ABI_SYSTEM)
+ build_context.use_llvm_api = true;
+ #endif
+#endif
+}
+
+
int main(int arg_count, char const **arg_ptr) {
if (arg_count < 2) {
usage(make_string_c(arg_ptr[0]));
@@ -1995,7 +2004,7 @@ int main(int arg_count, char const **arg_ptr) {
return 0;
}
-
+ enforce_platform_settings();
// NOTE(bill): add 'shared' directory if it is not already set
if (!find_library_collection_path(str_lit("shared"), nullptr)) {