@@ -318,6 +318,7 @@ set(files
318318 __configuration/abi.h
319319 __configuration/availability.h
320320 __configuration/compiler.h
321+ __configuration/config_site_shim.h
321322 __configuration/language .h
322323 __configuration/platform.h
323324 __coroutine/coroutine_handle.h
@@ -1018,75 +1019,34 @@ set(files
10181019 wctype.h
10191020 )
10201021
1021- configure_file ("__config_site.in" "${LIBCXX_GENERATED_INCLUDE_TARGET_DIR} /__config_site" @ONLY)
1022- configure_file ("${LIBCXX_ASSERTION_HANDLER_FILE} " "${LIBCXX_GENERATED_INCLUDE_DIR} /__assertion_handler" COPYONLY )
1023-
1024- set (_all_includes "${LIBCXX_GENERATED_INCLUDE_TARGET_DIR} /__config_site"
1025- "${LIBCXX_GENERATED_INCLUDE_DIR} /__assertion_handler" )
1022+ set (_all_includes "" )
10261023foreach (f ${files} )
10271024 set (src "${CMAKE_CURRENT_SOURCE_DIR} /${f} " )
1028- set (dst "${LIBCXX_GENERATED_INCLUDE_DIR} /${f} " )
1025+ set (dst "${LIBCXX_GENERATED_INCLUDE_DIR} /__cxx03/ ${f} " )
10291026 add_custom_command (OUTPUT ${dst}
10301027 DEPENDS ${src}
10311028 COMMAND ${CMAKE_COMMAND} -E copy_if_different ${src} ${dst}
10321029 COMMENT "Copying CXX header ${f} " )
10331030 list (APPEND _all_includes "${dst} " )
10341031endforeach ()
10351032
1036- # Generate the IWYU mapping. This depends on all header files but it's also considered as an
1037- # "include" for dependency tracking.
1038- add_custom_command (OUTPUT "${LIBCXX_GENERATED_INCLUDE_DIR} /libcxx.imp"
1039- COMMAND "${Python3_EXECUTABLE} " "${LIBCXX_SOURCE_DIR} /utils/generate_iwyu_mapping.py" "-o" "${LIBCXX_GENERATED_INCLUDE_DIR} /libcxx.imp"
1040- DEPENDS "${LIBCXX_SOURCE_DIR} /utils/libcxx/header_information.py"
1041- COMMENT "Generate the mapping file for include-what-you-use"
1042- )
1043- list (APPEND _all_includes "${LIBCXX_GENERATED_INCLUDE_DIR} /libcxx.imp" )
1044-
1045- add_custom_target (generate-cxx-headers ALL DEPENDS ${_all_includes} )
1046-
1047- add_library (cxx-headers INTERFACE )
1048- target_link_libraries (cxx-headers INTERFACE libcxx-libc-headers libcxx-abi-headers)
1049- add_dependencies (cxx-headers generate-cxx-headers)
1050- # It's important that the arch directory be included first so that its header files
1051- # which interpose on the default include dir be included instead of the default ones.
1052- target_include_directories (cxx-headers INTERFACE ${LIBCXX_GENERATED_INCLUDE_TARGET_DIR}
1053- ${LIBCXX_GENERATED_INCLUDE_DIR} )
1033+ add_custom_target (generate-frozen-cxx03-headers ALL DEPENDS ${_all_includes} )
10541034
10551035if (LIBCXX_INSTALL_HEADERS)
10561036 foreach (file ${files} )
10571037 get_filename_component (dir ${file} DIRECTORY )
1058- install (FILES ${file}
1059- DESTINATION "${LIBCXX_INSTALL_INCLUDE_DIR} /${dir} "
1038+ install (FILES " ${file} "
1039+ DESTINATION "${LIBCXX_INSTALL_INCLUDE_DIR} /__cxx03/ ${dir} "
10601040 COMPONENT cxx-headers
10611041 PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ
10621042 )
10631043 endforeach ()
10641044
1065- # Install the generated __config_site file to the per-target include dir.
1066- install (FILES "${LIBCXX_GENERATED_INCLUDE_TARGET_DIR} /__config_site"
1067- DESTINATION "${LIBCXX_INSTALL_INCLUDE_TARGET_DIR} "
1068- PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ
1069- COMPONENT cxx-headers)
1070-
1071- # Install the generated __assertion_handler file to the generic include dir.
1072- install (FILES "${LIBCXX_GENERATED_INCLUDE_DIR} /__assertion_handler"
1073- DESTINATION "${LIBCXX_INSTALL_INCLUDE_DIR} "
1074- PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ
1075- COMPONENT cxx-headers)
1076-
1077- # Install the generated IWYU file to the generic include dir.
1078- install (FILES "${LIBCXX_GENERATED_INCLUDE_DIR} /libcxx.imp"
1079- DESTINATION "${LIBCXX_INSTALL_INCLUDE_DIR} "
1080- PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ
1081- COMPONENT cxx-headers)
1082-
10831045 if (NOT CMAKE_CONFIGURATION_TYPES )
1084- add_custom_target (install -cxx -headers
1046+ add_custom_target (install -frozen-cxx03 -headers
10851047 DEPENDS cxx-headers
10861048 COMMAND "${CMAKE_COMMAND} "
10871049 -DCMAKE_INSTALL_COMPONENT=cxx-headers
10881050 -P "${CMAKE_BINARY_DIR} /cmake_install.cmake" )
1089- # Stripping is a no-op for headers
1090- add_custom_target (install -cxx-headers-stripped DEPENDS install -cxx-headers)
10911051 endif ()
10921052endif ()
0 commit comments