Skip to content

Commit 136d716

Browse files
MBkktkcloudy0717
authored andcommitted
[libc++] Use private CMake flags to enable the pragma system_header macro when building (llvm#138826)
That property doesn't need to be propagated beyond the translation units of the libc++ built library itself.
1 parent 9243a61 commit 136d716

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

runtimes/cmake/Modules/WarningFlags.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ include(HandleFlags)
22

33
# Warning flags ===============================================================
44
function(cxx_add_warning_flags target enable_werror enable_pedantic)
5-
target_compile_definitions(${target} PUBLIC -D_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
5+
target_compile_definitions(${target} PRIVATE -D_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
66
if (MSVC)
77
# -W4 is the cl.exe/clang-cl equivalent of -Wall. (In cl.exe and clang-cl,
88
# -Wall is equivalent to -Weverything in GCC style compiler drivers.)

0 commit comments

Comments
 (0)