Skip to content

Commit

Permalink
More consistent naming of emit_llvm_only option
Browse files Browse the repository at this point in the history
  • Loading branch information
brenhinkeller authored Mar 4, 2024
1 parent bac5bbb commit 158c2ea
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/StaticCompiler.jl
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ function generate_executable(funcs::Union{Array,Tuple}, path=tempname(), name=fi
kwargs...
)
exec_path = joinpath(path, filename)
_, obj_or_ir_path = generate_obj(funcs, path, filename; demangle, target, llvm_only=llvm_to_clang, kwargs...)
_, obj_or_ir_path = generate_obj(funcs, path, filename; demangle, target, emit_llvm_only=llvm_to_clang, kwargs...)
# Pick a compiler
if !isnothing(target.compiler)
cc = `$(target.compiler)`
Expand Down Expand Up @@ -535,7 +535,7 @@ end
generate_obj(funcs::Union{Array,Tuple}, path::String = tempname(), filenamebase::String="obj";
target::StaticTarget=StaticTarget(),
demangle = false,
generate_llvm_only = false,
emit_llvm_only = false,
strip_llvm = false,
strip_asm = true,
kwargs...)
Expand All @@ -551,15 +551,15 @@ The defaults compile to the native target.
function generate_obj(funcs::Union{Array,Tuple}, path::String = tempname(), filenamebase::String="obj";
target::StaticTarget=StaticTarget(),
demangle = true,
llvm_only = false,
emit_llvm_only = false,
strip_llvm = false,
strip_asm = true,
kwargs...)
f, tt = funcs[1]
mkpath(path)
mod = static_llvm_module(funcs; demangle, kwargs...)

if llvm_only # (Required on Windows)
if emit_llvm_only # (Required on Windows)
ir_path = joinpath(path, "$filenamebase.ll")
open(ir_path, "w") do io
write(io, string(mod))
Expand Down

0 comments on commit 158c2ea

Please sign in to comment.