diff options
| author | gingerBill <bill@gingerbill.org> | 2021-04-25 19:49:29 +0100 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2021-04-25 19:49:29 +0100 |
| commit | 66a70b9d273509b5f4d827ec0a5de66810b10e00 (patch) | |
| tree | eed7438cf495085431d27f74f1f9c8135956d2de /src/main.cpp | |
| parent | cd125c0f416af055bc9fadc2fb46f7b8865f87ad (diff) | |
Remove the need for `LLVM_BACKEND_SUPPORT`
Diffstat (limited to 'src/main.cpp')
| -rw-r--r-- | src/main.cpp | 18 |
1 files changed, 3 insertions, 15 deletions
diff --git a/src/main.cpp b/src/main.cpp index 3753a6cb9..16863caeb 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -10,13 +10,11 @@ gb_global Timings global_timings = {0}; -#if defined(LLVM_BACKEND_SUPPORT) #if defined(GB_SYSTEM_WINDOWS) #include "llvm-c/Types.h" #else #include <llvm-c/Types.h> #endif -#endif #include "parser.hpp" #include "checker.hpp" @@ -26,7 +24,6 @@ gb_global Timings global_timings = {0}; #include "docs.cpp" -#if defined(LLVM_BACKEND_SUPPORT) #include "llvm_backend.cpp" #if defined(GB_SYSTEM_OSX) @@ -36,8 +33,6 @@ gb_global Timings global_timings = {0}; #endif #endif -#endif - #include "ir.cpp" #include "ir_opt.cpp" #include "ir_print.cpp" @@ -154,7 +149,6 @@ i32 system_exec_command_line_app(char const *name, char const *fmt, ...) { -#if defined(LLVM_BACKEND_SUPPORT) i32 linker_stage(lbGenerator *gen) { i32 result = 0; Timings *timings = &global_timings; @@ -470,7 +464,6 @@ i32 linker_stage(lbGenerator *gen) { return result; } -#endif Array<String> setup_args(int argc, char const **argv) { gbAllocator a = heap_allocator(); @@ -2190,7 +2183,6 @@ int main(int arg_count, char const **arg_ptr) { } if (build_context.use_llvm_api) { -#if defined(LLVM_BACKEND_SUPPORT) timings_start_section(timings, str_lit("LLVM API Code Gen")); lbGenerator gen = {}; if (!lb_init_generator(&gen, &checker)) { @@ -2204,9 +2196,9 @@ int main(int arg_count, char const **arg_ptr) { case BuildMode_Executable: case BuildMode_DynamicLibrary: i32 result = linker_stage(&gen); - if(result != 0) { - return 1; - } + if (result != 0) { + return 1; + } break; } @@ -2257,10 +2249,6 @@ int main(int arg_count, char const **arg_ptr) { } return 0; -#else - gb_printf_err("LLVM C API backend is not supported on this platform yet\n"); - return 1; -#endif } else { irGen ir_gen = {0}; if (!ir_gen_init(&ir_gen, &checker)) { |