aboutsummaryrefslogtreecommitdiff
path: root/src/llvm_backend.cpp
diff options
context:
space:
mode:
authorJeroen van Rijn <Kelimion@users.noreply.github.com>2024-09-10 22:15:06 +0200
committerGitHub <noreply@github.com>2024-09-10 22:15:06 +0200
commitfce7bcec493b4a53a101cbf41575e2a154caa902 (patch)
tree94b6d55c87788ab5779a7bac266382ce3c99a0ae /src/llvm_backend.cpp
parent036d7edda92c8d93c1295e4f2661152abe729bf1 (diff)
parent459de29a87bd400ea575e99d21297c6c288a2c35 (diff)
Merge branch 'master' into static_builds
Diffstat (limited to 'src/llvm_backend.cpp')
-rw-r--r--src/llvm_backend.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/llvm_backend.cpp b/src/llvm_backend.cpp
index f852636a6..01ded321e 100644
--- a/src/llvm_backend.cpp
+++ b/src/llvm_backend.cpp
@@ -3081,6 +3081,13 @@ gb_internal bool lb_generate_code(lbGenerator *gen) {
lbModule *m = entry.value;
m->target_machine = target_machine;
LLVMSetModuleDataLayout(m->mod, LLVMCreateTargetDataLayout(target_machine));
+
+ #if LLVM_VERSION_MAJOR >= 18
+ if (build_context.fast_isel) {
+ LLVMSetTargetMachineFastISel(m->target_machine, true);
+ }
+ #endif
+
array_add(&target_machines, target_machine);
}