Repository navigation
fix(frankenphp): drop the -mthreads shim now that Go no longer passes the flag - #1280
Merged
Merged
Conversation
… the flag - Go 1.27 stopped passing -mthreads to the C compiler (golang/go#80290) - go-win fetches the latest stable Go and FrankenPHP's go.mod requires 1.27, so no supported build can hit the old behaviour - CC and CXX are plain clang.exe and clang++.exe again
henderkes
approved these changes
Nov 2, 2026
crazywhalecc
approved these changes
Nov 2, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Back in July I added a wrapper around clang in #1201 because Go passed the MinGW-only
-mthreadsflag to the C compiler for cgo builds, which clang rejects for the MSVC target. #1209 then turned that wrapper into a compiled shim. I also reported the problem upstream as golang/go#80290, and Go 1.27 no longer passes the flag, so the shim has nothing left to strip. It still gets compiled on every build, because the probe only asks clang whether it rejects the flag, and clang still does. This removesMTHREADS_SHIM_CandwindowsCgoCompilers(), and setsCCandCXXback toclang.exeandclang++.exe.go-windownloads the latest stable Go (1.27.3 today), and FrankenPHP'sgo.modrequiresgo 1.27, so the old behaviour can't come back through a normal build.windows-latestwith PHP 8.5: build and smoke test pass without the shim.That run sets
SPC_CMD_VAR_FRANKENPHP_GO_TAGS=nobrotli, becausev3currently fails on Windows with or without this change: cgo can't findlibbrotlicommonthroughpkg-config(same failure on unmodified v3). That's a separate bug, fixed in #1281.