Skip to content

Commit 363f9ac

Browse files
committed
Also pass whether or not the build is shared to cpython-sys
1 parent 41add82 commit 363f9ac

File tree

4 files changed

+7
-2
lines changed

4 files changed

+7
-2
lines changed

Cargo.lock

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Makefile.pre.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3375,7 +3375,7 @@ Python/thread.o: @THREADHEADERS@ $(srcdir)/Python/condvar.h
33753375
# Module dependencies and platform-specific files
33763376

33773377
cpython-sys: Modules/cpython-sys/Cargo.toml Modules/cpython-sys/build.rs Modules/cpython-sys/wrapper.h Modules/cpython-sys/parser.h
3378-
CARGO_TARGET_DIR=$(abs_builddir)/target PYTHON_BUILD_DIR=$(abs_builddir) \$(CARGO_HOME)/bin/cargo build --lib --locked --package cpython-sys --profile $(CARGO_PROFILE) $(if $(CARGO_TARGET),--target=$(CARGO_TARGET)) --manifest-path $(srcdir)/Cargo.toml
3378+
CARGO_TARGET_DIR=$(abs_builddir)/target PYTHON_BUILD_DIR=$(abs_builddir) RUST_SHARED_BUILD=\$(PY_ENABLE_SHARED) \$(CARGO_HOME)/bin/cargo build --lib --locked --package cpython-sys --profile $(CARGO_PROFILE) $(if $(CARGO_TARGET),--target=$(CARGO_TARGET)) --manifest-path $(srcdir)/Cargo.toml
33793379

33803380
# force rebuild when header file or module build flavor (static/shared) is changed
33813381
MODULE_DEPS_STATIC=Modules/config.c

Modules/cpython-sys/Cargo.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,5 @@ edition = "2024"
66
[dependencies]
77

88
[build-dependencies]
9-
bindgen = "0.72.1"
9+
bindgen = "0.72.1"
10+
cpython-build-helper = { path = "../cpython-build-helper" }

Modules/cpython-sys/build.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
use std::env;
22
use std::path::{Path, PathBuf};
33

4+
use cpython_build_helper::print_linker_args;
5+
46
fn main() {
7+
print_linker_args();
58
let manifest_dir = PathBuf::from(env::var("CARGO_MANIFEST_DIR").unwrap());
69
let srcdir = manifest_dir
710
.parent()

0 commit comments

Comments
 (0)