Fix nghttp2 and curl build configurations for static linking#1014
Conversation
| // move libcurl.lib to libcurl_a.lib | ||
| rename(BUILD_LIB_PATH . '\libcurl.lib', BUILD_LIB_PATH . '\libcurl_a.lib'); | ||
|
|
||
| FileSystem::replaceFileStr(BUILD_INCLUDE_PATH . '\curl\curl.h', '#ifdef CURL_STATICLIB', '#if 1'); |
There was a problem hiding this comment.
We should add the definition to CMAKE_C_FLAGS instead.
There was a problem hiding this comment.
Since we have no unified cflags env var for Windows builder, the last executable build will always need it if depending on it. That's not appropriate for current build dependency tree. We have to change many other libs/executables cflags.
In v3 I implemented WindowsCMakeExecutor which may do this properly. it is more important to treat it as a permanent static library to avoid linking issues just for now, I think.
There was a problem hiding this comment.
Hmm, I haven't looked the windows stuff much, so I'll take your word for it.
Go 1.26 lets us compile cgo with clang on Windows, so this unlocks a msvc backend. In other words frankenphp is soon windows compatible, but the thought of distributing 800mb worth of dll's just to run it seems insane to me.
| "--build build --config Release --target install -j{$this->builder->concurrency}" | ||
| ); | ||
|
|
||
| FileSystem::replaceFileStr(BUILD_INCLUDE_PATH . '\nghttp2\nghttp2.h', '#ifdef NGHTTP2_STATICLIB', '#if 1'); |
What does this PR do?
Closes #1013
Checklist before merging
*.phpor*.json, run them locally to ensure your changes are valid:composer cs-fixcomposer analysecomposer testbin/spc dev:sort-configsrc/globals/test-extensions.php.extension testortest extensionsto trigger full test suite.