aboutsummaryrefslogtreecommitdiff
path: root/src/llvm_backend.cpp
diff options
context:
space:
mode:
authorYhya Ibrahim <yhyamobile57@gmail.com>2025-10-11 15:26:01 +0300
committerYhya Ibrahim <yhyamobile57@gmail.com>2025-10-11 15:26:01 +0300
commita672c68f03223efcab8f487d1bef05edaf5cf266 (patch)
tree87607edec7c878eacbcb426724a578f7cf1cd7aa /src/llvm_backend.cpp
parent767098257eb5a6b4bc388ff3d21217f99292fbb9 (diff)
Make `-target-features` flag support disabling of a feature
Diffstat (limited to 'src/llvm_backend.cpp')
-rw-r--r--src/llvm_backend.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/llvm_backend.cpp b/src/llvm_backend.cpp
index c2decf091..9256acbb2 100644
--- a/src/llvm_backend.cpp
+++ b/src/llvm_backend.cpp
@@ -3055,7 +3055,10 @@ gb_internal bool lb_generate_code(lbGenerator *gen) {
}
first = false;
- llvm_features = gb_string_appendc(llvm_features, "+");
+ if (*str.text != '+' && *str.text != '-') {
+ llvm_features = gb_string_appendc(llvm_features, "+");
+ }
+
llvm_features = gb_string_append_length(llvm_features, str.text, str.len);
}