[PATCH] D86367: [runtimes] Use llvm-libtool-darwin for runtimes build
Shoaib Meenai via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 21 13:10:13 PDT 2020
smeenai created this revision.
smeenai added reviewers: beanz, compnerd, phosek.
Herald added subscribers: llvm-commits, Sanitizers, mgorny.
Herald added projects: Sanitizers, LLVM.
smeenai requested review of this revision.
It's full featured now and we can use it for the runtimes build instead
of relying on an external libtool, which means the CMAKE_HOST_APPLE
restriction serves no purpose either now. Restrict llvm-lipo to Darwin
targets while I'm here, since it's only needed there.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D86367
Files:
compiler-rt/CMakeLists.txt
compiler-rt/lib/builtins/CMakeLists.txt
llvm/cmake/modules/LLVMExternalProjectUtils.cmake
Index: llvm/cmake/modules/LLVMExternalProjectUtils.cmake
===================================================================
--- llvm/cmake/modules/LLVMExternalProjectUtils.cmake
+++ llvm/cmake/modules/LLVMExternalProjectUtils.cmake
@@ -53,8 +53,10 @@
endforeach()
if(NOT ARG_TOOLCHAIN_TOOLS)
- set(ARG_TOOLCHAIN_TOOLS clang lld llvm-ar llvm-lipo llvm-ranlib llvm-nm llvm-objdump)
- if(NOT _cmake_system_name STREQUAL Darwin)
+ set(ARG_TOOLCHAIN_TOOLS clang lld llvm-ar llvm-ranlib llvm-nm llvm-objdump)
+ if(_cmake_system_name STREQUAL Darwin)
+ list(APPEND ARG_TOOLCHAIN_TOOLS llvm-libtool-darwin llvm-lipo)
+ else()
# TODO: These tools don't fully support Mach-O format yet.
list(APPEND ARG_TOOLCHAIN_TOOLS llvm-objcopy llvm-strip)
endif()
@@ -144,6 +146,9 @@
if(llvm-ar IN_LIST TOOLCHAIN_TOOLS)
list(APPEND compiler_args -DCMAKE_AR=${LLVM_RUNTIME_OUTPUT_INTDIR}/llvm-ar${CMAKE_EXECUTABLE_SUFFIX})
endif()
+ if(llvm-libtool-darwin IN_LIST TOOLCHAIN_TOOLS)
+ list(APPEND compiler_args -DCMAKE_LIBTOOL=${LLVM_RUNTIME_OUTPUT_INTDIR}/llvm-libtool-darwin${CMAKE_EXECUTABLE_SUFFIX})
+ endif()
if(llvm-lipo IN_LIST TOOLCHAIN_TOOLS)
list(APPEND compiler_args -DCMAKE_LIPO=${LLVM_RUNTIME_OUTPUT_INTDIR}/llvm-lipo${CMAKE_EXECUTABLE_SUFFIX})
endif()
Index: compiler-rt/lib/builtins/CMakeLists.txt
===================================================================
--- compiler-rt/lib/builtins/CMakeLists.txt
+++ compiler-rt/lib/builtins/CMakeLists.txt
@@ -20,7 +20,7 @@
if(APPLE)
include(CompilerRTDarwinUtils)
endif()
- if(CMAKE_HOST_APPLE AND APPLE)
+ if(APPLE)
include(UseLibtool)
endif()
include(AddCompilerRT)
Index: compiler-rt/CMakeLists.txt
===================================================================
--- compiler-rt/CMakeLists.txt
+++ compiler-rt/CMakeLists.txt
@@ -112,7 +112,7 @@
endif()
# Ensure that fat libraries are built correctly on Darwin
- if(CMAKE_HOST_APPLE AND APPLE)
+ if(APPLE)
include(UseLibtool)
endif()
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D86367.287089.patch
Type: text/x-patch
Size: 2067 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200821/20ad1ea1/attachment.bin>
More information about the llvm-commits
mailing list