diff --git a/images/linux/scripts/SoftwareReport/SoftwareReport.Common.psm1 b/images/linux/scripts/SoftwareReport/SoftwareReport.Common.psm1 index 37e5ff3a697f..48c10986ef11 100644 --- a/images/linux/scripts/SoftwareReport/SoftwareReport.Common.psm1 +++ b/images/linux/scripts/SoftwareReport/SoftwareReport.Common.psm1 @@ -44,6 +44,13 @@ function Get-ClangVersions { return "Clang " + $clangVersions } +function Get-LLVMInfo { + $clangVersions = Get-ClangToolVersions -ToolName "clang" + $clangFormatVersions = Get-ClangToolVersions -ToolName "clang-format" + $aptSourceRepo = Get-AptSourceRepository -PackageName "llvm" + return "LLVM components: Clang $clangFormatVersions, Clang-format $clangFormatVersions (apt source: $aptSourceRepo)" +} + function Get-ClangFormatVersions { $clangFormatVersions = Get-ClangToolVersions -ToolName "clang-format" return "Clang-format " + $clangFormatVersions diff --git a/images/linux/scripts/SoftwareReport/SoftwareReport.Generator.ps1 b/images/linux/scripts/SoftwareReport/SoftwareReport.Generator.ps1 index 6941c36cef37..704639c3249e 100644 --- a/images/linux/scripts/SoftwareReport/SoftwareReport.Generator.ps1 +++ b/images/linux/scripts/SoftwareReport/SoftwareReport.Generator.ps1 @@ -35,12 +35,10 @@ $markdown += New-MDList -Style Unordered -Lines @( $markdown += New-MDHeader "Installed Software" -Level 2 $markdown += New-MDHeader "Language and Runtime" -Level 3 -$markdown += New-MDList -Style Unordered -Lines (@( +$runtimesList = @( (Get-BashVersion), (Get-CPPVersions), (Get-FortranVersions), - (Get-ClangVersions), - (Get-ClangFormatVersions), (Get-ErlangVersion), (Get-ErlangRebar3Version), (Get-MonoVersion), @@ -52,8 +50,16 @@ $markdown += New-MDList -Style Unordered -Lines (@( (Get-RubyVersion), (Get-SwiftVersion), (Get-JuliaVersion) - ) | Sort-Object -) + ) + +if (Test-IsUbuntu20) { + $runtimesList += (Get-LLVMInfo) +} else { + $runtimesList += (Get-ClangVersions) + $runtimesList += (Get-ClangFormatVersions) +} + +$markdown += New-MDList -Style Unordered -Lines ($runtimesList | Sort-Object) $markdown += New-MDHeader "Package Management" -Level 3 diff --git a/images/linux/scripts/installers/clang.sh b/images/linux/scripts/installers/clang.sh index 688de477926d..3e808066db9b 100644 --- a/images/linux/scripts/installers/clang.sh +++ b/images/linux/scripts/installers/clang.sh @@ -15,6 +15,8 @@ function InstallClang { if [[ $version =~ 9 ]] && isUbuntu16 || [[ $version =~ 12 ]]; then ./llvm.sh $version apt-get install -y "clang-format-$version" + llvm_repo=$(grep '^deb.*apt.llvm.org\/' /etc/apt/sources.list) + echo "llvm $llvm_repo" >> $HELPER_SCRIPTS/apt-sources.txt else apt-get install -y "clang-$version" "lldb-$version" "lld-$version" "clang-format-$version" fi