Skip to content

Use the default xcode version & fix emsripten build - #47

Open
Eclips4 wants to merge 5 commits into
Rust-for-CPython:3.x-rust-in-cpythonfrom
Eclips4:fix-ios-build
Open

Use the default xcode version & fix emsripten build#47
Eclips4 wants to merge 5 commits into
Rust-for-CPython:3.x-rust-in-cpythonfrom
Eclips4:fix-ios-build

Conversation

@Eclips4

@Eclips4 Eclips4 commented Aug 30, 2026

Copy link
Copy Markdown
Member

No description provided.

@Eclips4
Eclips4 requested a review from JacobCoffee as a code owner August 30, 2026 07:37

@freakboy3742 freakboy3742 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Confirming this should fix the CI failures that have been seen recently.

(EDIT: The iOS failures, anyway. The Emscripten ones don't appear to have a cause I recognise; my guess is that those are actually Rust related)

@Eclips4
Eclips4 requested a review from emmatyping as a code owner August 30, 2026 09:42
Comment thread configure.ac
Comment thread Modules/cpython-sys/build.rs Outdated
Comment on lines +231 to +254
if !have_sysroot && cargo_target.contains("emscripten") {
let mut candidates = Vec::new();
if let Ok(emsdk) = env::var("EMSDK") {
candidates.push(
PathBuf::from(&emsdk)
.join("upstream")
.join("emscripten")
.join("cache")
.join("sysroot"),
);
}
if let Ok(cc) = env::var("PY_CC")
&& let Some(parts) = shlex::split(&cc)
&& let Some(binary) = parts.first()
&& let Some(bin_dir) = Path::new(binary).parent()
{
candidates.push(bin_dir.join("cache").join("sysroot"));
}
if let Some(sysroot) = candidates.into_iter().find(|p| p.is_dir()) {
builder = builder.clang_arg(format!("--sysroot={}", sysroot.display()));
have_sysroot = true;
}
}

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This points bidgen at emsdk's sysroot, same as WASI/Android blocks above.

@hoodmane hoodmane Aug 31, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It might be simpler to assume that $EMSDK/upstream/emscripten/cache/sysroot points to a valid sysroot and skip the second step.

@Eclips4 Eclips4 changed the title Use the default xcode version Use the default xcode version & fix emsripten build Aug 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants