@@ -1212,33 +1212,98 @@ default_debug_info_kind() = unsafe_load(cglobal(:jl_default_debug_info_kind, Cin
12121212
12131213# this type mirrors jl_cgparams_t (documented in julia.h)
12141214struct CodegenParams
1215+ """
1216+ If enabled, generate the necessary code to support the --track-allocations
1217+ command line flag to julia itself. Note that the option itself does not enable
1218+ allocation tracking. Rather, it merely generates the support code necessary
1219+ to perform allocation tracking if requested by the command line option.
1220+ """
12151221 track_allocations:: Cint
1222+
1223+ """
1224+ If enabled, generate the necessary code to support the --code-coverage
1225+ command line flag to julia itself. Note that the option itself does not enable
1226+ code coverage. Rather, it merely generates the support code necessary
1227+ to code coverage if requested by the command line option.
1228+ """
12161229 code_coverage:: Cint
1230+
1231+ """
1232+ If enabled, force the compiler to use the specialized signature
1233+ for all generated functions, whenever legal. If disabled, the choice is made
1234+ heuristically and specsig is only used when deemed profitable.
1235+ """
12171236 prefer_specsig:: Cint
1237+
1238+ """
1239+ If enabled, enable emission of `.debug_names` sections.
1240+ """
12181241 gnu_pubnames:: Cint
1242+
1243+ """
1244+ Controls what level of debug info to emit. Currently supported values are:
1245+ - 0: no debug info
1246+ - 1: full debug info
1247+ - 2: Line tables only
1248+ - 3: Debug directives only
1249+
1250+ The integer values currently match the llvm::DICompilerUnit::DebugEmissionKind enum,
1251+ although this is not guaranteed.
1252+ """
12191253 debug_info_kind:: Cint
1254+
1255+ """
1256+ If enabled, generate a GC safepoint at the entry to every function. Emitting
1257+ these extra safepoints can reduce the amount of time that other threads are
1258+ waiting for the currently running thread to reach a safepoint. The cost for
1259+ a safepoint is small, but non-zero. The option is enabled by default.
1260+ """
12201261 safepoint_on_entry:: Cint
1262+
1263+ """
1264+ If enabled, add an implicit argument to each function call that is used to
1265+ pass down the current task local state pointer. This argument is passed
1266+ using the `swiftself` convention, which in the ordinary case means that the
1267+ pointer is kept in a register and accesses are thus very fast. If this option
1268+ is disabled, the task local state pointer must be loaded from thread local
1269+ stroage, which incurs a small amount of additional overhead. The option is enabled by
1270+ default.
1271+ """
12211272 gcstack_arg:: Cint
1273+
1274+ """
1275+ If enabled, use the Julia PLT mechanism to support lazy-resolution of `ccall`
1276+ targets. The option may be disabled for use in environments where the julia
1277+ runtime is unavailable, but is otherwise recommended to be enabled, even if
1278+ lazy resolution is not required, as the Julia PLT mechanism may have superior
1279+ performance compared to the native platform mechanism. The options is enabled by default.
1280+ """
12221281 use_jlplt:: Cint
12231282
1224- lookup:: Ptr{Cvoid}
1283+ """
1284+ A pointer of type
12251285
1226- generic_context:: Any
1286+ typedef jl_value_t *(*jl_codeinstance_lookup_t)(jl_method_instance_t *mi JL_PROPAGATES_ROOT,
1287+ size_t min_world, size_t max_world);
1288+
1289+ that may be used by external compilers as a callback to look up the code instance corresponding
1290+ to a particular method instance.
1291+ """
1292+ lookup:: Ptr{Cvoid}
12271293
12281294 function CodegenParams (; track_allocations:: Bool = true , code_coverage:: Bool = true ,
12291295 prefer_specsig:: Bool = false ,
12301296 gnu_pubnames= true , debug_info_kind:: Cint = default_debug_info_kind (),
12311297 safepoint_on_entry:: Bool = true ,
12321298 gcstack_arg:: Bool = true , use_jlplt:: Bool = true ,
1233- lookup:: Ptr{Cvoid} = unsafe_load (cglobal (:jl_rettype_inferred_addr , Ptr{Cvoid})),
1234- generic_context = nothing )
1299+ lookup:: Ptr{Cvoid} = unsafe_load (cglobal (:jl_rettype_inferred_addr , Ptr{Cvoid})))
12351300 return new (
12361301 Cint (track_allocations), Cint (code_coverage),
12371302 Cint (prefer_specsig),
12381303 Cint (gnu_pubnames), debug_info_kind,
12391304 Cint (safepoint_on_entry),
12401305 Cint (gcstack_arg), Cint (use_jlplt),
1241- lookup, generic_context )
1306+ lookup)
12421307 end
12431308end
12441309
0 commit comments