Skip to content

Commit 704933a

Browse files
authored
WebAssembly updates (#135)
1 parent 8420b4f commit 704933a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/StaticCompiler.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -380,8 +380,8 @@ function compile_wasm(funcs::Union{Array,Tuple};
380380
flags=``,
381381
kwargs...
382382
)
383-
obj_path, name = generate_obj(funcs, true; target = (triple = "wasm32-unknown-wasi", cpu = "", features = ""), remove_julia_addrspaces = true, kwargs...)
384-
run(`$(lld()) -flavor wasm --no-entry --export-all $flags $obj_path/obj.o -o $path/$filename.wasm`)
383+
obj_path, name = generate_obj(funcs, true, path, filename; target = (triple = "wasm32-unknown-wasi", cpu = "", features = ""), remove_julia_addrspaces = true, kwargs...)
384+
run(`$(lld()) -flavor wasm --no-entry --export-all $flags $obj_path/$filename.o -o $path/$filename.wasm`)
385385
joinpath(abspath(path), filename * ".wasm")
386386
end
387387

@@ -702,8 +702,8 @@ function generate_obj(funcs::Union{Array,Tuple}, external::Bool, path::String =
702702
f, tt = funcs[1]
703703
mkpath(path)
704704
obj_path = joinpath(path, "$filenamebase.o")
705-
fakejob, kwargs = native_job(f, tt, external; kwargs...)
706705
mod = native_llvm_module(funcs; demangle, kwargs...)
706+
fakejob, _ = native_job(f, tt, external; kwargs...)
707707
obj, _ = GPUCompiler.emit_asm(fakejob, mod; strip=strip_asm, validate=false, format=LLVM.API.LLVMObjectFile)
708708
open(obj_path, "w") do io
709709
write(io, obj)

0 commit comments

Comments
 (0)