Skip to content

Commit f8a69b2

Browse files
fix passthrough of kwargs
1 parent 81534ef commit f8a69b2

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/StaticCompiler.jl

+4-3
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ compile_executable(f::Function, types::Tuple, path::String, [name::String=string
3535
cflags=``, # Specify libraries you would like to link against, and other compiler options here
3636
also_expose=[],
3737
target::StaticTarget=StaticTarget(),
38+
llvm_to_clang = Sys.iswindows(),
3839
method_table=StaticCompiler.method_table,
3940
kwargs...
4041
)
@@ -109,6 +110,7 @@ function compile_executable(funcs::Union{Array,Tuple}, path::String=pwd(), name=
109110
demangle = true,
110111
cflags = ``,
111112
target::StaticTarget=StaticTarget(),
113+
llvm_to_clang = Sys.iswindows(),
112114
kwargs...
113115
)
114116

@@ -122,7 +124,7 @@ function compile_executable(funcs::Union{Array,Tuple}, path::String=pwd(), name=
122124
nativetype = isprimitivetype(rt) || isa(rt, Ptr)
123125
nativetype || @warn "Return type `$rt` of `$f$types` does not appear to be a native type. Consider returning only a single value of a native machine type (i.e., a single float, int/uint, bool, or pointer). \n\nIgnoring this warning may result in Undefined Behavior!"
124126

125-
generate_executable(funcs, path, name, filename; demangle, cflags, target, kwargs...)
127+
generate_executable(funcs, path, name, filename; demangle, cflags, target, llvm_to_clang, kwargs...)
126128
joinpath(abspath(path), filename)
127129
end
128130

@@ -293,8 +295,7 @@ function generate_executable(funcs::Union{Array,Tuple}, path=tempname(), name=fi
293295
kwargs...
294296
)
295297
exec_path = joinpath(path, filename)
296-
llvm_only = llvm_to_clang
297-
_, obj_or_ir_path = generate_obj(funcs, path, filename; demangle, target, llvm_only, kwargs...)
298+
_, obj_or_ir_path = generate_obj(funcs, path, filename; demangle, target, llvm_only=llvm_to_clang, kwargs...)
298299
# Pick a compiler
299300
if !isnothing(target.compiler)
300301
cc = `$(target.compiler)`

0 commit comments

Comments
 (0)