diff --git a/build-native.sh b/build-native.sh
index bc6a806ac..d4edb4fb8 100755
--- a/build-native.sh
+++ b/build-native.sh
@@ -5,10 +5,14 @@ set -e
cd "$(dirname "$0")"
profile="$1"
+libname=libblaze
if [ "$(uname)" == "Darwin" ]; then
libsuffix=dylib
elif [ "$(expr substr $(uname -s) 1 5)" == "Linux" ]; then
libsuffix=so
+elif [ "$(expr substr $(uname -s) 1 10)" == "MINGW64_NT" ]; then
+ libname=blaze
+ libsuffix=dll
else
echo "Unsupported platform $(uname)"
exit 1
@@ -25,7 +29,7 @@ checksum() {
exit 1
fi
- find Cargo.toml Cargo.lock native-engine target/$profile/libblaze."$libsuffix" | \
+ find Cargo.toml Cargo.lock native-engine target/$profile/$libname."$libsuffix" | \
xargs $hash_cmd 2>&1 | \
sort -k1 | \
$hash_cmd
@@ -53,8 +57,8 @@ else
fi
mkdir -p dev/mvn-build-helper/assembly/target/classes
-rm -f dev/mvn-build-helper/assembly/target/classes/libblaze.{dylib,so}
-cp target/$profile/libblaze."$libsuffix" dev/mvn-build-helper/assembly/target/classes
+rm -f dev/mvn-build-helper/assembly/target/classes/$libname.{dylib,so,dll}
+cp target/$profile/$libname."$libsuffix" dev/mvn-build-helper/assembly/target/classes
new_checksum="$(checksum)"
echo "build-checksum updated: $new_checksum"
diff --git a/dev/mvn-build-helper/assembly/pom.xml b/dev/mvn-build-helper/assembly/pom.xml
index e690ce6ed..6e9ca1f6a 100644
--- a/dev/mvn-build-helper/assembly/pom.xml
+++ b/dev/mvn-build-helper/assembly/pom.xml
@@ -33,8 +33,11 @@
exec-maven-plugin
3.0.0
- ./build-native.sh
- ${releaseMode}
+ bash
+
+ ./build-native.sh
+ ${releaseMode}
+
../../../
true
diff --git a/native-engine/blaze/Cargo.toml b/native-engine/blaze/Cargo.toml
index 3614aa9df..f816fafa0 100644
--- a/native-engine/blaze/Cargo.toml
+++ b/native-engine/blaze/Cargo.toml
@@ -21,9 +21,11 @@ datafusion-ext-plans = { workspace = true }
futures = "0.3"
jni = "0.20.0"
log = "0.4.22"
-jemallocator = { version = "0.5.0", features = ["disable_initial_exec_tls"] }
once_cell = "1.20.2"
panic-message = "0.3.0"
paste = "1.0.15"
prost = "0.13.3"
tokio = "1.41"
+
+[target.'cfg(not(windows))'.dependencies]
+jemallocator = { version = "0.5.0", features = ["disable_initial_exec_tls"] }
diff --git a/native-engine/blaze/src/alloc.rs b/native-engine/blaze/src/alloc.rs
index aa5772a4a..da0d4c602 100644
--- a/native-engine/blaze/src/alloc.rs
+++ b/native-engine/blaze/src/alloc.rs
@@ -9,7 +9,8 @@ use std::{
},
};
-#[global_allocator]
+#[cfg(not(windows))]
+#[cfg_attr(not(windows), global_allocator)]
static GLOBAL: jemallocator::Jemalloc = jemallocator::Jemalloc;
// only used for debugging