Skip to content

Commit

Permalink
fix passthrough of kwargs
Browse files Browse the repository at this point in the history
  • Loading branch information
brenhinkeller authored Mar 4, 2024
1 parent 81534ef commit f8a69b2
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/StaticCompiler.jl
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ compile_executable(f::Function, types::Tuple, path::String, [name::String=string
cflags=``, # Specify libraries you would like to link against, and other compiler options here
also_expose=[],
target::StaticTarget=StaticTarget(),
llvm_to_clang = Sys.iswindows(),
method_table=StaticCompiler.method_table,
kwargs...
)
Expand Down Expand Up @@ -109,6 +110,7 @@ function compile_executable(funcs::Union{Array,Tuple}, path::String=pwd(), name=
demangle = true,
cflags = ``,
target::StaticTarget=StaticTarget(),
llvm_to_clang = Sys.iswindows(),
kwargs...
)

Expand All @@ -122,7 +124,7 @@ function compile_executable(funcs::Union{Array,Tuple}, path::String=pwd(), name=
nativetype = isprimitivetype(rt) || isa(rt, Ptr)
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!"

generate_executable(funcs, path, name, filename; demangle, cflags, target, kwargs...)
generate_executable(funcs, path, name, filename; demangle, cflags, target, llvm_to_clang, kwargs...)
joinpath(abspath(path), filename)
end

Expand Down Expand Up @@ -293,8 +295,7 @@ function generate_executable(funcs::Union{Array,Tuple}, path=tempname(), name=fi
kwargs...
)
exec_path = joinpath(path, filename)
llvm_only = llvm_to_clang
_, obj_or_ir_path = generate_obj(funcs, path, filename; demangle, target, llvm_only, kwargs...)
_, obj_or_ir_path = generate_obj(funcs, path, filename; demangle, target, llvm_only=llvm_to_clang, kwargs...)
# Pick a compiler
if !isnothing(target.compiler)
cc = `$(target.compiler)`
Expand Down

0 comments on commit f8a69b2

Please sign in to comment.