Skip to content

Use the default xcode version - #47

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

Use the default xcode version#47
Eclips4 wants to merge 4 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

dnl map int64_t and uint64_t to JS bigint
AS_VAR_APPEND([LDFLAGS_NODIST], [" -sWASM_BIGINT"])
AS_VAR_APPEND([LDFLAGS_NODIST], [" -fwasm-exceptions"])

@Eclips4 Eclips4 Aug 30, 2026

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.

Rust ships a prebuilt std for wasm32-unknown-emscripten, and it's compiled with -fwasm-exceptions.
So I suppose we have no choice here

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Let me ping @hoodmane. Hood, for context this PR is adding emscripten support to our Rust fork. Do you think adding wasm-exceptions would be an issue for users of CPython on Emscripten?

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.

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.

3 participants