Repository navigation
fix(windows): complete the MSVC C11 source composition - #1
Open
yangweijie wants to merge 2 commits into
Open
yangweijie wants to merge 2 commits into
yangweijie wants to merge 2 commits into
Conversation
An MSVC /std:c11 build of the Composer manifest fails in three places: - ext/standard/crc32_x86.c is absent from the Windows sources, while Zend/zend_portability.h forces ZEND_INTRIN_SSE4_2_PCLMUL_RESOLVER under ZEND_WIN32, so hash_crc32.c calls crc32_x86_simd_update and the link fails with LNK2019. - php_reflection.c never registers ReflectionFiber under PHP_NANO, yet the method family that dereferences zend_ce_fiber sits outside the existing guard, so the link fails with LNK2019 as well. - ext/hash/xxhash/xxhash.h includes <stdalign.h> as soon as __STDC_VERSION__ >= 201112L, and the MSVC toolset ships no such header (14.44 still does not), so hash_xxhash.c fails with fatal error C1083. Add the missing translation unit, extend the PHP_NANO guard over the ReflectionFiber block, and supply win32/c11/stdalign.h on the Windows include path. The shim defines the standard C11 7.15 macros for C only; GCC/Clang and C++ builds keep their system header or keyword.
The native-smoke matrix only ran on Ubuntu and macOS, so Windows composition holes never failed CI. Teach the CMake harness to consume platforms.<host> sources/include-dirs/defines plus remaining component defines, add a windows-latest job, and fill the Windows ABI macros the TypePHP MSVC driver already injects (ZEND_WIN32/PHP_WIN32, LEXBOR_STATIC, HAVE_SLOW_HASH3).
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.
An MSVC /std:c11 build of the Composer manifest fails in three places:
Add the missing translation unit, extend the PHP_NANO guard over the ReflectionFiber block, and supply win32/c11/stdalign.h on the Windows include path. The shim defines the standard C11 7.15 macros for C only; GCC/Clang and C++ builds keep their system header or keyword.