Skip to content

Commit 132d844

Browse files
committed
Merge branch 'PHP-8.3'
2 parents 8bc4b41 + fc8367a commit 132d844

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

cmake/cmake/Flags.cmake

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ Check and configure compilation options.
44

55
include_guard(GLOBAL)
66

7-
include(CheckLinkerFlag)
87
include(CheckSourceRuns)
98
include(CMakePushCheckState)
109
include(PHP/CheckCompilerFlag)
@@ -365,12 +364,18 @@ if(PHP_UNDEFINED_SANITIZER)
365364
# args cannot be cast to void*. In that case, set -fno-sanitize=function.
366365
if(NOT CMAKE_CROSSCOMPILING)
367366
cmake_push_check_state(RESET)
368-
set(CMAKE_REQUIRED_FLAGS -fno-sanitize-recover=undefined)
367+
set(
368+
CMAKE_REQUIRED_FLAGS
369+
"-fsanitize=undefined -fno-sanitize-recover=undefined"
370+
)
369371
check_source_runs(C [[
370-
void foo(char *string) {}
372+
void foo(char *string) {
373+
(void)string;
374+
}
371375
int main(void) {
372376
void (*f)(void *) = (void (*)(void *))foo;
373377
f("foo");
378+
return 0;
374379
}
375380
]] _php_ubsan_works)
376381
cmake_pop_check_state()

0 commit comments

Comments
 (0)