Skip to content

Commit

Permalink
[polly] Dynamic libraries are not supported on Cygwin
Browse files Browse the repository at this point in the history
Cygwin shares the same limitations as traditional Windows executables
for dynamic library loading, so disable building the dynamic library on
Cygwin targets.

Differential Revision: https://reviews.llvm.org/D155796
carlo-bramini authored and efriedma-quic committed Sep 5, 2023
1 parent efec733 commit 17f747b
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion polly/cmake/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -23,7 +23,7 @@ else()
endif()

set(POLLY_CONFIG_EXPORTED_TARGETS Polly ${ISL_TARGET})
if (NOT WIN32 AND LLVM_ENABLE_PIC)
if (NOT (WIN32 OR CYGWIN) AND LLVM_ENABLE_PIC)
# LLVMPolly is a dummy target on Win or if PIC code is disabled.
list(APPEND POLLY_CONFIG_EXPORTED_TARGETS LLVMPolly)
endif()
2 changes: 1 addition & 1 deletion polly/lib/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -115,7 +115,7 @@ target_link_libraries(Polly PUBLIC

# Create a loadable module Polly.so that can be loaded using
# LLVM's/clang's "-load" option.
if (WIN32 OR NOT LLVM_ENABLE_PIC)
if (WIN32 OR CYGWIN OR NOT LLVM_ENABLE_PIC)
# Add dummy target, either because loadable modules are not supported
# as on Windows or because PIC code has been disabled
add_custom_target(LLVMPolly)

0 comments on commit 17f747b

Please sign in to comment.