@@ -17,6 +17,7 @@ using Base:BinaryPlatforms.Platform, BinaryPlatforms.HostPlatform, BinaryPlatfor
17
17
export load_function, compile_shlib, compile_executable
18
18
export static_code_llvm, static_code_typed, static_llvm_module, static_code_native
19
19
export @device_override , @print_and_throw
20
+ export StaticTarget
20
21
21
22
include (" interpreter.jl" )
22
23
include (" target.jl" )
465
466
"""
466
467
```julia
467
468
generate_obj(f, tt, path::String = tempname(), filenamebase::String="obj";
468
- target = (),
469
+ target::StaticTarget=StaticTarget (),
469
470
demangle = true,
470
471
strip_llvm = false,
471
472
strip_asm = true,
@@ -477,7 +478,7 @@ a tuple type `tt` characterizing the types of the arguments for which the
477
478
function will be compiled.
478
479
479
480
`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()
481
482
The defaults compile to the native target.
482
483
483
484
If `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
487
488
julia> fib(n) = n <= 1 ? n : fib(n - 1) + fib(n - 2)
488
489
fib (generic function with 1 method)
489
490
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")
491
492
("./test", "fib", IdDict{Any, String}())
492
493
493
494
shell> tree \$ path
505
506
"""
506
507
```julia
507
508
generate_obj(funcs::Union{Array,Tuple}, path::String = tempname(), filenamebase::String="obj";
508
- target = (),
509
+ target::StaticTarget=StaticTarget (),
509
510
demangle =false,
510
511
strip_llvm = false,
511
512
strip_asm = true,
@@ -517,7 +518,7 @@ Low level interface for compiling object code (`.o`) for an array of Tuples
517
518
which will be compiled.
518
519
519
520
`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()
521
522
The defaults compile to the native target.
522
523
"""
523
524
function generate_obj (funcs:: Union{Array,Tuple} , path:: String = tempname (), filenamebase:: String = " obj" ;
0 commit comments