Skip to content

Commit 6b660ba

Browse files
committed
Add jemalloc placeholder on Windows
Due to the way how `generated_extension_loader_package_build.cpp` is generated in the latest `main` versions of the engine, it expects to have the same set of linked extensions on all platforms. `jemalloc` extension is not available on Windows, so the JDBC build fails on Windows. This PR adds an emtpy placeholder for `JemallocExtension` class that is expected by `generated_extension_loader_package_build.cpp` to fix the compilation on Windows.
1 parent 4c34c6f commit 6b660ba

File tree

3 files changed

+20
-0
lines changed

3 files changed

+20
-0
lines changed

CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -569,6 +569,7 @@ add_jar(duckdb_jdbc_tests ${JAVA_TEST_FILES} INCLUDE_JARS duckdb_jdbc_nolib)
569569
# main shared lib compilation
570570

571571
if(MSVC)
572+
list(APPEND DUCKDB_INCLUDE_DIRS src/windows)
572573
list(APPEND DUCKDB_SRC_FILES duckdb_java.def)
573574
else()
574575
list(APPEND DUCKDB_SRC_FILES ${JEMALLOC_SRC_FILES})

CMakeLists.txt.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@ add_jar(duckdb_jdbc_tests ${JAVA_TEST_FILES} INCLUDE_JARS duckdb_jdbc_nolib)
9595
# main shared lib compilation
9696

9797
if(MSVC)
98+
list(APPEND DUCKDB_INCLUDE_DIRS src/windows)
9899
list(APPEND DUCKDB_SRC_FILES duckdb_java.def)
99100
else()
100101
list(APPEND DUCKDB_SRC_FILES ${JEMALLOC_SRC_FILES})

src/windows/jemalloc_extension.hpp

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
#pragma once
2+
3+
#include "duckdb.hpp"
4+
5+
namespace duckdb {
6+
7+
class JemallocExtension : public Extension {
8+
public:
9+
void Load(ExtensionLoader &) override {};
10+
std::string Name() override {
11+
return "";
12+
};
13+
std::string Version() const override {
14+
return "";
15+
};
16+
};
17+
18+
} // namespace duckdb

0 commit comments

Comments
 (0)