diff options
author | Egor Tensin <Egor.Tensin@gmail.com> | 2021-09-05 21:22:53 +0300 |
---|---|---|
committer | Egor Tensin <Egor.Tensin@gmail.com> | 2021-09-05 21:32:00 +0300 |
commit | d04208cef6e985db0830428975fc2ab3f28d89a1 (patch) | |
tree | ae89a1bfd6d094f76ceea32a25810abb969b92e4 /action.yml | |
parent | README: fix a typo (diff) | |
download | setup-gcc-d04208cef6e985db0830428975fc2ab3f28d89a1.tar.gz setup-gcc-d04208cef6e985db0830428975fc2ab3f28d89a1.zip |
set up gcc/g++ symlinksv1.2
Diffstat (limited to '')
-rw-r--r-- | action.yml | 15 |
1 files changed, 12 insertions, 3 deletions
@@ -15,7 +15,7 @@ inputs: required: false default: 0 cc: - description: Set up cc/c++ executables + description: Set up cc/gcc/c++/g++ executables required: false default: 1 hardlinks: @@ -133,6 +133,9 @@ runs: New-Variable cc -Value ('${{ inputs.cc }}' -eq '1') -Option Constant + New-Variable gcc -Value '${{ steps.install.outputs.gcc }}' -Option Constant + New-Variable gxx -Value '${{ steps.install.outputs.gxx }}' -Option Constant + function Link-Exe { param( [Parameter(Mandatory=$true)] @@ -156,8 +159,14 @@ runs: } if ($cc) { - Link-Exe '${{ steps.install.outputs.gcc }}' cc - Link-Exe '${{ steps.install.outputs.gxx }}' c++ + Link-Exe $gcc cc + if ($gcc -ne 'gcc') { + Link-Exe $gcc 'gcc' + } + Link-Exe $gxx c++ + if ($gxx -ne 'g++') { + Link-Exe $gxx 'g++' + } } shell: pwsh |