diff options
author | Egor Tensin <Egor.Tensin@gmail.com> | 2021-01-04 13:41:55 +0300 |
---|---|---|
committer | Egor Tensin <Egor.Tensin@gmail.com> | 2021-01-04 13:41:55 +0300 |
commit | 63c28353f5db9a00944aad8f6081693fcfae772b (patch) | |
tree | 3d194095030ff7b8f4735ea72b044f756af7d418 /action.yml | |
parent | replace Fix-CygwinLink with a shorter bash script (diff) | |
download | setup-clang-63c28353f5db9a00944aad8f6081693fcfae772b.tar.gz setup-clang-63c28353f5db9a00944aad8f6081693fcfae772b.zip |
refactoring
Diffstat (limited to '')
-rw-r--r-- | action.yml | 20 |
1 files changed, 11 insertions, 9 deletions
@@ -93,9 +93,6 @@ runs: $pkgs = 'clang','g++-multilib','llvm' } Install-Package $pkgs - - Link-Exe -Exe clang -LinkName cc - Link-Exe -Exe clang++ -LinkName c++ } elseif ($cygwin_host) { if (!$x64) { echo @' @@ -111,17 +108,11 @@ runs: # is required; it's simpler to install gcc-g++ for all the # dependencies. Install-Package clang gcc-g++ libiconv-devel llvm - - Link-Exe -Exe clang -LinkName cc - Link-Exe -Exe clang++ -LinkName c++ } elseif ($windows_host) { Install-Package llvm $bin_dir = Join-Path $env:ProgramFiles LLVM bin echo $bin_dir >> $env:GITHUB_PATH - - Link-Exe -Exe (Join-Path $bin_dir clang) -LinkName cc - Link-Exe -Exe (Join-Path $bin_dir clang++) -LinkName c++ } else { throw "Sorry, installing Clang is unsupported on $os" } @@ -144,6 +135,17 @@ runs: done < <( find /usr/bin -type l -a '-(' -iname 'clang*' -o -iname 'llvm*' '-)' -print0 ) '@ | & bash.exe --login -o errexit -o nounset -o pipefail -o igncr } + + if ($linux_host) { + Link-Exe -Exe clang -LinkName cc + Link-Exe -Exe clang++ -LinkName c++ + } elseif ($cygwin_host) { + Link-Exe -Exe clang -LinkName cc + Link-Exe -Exe clang++ -LinkName c++ + } elseif ($windows_host) { + Link-Exe -Exe (Join-Path $bin_dir clang) -LinkName cc + Link-Exe -Exe (Join-Path $bin_dir clang++) -LinkName c++ + } shell: pwsh branding: |