Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions build-native.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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"
Expand Down
7 changes: 5 additions & 2 deletions dev/mvn-build-helper/assembly/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,11 @@
<artifactId>exec-maven-plugin</artifactId>
<version>3.0.0</version>
<configuration>
<executable>./build-native.sh</executable>
<commandlineArgs>${releaseMode}</commandlineArgs>
<executable>bash</executable>
<arguments>
<argument>./build-native.sh</argument>
<argument>${releaseMode}</argument>
</arguments>
<workingDirectory>../../../</workingDirectory>
<useMavenLogger>true</useMavenLogger>
</configuration>
Expand Down
4 changes: 3 additions & 1 deletion native-engine/blaze/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"] }
3 changes: 2 additions & 1 deletion native-engine/blaze/src/alloc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down