[PATCH] D122161: [cmake] Handle iOS, watchOS and tvOS when finding compiler-rt on Apple
Louis Dionne via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Mar 21 18:55:19 PDT 2022
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG8907302f88e7: [cmake] Handle iOS, watchOS and tvOS when finding compiler-rt on Apple (authored by ldionne).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D122161/new/
https://reviews.llvm.org/D122161
Files:
cmake/Modules/HandleCompilerRT.cmake
Index: cmake/Modules/HandleCompilerRT.cmake
===================================================================
--- cmake/Modules/HandleCompilerRT.cmake
+++ cmake/Modules/HandleCompilerRT.cmake
@@ -20,8 +20,26 @@
if(NOT name MATCHES "builtins.*")
set(component_name "${name}_")
endif()
- # TODO: Support ios, tvos and watchos as well.
- set(component_name "${component_name}osx")
+ if (CMAKE_OSX_SYSROOT MATCHES ".+MacOSX.+")
+ set(component_name "${component_name}osx")
+
+ elseif (CMAKE_OSX_SYSROOT MATCHES ".+iPhoneOS.+")
+ set(component_name "${component_name}ios")
+ elseif (CMAKE_OSX_SYSROOT MATCHES ".+iPhoneSimulator.+")
+ set(component_name "${component_name}iossim")
+
+ elseif (CMAKE_OSX_SYSROOT MATCHES ".+AppleTVOS.+")
+ set(component_name "${component_name}tvos")
+ elseif (CMAKE_OSX_SYSROOT MATCHES ".+AppleTVSimulator.+")
+ set(component_name "${component_name}tvossim")
+
+ elseif (CMAKE_OSX_SYSROOT MATCHES ".+WatchOS.+")
+ set(component_name "${component_name}watchos")
+ elseif (CMAKE_OSX_SYSROOT MATCHES ".+WatchSimulator.+")
+ set(component_name "${component_name}watchossim")
+ else()
+ message(FATAL_ERROR "Unknown Apple SDK ${CMAKE_OSX_SYSROOT}, we don't know which compiler-rt library suffix to use.")
+ endif()
else()
set(component_name "${name}")
endif()
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D122161.417156.patch
Type: text/x-patch
Size: 1386 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220322/85bd9438/attachment.bin>
More information about the llvm-commits
mailing list