[PATCH] D124059: [compiler-rt][sanitizers] build ubsan, asan etc libraries with Mac Catalyst support
Nico Weber via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 20 06:22:41 PDT 2022
This revision was automatically updated to reflect the committed changes.
Closed by commit rG7d2cc882d5e0: [compiler-rt][sanitizers] build ubsan, asan etc libraries with Mac Catalyst… (authored by thakis).
Herald added a project: Sanitizers.
Herald added a subscriber: Sanitizers.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D124059/new/
https://reviews.llvm.org/D124059
Files:
compiler-rt/cmake/Modules/AddCompilerRT.cmake
Index: compiler-rt/cmake/Modules/AddCompilerRT.cmake
===================================================================
--- compiler-rt/cmake/Modules/AddCompilerRT.cmake
+++ compiler-rt/cmake/Modules/AddCompilerRT.cmake
@@ -77,6 +77,17 @@
list(REMOVE_ITEM target_flags "-msse3")
endif()
+ # Build the macOS sanitizers with Mac Catalyst support.
+ if (APPLE AND
+ "${COMPILER_RT_ENABLE_MACCATALYST}" AND
+ "${libname}" MATCHES ".*\.osx.*")
+ foreach(arch ${LIB_ARCHS_${libname}})
+ list(APPEND target_flags
+ -target ${arch}-apple-macos${DARWIN_osx_MIN_VER}
+ -darwin-target-variant ${arch}-apple-ios13.1-macabi)
+ endforeach()
+ endif()
+
set_target_compile_flags(${libname}
${extra_cflags_${libname}} ${target_flags})
set_property(TARGET ${libname} APPEND PROPERTY
@@ -234,6 +245,19 @@
get_compiler_rt_output_dir(${COMPILER_RT_DEFAULT_TARGET_ARCH} output_dir_${libname})
get_compiler_rt_install_dir(${COMPILER_RT_DEFAULT_TARGET_ARCH} install_dir_${libname})
endif()
+
+ # Build the macOS sanitizers with Mac Catalyst support.
+ if ("${COMPILER_RT_ENABLE_MACCATALYST}" AND
+ "${os}" MATCHES "^(osx)$")
+ foreach(arch ${LIB_ARCHS_${libname}})
+ list(APPEND extra_cflags_${libname}
+ -target ${arch}-apple-macos${DARWIN_osx_MIN_VER}
+ -darwin-target-variant ${arch}-apple-ios13.1-macabi)
+ list(APPEND extra_link_flags_${libname}
+ -target ${arch}-apple-macos${DARWIN_osx_MIN_VER}
+ -darwin-target-variant ${arch}-apple-ios13.1-macabi)
+ endforeach()
+ endif()
endforeach()
else()
foreach(arch ${LIB_ARCHS})
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D124059.423889.patch
Type: text/x-patch
Size: 1734 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220420/86201660/attachment.bin>
More information about the llvm-commits
mailing list