@@ -17,6 +17,7 @@ using Base:BinaryPlatforms.Platform, BinaryPlatforms.HostPlatform, BinaryPlatfor
1717export load_function, compile_shlib, compile_executable
1818export static_code_llvm, static_code_typed, static_llvm_module, static_code_native
1919export @device_override , @print_and_throw
20+ export StaticTarget
2021
2122include (" interpreter.jl" )
2223include (" target.jl" )
465466"""
466467```julia
467468generate_obj(f, tt, path::String = tempname(), filenamebase::String="obj";
468- target = (),
469+ target::StaticTarget=StaticTarget (),
469470 demangle = true,
470471 strip_llvm = false,
471472 strip_asm = true,
@@ -477,7 +478,7 @@ a tuple type `tt` characterizing the types of the arguments for which the
477478function will be compiled.
478479
479480`target` can be used to change the output target. This is useful for compiling to WebAssembly and embedded targets.
480- This is a named tuple with fields `triple`, `cpu`, and `features` (each of these are strings).
481+ This is a struct of the type StaticTarget()
481482The defaults compile to the native target.
482483
483484If `demangle` is set to `false`, compiled function names are prepended with "julia_".
@@ -487,7 +488,7 @@ If `demangle` is set to `false`, compiled function names are prepended with "jul
487488julia> fib(n) = n <= 1 ? n : fib(n - 1) + fib(n - 2)
488489fib (generic function with 1 method)
489490
490- julia> path, name, table = StaticCompiler.generate_obj_for_compile (fib, Tuple{Int64}, "./test")
491+ julia> path, name, table = StaticCompiler.generate_obj (fib, Tuple{Int64}, "./test")
491492("./test", "fib", IdDict{Any, String}())
492493
493494shell> tree \$ path
505506"""
506507```julia
507508generate_obj(funcs::Union{Array,Tuple}, path::String = tempname(), filenamebase::String="obj";
508- target = (),
509+ target::StaticTarget=StaticTarget (),
509510 demangle =false,
510511 strip_llvm = false,
511512 strip_asm = true,
@@ -517,7 +518,7 @@ Low level interface for compiling object code (`.o`) for an array of Tuples
517518which will be compiled.
518519
519520`target` can be used to change the output target. This is useful for compiling to WebAssembly and embedded targets.
520- This is a named tuple with fields `triple`, `cpu`, and `features` (each of these are strings).
521+ This is a struct of the type StaticTarget()
521522The defaults compile to the native target.
522523"""
523524function generate_obj (funcs:: Union{Array,Tuple} , path:: String = tempname (), filenamebase:: String = " obj" ;
0 commit comments