-
Notifications
You must be signed in to change notification settings - Fork 915
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Statically link libnvcomp into libcudfjni (#8334)
Updates the Java bindings to nvcomp to statically link libnvcomp. This will help avoid libnvcomp v1.x and v2.x conflicts when libcudf starts pulling in libnvcomp 2.x as part of #8229. Switching to a statically-linked libnvcomp requires a small patch to the nvcomp source, as it is hard-coded to only produce a shared library. The patch changes the target to a static library compiled with position-independent code so it can be linked into a shared object like libcudfjni.so. Authors: - Jason Lowe (https://github.com/jlowe) Approvers: - Robert (Bobby) Evans (https://github.com/revans2) URL: #8334
- Loading branch information
Showing
5 changed files
with
18 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt | ||
index 32f48ef..a2e3125 100644 | ||
--- a/src/CMakeLists.txt | ||
+++ b/src/CMakeLists.txt | ||
@@ -10,7 +10,9 @@ endif() | ||
file(GLOB CUDA_SOURCES *.cu) | ||
file(GLOB CPP_SOURCES *.cpp) | ||
|
||
-add_library(nvcomp SHARED ${CUDA_SOURCES} ${CPP_SOURCES}) | ||
+ | ||
+add_library(nvcomp STATIC ${CUDA_SOURCES} ${CPP_SOURCES}) | ||
+set_property(TARGET nvcomp PROPERTY POSITION_INDEPENDENT_CODE True) | ||
set_property(TARGET nvcomp PROPERTY CUDA_ARCHITECTURES ${GPU_ARCHS}) | ||
target_compile_options(nvcomp PRIVATE | ||
$<$<COMPILE_LANGUAGE:CUDA>:--expt-extended-lambda -Xcompiler -pthread>) |