[PATCH] D150699: [compiler-rt] [libunwind] Remove workarounds for older CMake versions
Martin Storsjö via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue May 16 11:33:30 PDT 2023
mstorsjo created this revision.
mstorsjo added reviewers: Mordante, phosek.
Herald added subscribers: Enna1, dberris.
Herald added a project: All.
mstorsjo requested review of this revision.
Herald added projects: Sanitizers, libunwind.
Herald added subscribers: libcxx-commits, Sanitizers.
Herald added a reviewer: libunwind.
These only apply for CMake versions less than our new minimum.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D150699
Files:
compiler-rt/cmake/Modules/AddCompilerRT.cmake
libunwind/src/CMakeLists.txt
Index: libunwind/src/CMakeLists.txt
===================================================================
--- libunwind/src/CMakeLists.txt
+++ libunwind/src/CMakeLists.txt
@@ -26,14 +26,6 @@
UnwindRegistersSave.S
)
-# See add_asm_sources() in compiler-rt for explanation of this workaround.
-# CMake doesn't work correctly with assembly on AIX. Workaround by compiling
-# as C files as well.
-if((APPLE AND CMAKE_VERSION VERSION_LESS 3.19) OR
- (MINGW AND CMAKE_VERSION VERSION_LESS 3.17))
- set_source_files_properties(${LIBUNWIND_ASM_SOURCES} PROPERTIES LANGUAGE C)
-endif()
-
set(LIBUNWIND_HEADERS
AddressSpace.hpp
assembly.h
Index: compiler-rt/cmake/Modules/AddCompilerRT.cmake
===================================================================
--- compiler-rt/cmake/Modules/AddCompilerRT.cmake
+++ compiler-rt/cmake/Modules/AddCompilerRT.cmake
@@ -125,13 +125,6 @@
function(add_asm_sources output)
set(${output} ${ARGN} PARENT_SCOPE)
- # CMake doesn't pass the correct architecture for Apple prior to CMake 3.19. https://gitlab.kitware.com/cmake/cmake/-/issues/20771
- # MinGW didn't work correctly with assembly prior to CMake 3.17. https://gitlab.kitware.com/cmake/cmake/-/merge_requests/4287 and https://reviews.llvm.org/rGb780df052dd2b246a760d00e00f7de9ebdab9d09
- # Workaround these two issues by compiling as C.
- # Same workaround used in libunwind. Also update there if changed here.
- if((APPLE AND CMAKE_VERSION VERSION_LESS 3.19) OR (MINGW AND CMAKE_VERSION VERSION_LESS 3.17))
- set_source_files_properties(${ARGN} PROPERTIES LANGUAGE C)
- endif()
endfunction()
macro(set_output_name output name arch)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D150699.522726.patch
Type: text/x-patch
Size: 1663 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230516/fe0e0002/attachment.bin>
More information about the llvm-commits
mailing list