summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2023-03-31 12:01:00 (GMT)
committerKitware Robot <kwrobot@kitware.com>2023-03-31 12:01:16 (GMT)
commitbe3c564f8c5285ad75c18dd3ec4c16dd5c3e7154 (patch)
tree508a9e9107102f9735214bba7324ac3e56a82459
parentf52a2fd26d13fa33d34dd1320f82d3f8aa49f3c3 (diff)
parentac2562afb3fda621854f4c3a470e36f10cf507b3 (diff)
downloadCMake-be3c564f8c5285ad75c18dd3ec4c16dd5c3e7154.zip
CMake-be3c564f8c5285ad75c18dd3ec4c16dd5c3e7154.tar.gz
CMake-be3c564f8c5285ad75c18dd3ec4c16dd5c3e7154.tar.bz2
Merge topic 'binutils-strip-macos'
ac2562afb3 BinUtils: Avoid llvm-strip on Apple platforms Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !8372
-rw-r--r--Modules/CMakeFindBinUtils.cmake10
1 files changed, 9 insertions, 1 deletions
diff --git a/Modules/CMakeFindBinUtils.cmake b/Modules/CMakeFindBinUtils.cmake
index 190117c..10e8ff3 100644
--- a/Modules/CMakeFindBinUtils.cmake
+++ b/Modules/CMakeFindBinUtils.cmake
@@ -186,7 +186,15 @@ else()
list(PREPEND _CMAKE_RANLIB_NAMES "llvm-ranlib")
if("${CMAKE_${_CMAKE_PROCESSING_LANGUAGE}_COMPILER_VERSION}" VERSION_GREATER_EQUAL 11)
# llvm-strip versions prior to 11 require additional flags we do not yet add.
- list(PREPEND _CMAKE_STRIP_NAMES "llvm-strip")
+ if(APPLE)
+ # llvm-strip does not seem to support chained fixup format correctly.
+ # FIXME(#23333): We still need to consider 'llvm-strip' as a fallback
+ # because the 'APPLE' definition may be based on the host in this context,
+ # and a cross-compiling toolchain may not have 'strip'.
+ list(APPEND _CMAKE_STRIP_NAMES "llvm-strip")
+ else()
+ list(PREPEND _CMAKE_STRIP_NAMES "llvm-strip")
+ endif()
endif()
list(PREPEND _CMAKE_NM_NAMES "llvm-nm")
if("${CMAKE_${_CMAKE_PROCESSING_LANGUAGE}_COMPILER_VERSION}" VERSION_GREATER_EQUAL 9)