From 4d13a435900c6668760b6099a998c41fa1fb1717 Mon Sep 17 00:00:00 2001 From: gingerBill Date: Thu, 25 Feb 2021 00:39:44 +0000 Subject: Enforce -llvm-api on Mac M1 --- src/main.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'src/main.cpp') 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)) { -- cgit v1.2.3