[libcxx-commits] [PATCH] D73436: [libunwind] Treat assembly files as C on mingw
Martin Storsjö via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Sun Jan 26 12:22:40 PST 2020
mstorsjo created this revision.
mstorsjo added reviewers: phosek, smeenai, rnk, JamesNagurne.
Herald added subscribers: christof, mgorny.
Herald added a project: libc++.
When targeting mingw, current CMake (3.16) fails to get the right flags for assembly source files for windows gnu/clang targets (see https://gitlab.kitware.com/cmake/cmake/merge_requests/4287 for a fix), causing builds to fail due to `-fPIC` being unsupported in clang for mingw targets.
In the meantime, restore the behaviour from before c48974ffd7d1676 <https://reviews.llvm.org/rGc48974ffd7d1676f79d39d3b1e70f07d3a5e2e44> selectively on mingw targets, treating the assembly files as C.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D73436
Files:
libunwind/src/CMakeLists.txt
Index: libunwind/src/CMakeLists.txt
===================================================================
--- libunwind/src/CMakeLists.txt
+++ libunwind/src/CMakeLists.txt
@@ -24,6 +24,13 @@
UnwindRegistersRestore.S
UnwindRegistersSave.S
)
+if (MINGW)
+ # Current CMake (3.16) doesn't build assembly sources for windows/gnu
+ # targets properly, so treat them as C files.
+ set_source_files_properties(${LIBUNWIND_ASM_SOURCES}
+ PROPERTIES
+ LANGUAGE C)
+endif()
set(LIBUNWIND_HEADERS
AddressSpace.hpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D73436.240452.patch
Type: text/x-patch
Size: 586 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20200126/a427e9d5/attachment.bin>
More information about the libcxx-commits
mailing list