-
Notifications
You must be signed in to change notification settings - Fork 251
WIP - Support cross-compile darwin builds to aarch64 [ci-full] #7137
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
| export ORG_GRADLE_PROJECT_RUST_ANDROID_GRADLE_TARGET_${target_upper}_NSS_STATIC=1 | ||
| export ORG_GRADLE_PROJECT_RUST_ANDROID_GRADLE_TARGET_${target_upper}_NSS_DIR=/builds/worker/checkouts/vcs/libs/desktop/darwin-${build_path}/nss | ||
| export ORG_GRADLE_PROJECT_RUST_ANDROID_GRADLE_TARGET_${target_upper}_CC=/builds/worker/clang/bin/clang-20 | ||
| export ORG_GRADLE_PROJECT_RUST_ANDROID_GRADLE_TARGET_${target_upper}_TOOLCHAIN_PREFIX=/builds/worker/cctools/bin | ||
| export ORG_GRADLE_PROJECT_RUST_ANDROID_GRADLE_TARGET_${target_upper}_AR=/builds/worker/cctools/bin/${target}-ar | ||
| export ORG_GRADLE_PROJECT_RUST_ANDROID_GRADLE_TARGET_${target_upper}_RANLIB=/builds/worker/cctools/bin/${target}-ranlib | ||
| export ORG_GRADLE_PROJECT_RUST_ANDROID_GRADLE_TARGET_${target_upper}_LD_LIBRARY_PATH=/builds/worker/clang/lib | ||
| export ORG_GRADLE_PROJECT_RUST_ANDROID_GRADLE_TARGET_${target_upper}_RUSTFLAGS="-C linker=/builds/worker/clang/bin/clang-20 -C link-arg=-fuse-ld=/builds/worker/cctools/bin/${target}-ld -C link-arg=-B -C link-arg=/builds/worker/cctools/bin -C link-arg=-target -C link-arg=${target} -C link-arg=-isysroot -C link-arg=/tmp/MacOSX11.0.sdk -C link-arg=-Wl,-syslibroot,/tmp/MacOSX11.0.sdk -C link-arg=-Wl,-dead_strip${extra_rustflags}" | ||
| export ORG_GRADLE_PROJECT_RUST_ANDROID_GRADLE_TARGET_${target_upper}_CFLAGS_${target_lower}="-B /builds/worker/cctools/bin -target ${target} -isysroot /tmp/MacOSX11.0.sdk -Wl,-syslibroot,/tmp/MacOSX11.0.sdk -Wl,-dead_strip" | ||
| export ORG_GRADLE_PROJECT_RUST_ANDROID_GRADLE_TARGET_${target_upper}_BINDGEN_EXTRA_CLANG_ARGS="--sysroot /tmp/MacOSX11.0.sdk" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The diff machinery failed me here, but the values for x86_64 should be unchanged. For aarch64, we add the no_encryption linker flag based on what Glean does. https://github.com/mozilla/glean/blob/8aff55c2b89b9592428034b00bdd2a13a2861c2b/taskcluster/scripts/cross-compile-setup.sh#L22
|
Sigh.. now I see the NSS issue with CI missing nss aarch64 artifacts |
21e8348 to
d5446f6
Compare
To support darwin-aarch64 in the future, avoid using the ambiguous 'darwin' target and also generalize the rust-android-gradle handling.
d5446f6 to
9d874b1
Compare
Build the android unit-test megazords with support for darwin-aarch64 to make it easier to run tests locally that use Nimbus, etc. Since our NSS CI doesn't have darwin-aarch64 artifacts, this patch builds NSPR/NSS directly similar to how libs/build-nss-ios.sh does.
5112736 to
5d36ef8
Compare
5d36ef8 to
150a3d9
Compare
To support local android builds on Apple Silicon to use Nimbus in unit-tests, I'd like to extend our
megazord_full_libsForTestsartifacts to include darwin-aarch64. This extends the existing configuration to also target aarch64 following a similar consistent approach with Glean (such as the no_encryption flag).Pushing PR to poke some CI and see what happens...