forked from OSchip/llvm-project
[libunwind] Treat assembly files as C on mingw
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 c48974ffd7
selectively on mingw targets, treating the assembly files as C.
Differential Revision: https://reviews.llvm.org/D73436
This commit is contained in:
parent
59d690850e
commit
b780df052d
|
@ -24,6 +24,13 @@ set(LIBUNWIND_ASM_SOURCES
|
|||
UnwindRegistersRestore.S
|
||||
UnwindRegistersSave.S
|
||||
)
|
||||
if (MINGW)
|
||||
# CMake doesn't build assembly sources for windows/gnu targets properly
|
||||
# (up to current CMake, 3.16), so treat them as C files.
|
||||
set_source_files_properties(${LIBUNWIND_ASM_SOURCES}
|
||||
PROPERTIES
|
||||
LANGUAGE C)
|
||||
endif()
|
||||
|
||||
set(LIBUNWIND_HEADERS
|
||||
AddressSpace.hpp
|
||||
|
|
Loading…
Reference in New Issue