finished compilers

This commit is contained in:
Harald Hope 2023-12-16 18:16:30 -08:00
parent b01885710d
commit 93836f842b

18
pinxi
View file

@ -28272,6 +28272,7 @@ sub set_build_prop {
} }
# Return all detected compiler versions # Return all detected compiler versions
# args: 0: compiler
sub get_compiler_data { sub get_compiler_data {
eval $start if $b_log; eval $start if $b_log;
my $compiler = $_[0]; my $compiler = $_[0];
@ -36789,7 +36790,7 @@ sub info_item {
} }
} }
if ($extra > 0){ if ($extra > 0){
my ($clang,$clang_alt,$gcc,$gcc_alt,$path,$zigcc,$zigcc_version); my ($clang,$clang_alt,$gcc,$gcc_alt,$path,$zigcc,$zigcc_alt);
my $clangs = main::get_compiler_data('clang'); my $clangs = main::get_compiler_data('clang');
if (@$clangs){ if (@$clangs){
$clang = shift @$clangs; $clang = shift @$clangs;
@ -36806,8 +36807,13 @@ sub info_item {
} }
$gcc ||= 'N/A'; # should not be needed after fix but leave in case undef $gcc ||= 'N/A'; # should not be needed after fix but leave in case undef
} }
if ($path = main::check_program('zigcc')){ my $zigccs = main::get_compiler_data('zigcc');
($zigcc,$zigcc_version) = ProgramData::full('zigcc',$path); if (@$zigccs){
$zigcc = shift @$zigccs;
if ($extra > 1 && @$zigccs){
$zigcc_alt = join('/', @$zigccs);
}
$zigcc ||= 'N/A'; # should not be needed after fix but leave in case undef
} }
my $compiler = ($gcc || $clang || $zigcc) ? '': 'N/A'; my $compiler = ($gcc || $clang || $zigcc) ? '': 'N/A';
$data->{$data_name}[$index]{main::key($num++,1,1,'Compilers')} = $compiler; $data->{$data_name}[$index]{main::key($num++,1,1,'Compilers')} = $compiler;
@ -36824,8 +36830,10 @@ sub info_item {
} }
} }
if ($zigcc){ if ($zigcc){
$zigcc_version ||= 'N/A'; $data->{$data_name}[$index]{main::key($num++,1,2,'zigcc')} = $zigcc;
$data->{$data_name}[$index]{main::key($num++,0,2,'zigcc')} = $zigcc_version; if ($extra > 1 && $zigcc_alt){
$data->{$data_name}[$index]{main::key($num++,0,3,'alt')} = $zigcc_alt;
}
} }
} }
# $index++ if $extra > 1 && !$loaded{'shell-data'}; # $index++ if $extra > 1 && !$loaded{'shell-data'};