Skip to content

Commit 0750fd2

Browse files
authored
feat: scope dynamic symbol resolution to vortex-python (#3515)
This commit scopes dynamic symbol resolution to `vortex-python`. When unresolved symbols lead to crashes at runtime, no context is provided why or where the code crashed, with the only error shown being: `SIGSEGV (11). Invalid memory access`. Signed-off-by: Alexander Droste <alexander.droste@protonmail.com>
1 parent 2a5acd5 commit 0750fd2

File tree

3 files changed

+9
-7
lines changed

3 files changed

+9
-7
lines changed

.cargo/config.toml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,5 @@
11
[target.'(target_familiy="unix")']
22
rustflags = ["-C", "force-frame-pointers=yes"]
3-
# For pyo3 to successfully link on Macos
4-
# See https://stackoverflow.com/a/77382609
5-
[target.aarch64-apple-darwin]
6-
rustflags = ["-C", "link-arg=-undefined", "-C", "link-arg=dynamic_lookup"]
7-
[target.x86_64-apple-darwin]
8-
rustflags = ["-C", "link-arg=-undefined", "-C", "link-arg=dynamic_lookup"]
93
[target.wasm32-unknown-unknown]
104
rustflags = ['--cfg', 'getrandom_backend="wasm_js"', '-C', 'target-feature=+atomics']
115

vortex-duckdb-ext/build.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,9 +103,10 @@ fn main() {
103103
println!("cargo:rustc-link-search=native={}", lib_path.display());
104104
println!("cargo:rustc-link-lib=dylib=duckdb");
105105

106-
// Linux requires libstdc++ to be linked explicitly.
107106
if env::var("TARGET").unwrap().contains("linux") {
108107
println!("cargo:rustc-link-lib=stdc++");
108+
} else {
109+
println!("cargo:rustc-link-lib=c++");
109110
}
110111

111112
// Compile our C++ code that exposes additional DuckDB functionality.

vortex-python/.cargo/config.toml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# For pyo3 to successfully link on Macos
2+
# See https://stackoverflow.com/a/77382609
3+
[target.aarch64-apple-darwin]
4+
rustflags = ["-C", "link-arg=-undefined", "-C", "link-arg=dynamic_lookup"]
5+
6+
[target.x86_64-apple-darwin]
7+
rustflags = ["-C", "link-arg=-undefined", "-C", "link-arg=dynamic_lookup"]

0 commit comments

Comments
 (0)