Skip to content

Conversation

@crazywhalecc
Copy link
Owner

What does this PR do?

Closes #1013

Checklist before merging

If your PR involves the changes mentioned below and completed the action, please tick the corresponding option.
If a modification is not involved, please skip it directly.

  • If you modified *.php or *.json, run them locally to ensure your changes are valid:
    • composer cs-fix
    • composer analyse
    • composer test
    • bin/spc dev:sort-config
  • If it's an extension or dependency update, please ensure the following:
    • Add your test combination to src/globals/test-extensions.php.
    • If adding new or fixing bugs, add commit message containing extension test or test extensions to trigger full test suite.

// 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');
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should add the definition to CMAKE_C_FLAGS instead.

Copy link
Owner Author

@crazywhalecc crazywhalecc Jan 13, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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');
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and the same here

@crazywhalecc crazywhalecc merged commit cd2dc5b into main Jan 13, 2026
8 checks passed
@crazywhalecc crazywhalecc deleted the fix/nghttp2 branch January 13, 2026 08:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Curl library: links against nghttp2.dll

3 participants