Author: Raphael Isemann Date: 2020-05-08T18:13:58+02:00 New Revision: 7cf4ab13af8aa3183e551b3319399cddd9384948
URL: https://github.com/llvm/llvm-project/commit/7cf4ab13af8aa3183e551b3319399cddd9384948 DIFF: https://github.com/llvm/llvm-project/commit/7cf4ab13af8aa3183e551b3319399cddd9384948.diff LOG: [lldb][modules] Disable Clang Modules in source/Host directory on macOS Summary: The arpa/inet.h header in macOS is providing an incorrect htonl function with enabled local submodule visibility while building LLDB. This caused several networking tests to fail as the IP addresses are now flipped in LLDB. This patch disables building with modules when local submodule visibility is active and the current system is macOS for the source/Host directory (which is the *only directory that includes arpa/inet.h). * debugserver also includes arpa/inet.h but there we already disabled modules. Reviewers: aprantl Reviewed By: aprantl Subscribers: mgorny, JDevlieghere Differential Revision: https://reviews.llvm.org/D79632 Added: Modified: lldb/source/Host/CMakeLists.txt Removed: ################################################################################ diff --git a/lldb/source/Host/CMakeLists.txt b/lldb/source/Host/CMakeLists.txt index 2837c0c5e3a1..a5e4e352d036 100644 --- a/lldb/source/Host/CMakeLists.txt +++ b/lldb/source/Host/CMakeLists.txt @@ -1,3 +1,11 @@ +if (APPLE AND LLVM_ENABLE_LOCAL_SUBMODULE_VISIBILITY) + # The arpa/inet.h header used in the files here is providing a miscompiled + # htonl function on macOS <= 10.15 when local submodule visibility is active. + # Disabling modules in this directory until this is is fixed. + # See rdar://problem/62886385 + remove_module_flags() +endif() + macro(add_host_subdirectory group) list(APPEND HOST_SOURCES ${ARGN}) source_group(${group} FILES ${ARGN}) _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits