diff options
| author | Egor Tensin <egor@tensin.name> | 2026-04-07 12:09:22 +0200 |
|---|---|---|
| committer | Egor Tensin <egor@tensin.name> | 2026-04-07 12:42:32 +0200 |
| commit | 5ccdd5408afee846e2c3f7dc7f7359a8821faba8 (patch) | |
| tree | 5e485e0ff9fc6df3e13dda77b9a66e08060e17da | |
| parent | Merge pull request #23 from egor-tensin/dependabot/github_actions/egor-tensin... (diff) | |
| download | setup-clang-5ccdd5408afee846e2c3f7dc7f7359a8821faba8.tar.gz setup-clang-5ccdd5408afee846e2c3f7dc7f7359a8821faba8.zip | |
install LLD as well
| -rw-r--r-- | .github/actions/check-lld/action.yml | 41 | ||||
| -rw-r--r-- | .github/workflows/test.yml | 6 | ||||
| -rw-r--r-- | README.md | 1 | ||||
| -rw-r--r-- | action.yml | 7 |
4 files changed, 54 insertions, 1 deletions
diff --git a/.github/actions/check-lld/action.yml b/.github/actions/check-lld/action.yml new file mode 100644 index 0000000..5bb25b6 --- /dev/null +++ b/.github/actions/check-lld/action.yml @@ -0,0 +1,41 @@ +name: Check LLD +description: Check LLD +inputs: + version: + description: Specific version to check + required: false +runs: + using: composite + steps: + - run: | + function Check-Exe { + param( + [Parameter(Mandatory=$true)] + [string] $Exe, + [Parameter(Mandatory=$true)] + [string] $HelpString + ) + + echo (Get-Command $Exe).Path + $output = & $Exe --version 2>&1 + echo $output + + $($output | Select-String -Pattern $HelpString -SimpleMatch -Quiet) -or $(throw "Unexpected `$Exe --version` output") + } + + $version = '${{ inputs.version }}' + + $driver_exe = 'lld' + # Although the output of `lld --version` claims that it's ld-link on + # Windows, the Chocolatey version at least still uses ld.lld as on + # Linux. + $real_exe = 'ld.lld' + + if ($version) { + $driver_exe = "$driver_exe-$version" + $real_exe = "$real_exe-$version" + } + + Check-Exe $driver_exe 'lld is a generic driver' + Check-Exe $real_exe "LLD $version" + shell: pwsh diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index d70af44..90b254c 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -32,6 +32,8 @@ jobs: uses: ./.github/actions/run-foo - name: Check symlinks uses: ./.github/actions/check-cc + - name: Check lld + uses: ./.github/actions/check-lld versions: strategy: @@ -64,3 +66,7 @@ jobs: uses: ./.github/actions/check-cc with: version: '${{ matrix.version }}' + - name: Check lld + uses: ./.github/actions/check-lld + with: + version: '${{ matrix.version }}' @@ -39,6 +39,7 @@ API | ------- | --------- | ----------- | clang | clang-4.0 | `clang` binary name | clangxx | clang++-7 | `clang++` binary name +| lld | ld.lld-10 | `ld.lld` binary name Supported versions ------------------ @@ -107,6 +107,7 @@ runs: $clang = 'clang' $clangxx = 'clang++' + $lld = 'ld.lld' if ($linux_host) { $pkg_clang = 'clang' @@ -114,6 +115,7 @@ runs: $pkg_clang_tidy = 'clang-tidy' $pkg_llvm = 'llvm' $pkg_gxx = 'g++' + $pkg_lld = 'lld' if (!$latest) { $pkg_version = Format-UpstreamVersion $version @@ -123,14 +125,16 @@ runs: $pkg_clang_format = "$pkg_clang_format-$pkg_version" $pkg_clang = "$pkg_clang_tidy-$pkg_version" $pkg_llvm = "$pkg_llvm-$pkg_version" + $pkg_lld = "$pkg_lld-$pkg_version" $clang = "$clang-$pkg_version" $clangxx = "$clangxx-$pkg_version" + $lld = "$lld-$pkg_version" } if (!$x64) { $pkg_gxx = 'g++-multilib' } - $packages = $pkg_clang,$pkg_clang_format,$pkg_clang_tidy,$pkg_llvm,$pkg_gxx + $packages = $pkg_clang,$pkg_clang_format,$pkg_clang_tidy,$pkg_llvm,$pkg_gxx,$pkg_lld Install-Package $packages } elseif ($windows_host) { @@ -144,6 +148,7 @@ runs: echo "clang=$clang" >> $env:GITHUB_OUTPUT echo "clangxx=$clangxx" >> $env:GITHUB_OUTPUT + echo "lld=$lld" >> $env:GITHUB_OUTPUT shell: pwsh - run: | |
