diff options
| author | Egor Tensin <egor@tensin.name> | 2025-12-29 14:47:33 +0100 |
|---|---|---|
| committer | Egor Tensin <egor@tensin.name> | 2025-12-29 14:47:36 +0100 |
| commit | d0a09b5401d154ad4af93d79325c6df20d6d41ed (patch) | |
| tree | 23f5668776e08c8dbcb00a5e5483652cb0ab5e13 | |
| parent | workflows/test: upgrade runner images and actions (diff) | |
| download | setup-mingw-d0a09b5401d154ad4af93d79325c6df20d6d41ed.tar.gz setup-mingw-d0a09b5401d154ad4af93d79325c6df20d6d41ed.zip | |
remove the static linking workaround
I don't remember what it was for; assume it's no longer relevant.
| -rw-r--r-- | README.md | 7 | ||||
| -rw-r--r-- | action.yml | 23 |
2 files changed, 0 insertions, 30 deletions
@@ -5,11 +5,6 @@ Set up MinGW-w64 This GitHub action sets up MinGW-w64 in your workflow run. -1. Installs MinGW-w64 on either Ubuntu or Windows. -2. Fixes the infamous libwinpthread-1.dll [static linking issue]. - -[static linking issue]: https://stackoverflow.com/q/13768515/514684 - Use it in your workflow like this: - name: Set up MinGW @@ -36,8 +31,6 @@ API | | *any* | | Install the i686 toolchain. | cygwin | *any* | ✓ | Install native binaries. | | 1 | | Install Cygwin packages. -| static | 1 | ✓ | Enable the static-linking workaround. -| | *any* | | Disable the static-linking workaround. | cc | 1 | ✓ | Set up `cc`/`c++` executables. | | *any* | | Don't set up `cc`/`c++`. | hardlinks | *any* | ✓ | Cygwin: don't convert any symlinks. @@ -10,10 +10,6 @@ inputs: description: Install Cygwin packages required: false default: 0 - static: - description: Enable static linking workaround - required: false - default: 1 cc: description: Set up cc/c++ executables required: false @@ -55,7 +51,6 @@ runs: New-Variable windows_host -Value ($os -eq 'Windows' -and !$cygwin_host) -Option Constant New-Variable x64 -Value ('${{ inputs.platform }}' -eq 'x64') -Option Constant - New-Variable static_workaround -Value ('${{ inputs.static }}' -eq '1') -Option Constant $prefix32 = 'i686-w64-mingw32' $prefix64 = 'x86_64-w64-mingw32' @@ -125,14 +120,6 @@ runs: sudo update-alternatives --set "$prefix32-g++" "/usr/bin/$prefix32-g++-posix" sudo update-alternatives --set "$prefix64-gcc" "/usr/bin/$prefix64-gcc-posix" sudo update-alternatives --set "$prefix64-g++" "/usr/bin/$prefix64-g++-posix" - - if ($static_workaround) { - sudo rm ` - "/usr/$prefix32/lib/libpthread.dll.a" ` - "/usr/$prefix32/lib/libwinpthread.dll.a" ` - "/usr/$prefix64/lib/libpthread.dll.a" ` - "/usr/$prefix64/lib/libwinpthread.dll.a" - } } elseif ($cygwin_host) { $pkg = if ($x64) { 'mingw64-x86_64-gcc-g++' } else { 'mingw64-i686-gcc-g++' } if ($mingw_version_supplied) { @@ -145,11 +132,6 @@ runs: $lib_dir = cygpath.exe -wa "/usr/$prefix/sys-root/mingw/lib" echo $bin_dir >> $env:GITHUB_PATH - - if ($static_workaround) { - Remove-Item (Join-Path $lib_dir 'libpthread.dll.a') - Remove-Item (Join-Path $lib_dir 'libwinpthread.dll.a') - } } elseif ($windows_host) { $choco = Locate-Choco @@ -182,11 +164,6 @@ runs: } } echo $mingw_bin >> $env:GITHUB_PATH - - if ($static_workaround) { - Remove-Item (Join-Path $mingw_lib 'libpthread.dll.a') - Remove-Item (Join-Path $mingw_lib 'libwinpthread.dll.a') - } } else { throw "Sorry, installing MinGW is unsupported on $os" } |
