Skip to content

Commit

Permalink
Special case for apple as well
Browse files Browse the repository at this point in the history
Apple also doesn't seem to play nicely with clang_jl?
  • Loading branch information
brenhinkeller authored Mar 4, 2024
1 parent f8a69b2 commit a56708a
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/StaticCompiler.jl
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,13 @@ function generate_executable(funcs::Union{Array,Tuple}, path=tempname(), name=fi
close(f)
if llvm_to_clang # (required on Windows)
# Use clang (llc) to generate an executable from the LLVM IR
cclang = Sys.iswindows() ? `cmd \c clang` : clang() # This could be removed if clang_jll reliably works on windows
cclang = if Sys.iswindows()
`cmd \c clang` # Not clear if the `cmd \c` is necessary
elseif Sys.isapple()
`clang`
else
clang()
end
run(`$cclang -Wno-override-module $wrapper_path $obj_or_ir_path -o $exec_path`)
else
run(`$cc $wrapper_path $cflags $obj_or_ir_path -o $exec_path`)
Expand Down

0 comments on commit a56708a

Please sign in to comment.