Skip to content

Commit a56708a

Browse files
Special case for apple as well
Apple also doesn't seem to play nicely with clang_jl?
1 parent f8a69b2 commit a56708a

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/StaticCompiler.jl

+7-1
Original file line numberDiff line numberDiff line change
@@ -324,7 +324,13 @@ function generate_executable(funcs::Union{Array,Tuple}, path=tempname(), name=fi
324324
close(f)
325325
if llvm_to_clang # (required on Windows)
326326
# Use clang (llc) to generate an executable from the LLVM IR
327-
cclang = Sys.iswindows() ? `cmd \c clang` : clang() # This could be removed if clang_jll reliably works on windows
327+
cclang = if Sys.iswindows()
328+
`cmd \c clang` # Not clear if the `cmd \c` is necessary
329+
elseif Sys.isapple()
330+
`clang`
331+
else
332+
clang()
333+
end
328334
run(`$cclang -Wno-override-module $wrapper_path $obj_or_ir_path -o $exec_path`)
329335
else
330336
run(`$cc $wrapper_path $cflags $obj_or_ir_path -o $exec_path`)

0 commit comments

Comments
 (0)