diff --git a/rocksdb.nimble b/rocksdb.nimble index c24596d..1c104cd 100644 --- a/rocksdb.nimble +++ b/rocksdb.nimble @@ -22,7 +22,7 @@ task clean, "Remove temporary files": exec "make -C vendor/rocksdb clean" task test, "Run tests": - let runTests = "nim c -r --threads:on tests/test_all.nim" + let runTests = "nim c -d:nimDebugDlOpen -r --threads:on tests/test_all.nim" when defined(linux): exec "export LD_LIBRARY_PATH=build; " & runTests when defined(macosx): diff --git a/scripts/build_shared_deps_linux.sh b/scripts/build_shared_deps_linux.sh index bd43840..4b105ea 100755 --- a/scripts/build_shared_deps_linux.sh +++ b/scripts/build_shared_deps_linux.sh @@ -25,6 +25,4 @@ ${REPO_DIR}/vendor/vcpkg/vcpkg install rocksdb[lz4,zstd]:x64-linux-rocksdb --rec mkdir -p "${BUILD_DEST}" -cp "${REPO_DIR}/vendor/vcpkg/installed/x64-linux-rocksdb/lib/liblz4.so" "${BUILD_DEST}/" -cp "${REPO_DIR}/vendor/vcpkg/installed/x64-linux-rocksdb/lib/libzstd.so" "${BUILD_DEST}/" cp "${REPO_DIR}/vendor/vcpkg/installed/x64-linux-rocksdb/lib/librocksdb.so" "${BUILD_DEST}/" diff --git a/scripts/build_shared_deps_osx.sh b/scripts/build_shared_deps_osx.sh index 3c7eb7f..6f19c48 100755 --- a/scripts/build_shared_deps_osx.sh +++ b/scripts/build_shared_deps_osx.sh @@ -25,6 +25,4 @@ ${REPO_DIR}/vendor/vcpkg/vcpkg install rocksdb[lz4,zstd]:x64-osx-rocksdb --recur mkdir -p "${BUILD_DEST}" -cp "${REPO_DIR}/vendor/vcpkg/installed/x64-osx-rocksdb/lib/liblz4.dylib" "${BUILD_DEST}/" -cp "${REPO_DIR}/vendor/vcpkg/installed/x64-osx-rocksdb/lib/libzstd.dylib" "${BUILD_DEST}/" cp "${REPO_DIR}/vendor/vcpkg/installed/x64-osx-rocksdb/lib/librocksdb.dylib" "${BUILD_DEST}/" diff --git a/triplets/x64-linux-rocksdb.cmake b/triplets/x64-linux-rocksdb.cmake index f2b100b..9d493b6 100644 --- a/triplets/x64-linux-rocksdb.cmake +++ b/triplets/x64-linux-rocksdb.cmake @@ -1,7 +1,12 @@ set(VCPKG_TARGET_ARCHITECTURE x64) set(VCPKG_BUILD_TYPE release) -set(VCPKG_CRT_LINKAGE dynamic) -set(VCPKG_LIBRARY_LINKAGE dynamic) - set(VCPKG_CMAKE_SYSTEM_NAME Linux) set(VCPKG_FIXUP_ELF_RPATH ON) + +if(${PORT} MATCHES "snappy|zlib|lz4|zstd") + set(VCPKG_CRT_LINKAGE static) + set(VCPKG_LIBRARY_LINKAGE static) +else() + set(VCPKG_CRT_LINKAGE dynamic) + set(VCPKG_LIBRARY_LINKAGE dynamic) +endif() diff --git a/triplets/x64-osx-rocksdb.cmake b/triplets/x64-osx-rocksdb.cmake index 8813618..3fccdc2 100644 --- a/triplets/x64-osx-rocksdb.cmake +++ b/triplets/x64-osx-rocksdb.cmake @@ -1,7 +1,12 @@ set(VCPKG_TARGET_ARCHITECTURE x64) set(VCPKG_BUILD_TYPE release) -set(VCPKG_CRT_LINKAGE dynamic) -set(VCPKG_LIBRARY_LINKAGE dynamic) - set(VCPKG_CMAKE_SYSTEM_NAME Darwin) set(VCPKG_OSX_ARCHITECTURES x86_64) + +if(${PORT} MATCHES "snappy|zlib|lz4|zstd") + set(VCPKG_CRT_LINKAGE static) + set(VCPKG_LIBRARY_LINKAGE static) +else() + set(VCPKG_CRT_LINKAGE dynamic) + set(VCPKG_LIBRARY_LINKAGE dynamic) +endif() diff --git a/vendor/rocksdb b/vendor/rocksdb index bcf88d4..08f9322 160000 --- a/vendor/rocksdb +++ b/vendor/rocksdb @@ -1 +1 @@ -Subproject commit bcf88d48ce8aa8b536aee4dd305533b3b83cf435 +Subproject commit 08f93221f50700f19f11555fb46abfe708a716d1 diff --git a/vendor/vcpkg b/vendor/vcpkg index 01f6021..1de2026 160000 --- a/vendor/vcpkg +++ b/vendor/vcpkg @@ -1 +1 @@ -Subproject commit 01f602195983451bc83e72f4214af2cbc495aa94 +Subproject commit 1de2026f28ead93ff1773e6e680387643e914ea1