[polly] [polly] Link polly-isl-test with LLVMSupport (PR #65424)
via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 5 17:17:12 PDT 2023
https://github.com/vient created https://github.com/llvm/llvm-project/pull/65424:
Otherwise link may fail if user provided additional library to link with via CMAKE_EXE_LINKER_FLAGS.
Concrete example is using custom allocator, LLVMSupport provides needed `-lpthread` in that case. Note that `-lpthread` cannot be passed via CMAKE_EXE_LINKER_FLAGS by user because it breaks pthread detection in LLVM CMakeLists, LLVM_PTHREAD_LIB becomes empty.
>From 81663ee4dc07e5be59f216d7982ac743d48265ce Mon Sep 17 00:00:00 2001
From: vient <lozko.roma at gmail.com>
Date: Wed, 6 Sep 2023 03:14:32 +0300
Subject: [PATCH] [polly] Link polly-isl-test with LLVMSupport
Otherwise link may fail if user provided additional library to link with via CMAKE_EXE_LINKER_FLAGS. Concrete example is using custom allocator, LLVMSupport provides needed -lpthread in that case.
---
polly/lib/External/CMakeLists.txt | 1 +
1 file changed, 1 insertion(+)
diff --git a/polly/lib/External/CMakeLists.txt b/polly/lib/External/CMakeLists.txt
index 458925f9b6e4d5..1869410c8baa5d 100644
--- a/polly/lib/External/CMakeLists.txt
+++ b/polly/lib/External/CMakeLists.txt
@@ -306,6 +306,7 @@ if (POLLY_BUNDLED_ISL)
target_link_libraries(polly-isl-test PRIVATE
PollyISL
+ LLVMSupport
)
# ISL requires at least C99 to compile. gcc < 5.0 use -std=gnu89 as default.
More information about the llvm-commits
mailing list