mirror of
https://github.com/smxi/inxi.git
synced 2025-01-18 16:37:49 +00:00
finished compilers
This commit is contained in:
parent
b01885710d
commit
93836f842b
18
pinxi
18
pinxi
|
@ -28272,6 +28272,7 @@ sub set_build_prop {
|
|||
}
|
||||
|
||||
# Return all detected compiler versions
|
||||
# args: 0: compiler
|
||||
sub get_compiler_data {
|
||||
eval $start if $b_log;
|
||||
my $compiler = $_[0];
|
||||
|
@ -36789,7 +36790,7 @@ sub info_item {
|
|||
}
|
||||
}
|
||||
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');
|
||||
if (@$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
|
||||
}
|
||||
if ($path = main::check_program('zigcc')){
|
||||
($zigcc,$zigcc_version) = ProgramData::full('zigcc',$path);
|
||||
my $zigccs = main::get_compiler_data('zigcc');
|
||||
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';
|
||||
$data->{$data_name}[$index]{main::key($num++,1,1,'Compilers')} = $compiler;
|
||||
|
@ -36824,8 +36830,10 @@ sub info_item {
|
|||
}
|
||||
}
|
||||
if ($zigcc){
|
||||
$zigcc_version ||= 'N/A';
|
||||
$data->{$data_name}[$index]{main::key($num++,0,2,'zigcc')} = $zigcc_version;
|
||||
$data->{$data_name}[$index]{main::key($num++,1,2,'zigcc')} = $zigcc;
|
||||
if ($extra > 1 && $zigcc_alt){
|
||||
$data->{$data_name}[$index]{main::key($num++,0,3,'alt')} = $zigcc_alt;
|
||||
}
|
||||
}
|
||||
}
|
||||
# $index++ if $extra > 1 && !$loaded{'shell-data'};
|
||||
|
|
Loading…
Reference in a new issue