Skip to content

Commit 3e34a88

Browse files
committed
Update the flag used in the feature check
1 parent bdaab37 commit 3e34a88

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

flang-rt/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -255,11 +255,11 @@ if (UNIX AND CMAKE_SYSTEM_NAME MATCHES "AIX")
255255
add_compile_definitions(_LARGE_FILE_API)
256256
endif ()
257257

258-
# Check whether the compiler can undefine a macro using the "-U" flag.
258+
# Check whether the compiler can undefine a macro using the "-Wp,-U" flag.
259259
# Aternatively, we could use
260260
# CMAKE_CXX_COMPILER_FRONTEND_VARIANT STREQUAL "GNU"
261261
# but some older versions of CMake don't define it for GCC itself.
262-
check_cxx_compiler_flag("-UTESTFLAG" FLANG_RT_SUPPORTS_UNDEFINE_FLAG)
262+
check_cxx_compiler_flag("-Wp,-UTESTFLAG" FLANG_RT_SUPPORTS_UNDEFINE_FLAG)
263263

264264
# Check whether -fno-lto is supported.
265265
check_cxx_compiler_flag(-fno-lto FLANG_RT_HAS_FNO_LTO_FLAG)

0 commit comments

Comments
 (0)