diff --git a/llvm-backend/src/main/java/org/kframework/backend/llvm/LLVMBackend.java b/llvm-backend/src/main/java/org/kframework/backend/llvm/LLVMBackend.java index ef6b1d4246c..42df5042047 100644 --- a/llvm-backend/src/main/java/org/kframework/backend/llvm/LLVMBackend.java +++ b/llvm-backend/src/main/java/org/kframework/backend/llvm/LLVMBackend.java @@ -143,9 +143,6 @@ private void llvmKompile(String type, String executable) { args.add("--mutable-bytes"); } - // Arguments after this point are passed on to Clang. - args.add("--"); - if (options.debug) { args.add("-g"); args.add("-O1"); @@ -171,6 +168,9 @@ private void llvmKompile(String type, String executable) { args.add("-O2"); // clang -O3 does not make the llvm backend any faster } + // Arguments after this point are passed on to Clang. + args.add("--"); + args.addAll(options.ccopts); if (globalOptions.verbose) {