Skip to content

Commit 41cbc83

Browse files
committed
Include compiler information (if any) in the meta JSON output
1 parent edecf34 commit 41cbc83

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

src/AutoBuild.jl

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -345,10 +345,11 @@ function build_tarballs(ARGS, src_name, src_version, sources, script,
345345
dependencies,
346346
)
347347
extra_kwargs = extract_kwargs(kwargs, (:lazy_artifacts, :init_block, :augment_platform_block))
348+
compiler_kwargs = extract_kwargs(kwargs, (:preferred_gcc_version,:preferred_llvm_version,:preferred_rust_version,:preferred_go_version,:compilers,:clang_use_lld))
348349

349350
if meta_json_stream !== nothing
350351
# If they've asked for the JSON metadata, by all means, give it to them!
351-
dict = get_meta_json(args...; extra_kwargs..., julia_compat=julia_compat)
352+
dict = get_meta_json(args...; extra_kwargs..., compiler_kwargs..., julia_compat=julia_compat)
352353
println(meta_json_stream, JSON.json(dict))
353354

354355
if meta_json_stream !== stdout
@@ -665,6 +666,7 @@ function get_meta_json(
665666
init_block::String = "",
666667
augment_platform_block::String = "",
667668
lazy_artifacts::Bool=!isempty(augment_platform_block) && minimum_compat(julia_compat) < v"1.7",
669+
kwargs...
668670
)
669671

670672
dict = Dict(
@@ -683,6 +685,12 @@ function get_meta_json(
683685
if platforms != [AnyPlatform()]
684686
dict["platforms"] = triplet.(platforms)
685687
end
688+
689+
# Add any other optional things we want to include
690+
for (k, v) in kwargs
691+
dict["$k"] = v
692+
end
693+
686694
return dict
687695
end
688696

0 commit comments

Comments
 (0)