Skip to content

Commit 70efb71

Browse files
committed
Merge branch 'PHP-8.4'
2 parents a4b3caf + 9f16745 commit 70efb71

File tree

3 files changed

+13
-12
lines changed

3 files changed

+13
-12
lines changed

cmake/cmake/toolchains/template.cmake

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -131,9 +131,9 @@ set(HAVE_SCHED_GETCPU_EXITCODE 0)
131131
# ext/pcre
132132
################################################################################
133133

134-
# Set the exit code for the check whether the bundled PCRE library has JIT
135-
# supported on the target architecture.
136-
set(HAVE_PCRE_JIT_SUPPORT_EXITCODE 0)
134+
# Set the exit code of the check when using an external PCRE library whether JIT
135+
# support is available for the target architecture.
136+
set(PHP_EXT_PCRE_HAS_JIT_EXITCODE 0)
137137

138138
################################################################################
139139
# ext/posix

cmake/ext/pcre/CMakeLists.txt

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -70,17 +70,13 @@ target_sources(
7070
php_ext_pcre
7171
PRIVATE
7272
php_pcre.c
73-
php_pcre.def
7473
php_pcre.stub.php
7574
PUBLIC
7675
FILE_SET HEADERS
7776
FILES
7877
php_pcre.h
7978
)
8079

81-
# TODO: Fix this better for OBJECT libraries, which can't handle .def files.
82-
set_source_files_properties(php_pcre.def PROPERTIES HEADER_FILE_ONLY TRUE)
83-
8480
target_compile_definitions(php_ext_pcre PRIVATE ZEND_ENABLE_STATIC_TSRMLS_CACHE)
8581

8682
set(PCRE2_CODE_UNIT_WIDTH 8)
@@ -100,13 +96,13 @@ if(PHP_EXT_PCRE_EXTERNAL)
10096
message(CHECK_START "Checking for PCRE JIT support")
10197

10298
if(
103-
NOT DEFINED HAVE_PCRE_JIT_SUPPORT_EXITCODE
99+
NOT DEFINED PHP_EXT_PCRE_HAS_JIT_EXITCODE
104100
AND CMAKE_CROSSCOMPILING
105101
AND NOT CMAKE_CROSSCOMPILING_EMULATOR
106102
AND CMAKE_SYSTEM_PROCESSOR MATCHES
107103
"^(arm.*|i[34567]86|x86_64|amd64|mips.*|powerpc.*|sparc.*|X86|AMD64|ARM64)$"
108104
)
109-
set(HAVE_PCRE_JIT_SUPPORT_EXITCODE 0)
105+
set(PHP_EXT_PCRE_HAS_JIT_EXITCODE 0)
110106
endif()
111107

112108
cmake_push_check_state(RESET)
@@ -129,10 +125,11 @@ if(PHP_EXT_PCRE_EXTERNAL)
129125

130126
return !have_jit;
131127
}
132-
]] HAVE_PCRE_JIT_SUPPORT)
128+
]] PHP_EXT_PCRE_HAS_JIT)
133129
cmake_pop_check_state()
134130

135-
if(HAVE_PCRE_JIT_SUPPORT)
131+
if(PHP_EXT_PCRE_HAS_JIT)
132+
set(HAVE_PCRE_JIT_SUPPORT TRUE)
136133
message(CHECK_PASS "yes")
137134
else()
138135
message(CHECK_FAIL "no")
@@ -210,6 +207,10 @@ else()
210207

211208
if(CMAKE_SYSTEM_NAME STREQUAL "Windows")
212209
set(PCRE2_STATIC TRUE)
210+
211+
if(TARGET php_sapi)
212+
target_sources(php_sapi INTERFACE php_pcre.def)
213+
endif()
213214
endif()
214215

215216
target_compile_definitions(

docs/cmake/configuration.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2475,7 +2475,7 @@ A list of Autoconf `configure` command-line configuration options, Windows
24752475
<td></td>
24762476
</tr>
24772477
<tr>
2478-
<td>&emsp;--without-external-pcre</td>
2478+
<td>--without-external-pcre</td>
24792479
<td>N/A</td>
24802480
<td>PHP_EXT_PCRE_EXTERNAL=OFF</td>
24812481
<td>default</td>

0 commit comments

Comments
 (0)