Skip to content

Explicitly specifying aarch64-apple-darwin target fails to build aws-lc-sys on MacOSΒ #377

@aambrose-sonatus

Description

@aambrose-sonatus

cargo-zigbuild 0.20.1
Zig 0.15.2
Cargo / rustc 1.90.0

Minimal reproducer, using rustls 0.23.35:

fn main() {
    println!("rustls ALL_VERSIONS: {:?}", rustls::ALL_VERSIONS);
}

On MacOS, executing cargo-zigbuild run succeeds and produces the expected output:
rustls ALL_VERSIONS: [TLSv1_3, TLSv1_2]

Executing cargo-zigbuild run --target aarch64-apple-darwin fails to compile with pages of errors. I think this is the first major error which cascades into the others:

warning: [email protected]: error: unknown CPU: 'armv8.4'
warning: [email protected]: Compilation of 'neon_sha3_check.c' failed - Err(Error { kind: ToolExecError, message: "command did not execute successfully (status code exit status: 1): env -u IPHONEOS_DEPLOYMENT_TARGET LC_ALL=\"C\" \"/<SNIP>/Library/Caches/cargo-zigbuild/0.20.1/zigcc-aarch64-apple-darwin-adb5.sh\" \"-O0\" \"-ffunction-sections\" \"-fdata-sections\" \"-fPIC\" \"-gdwarf-2\" \"-fno-omit-frame-pointer\" \"--target=arm64-apple-macosx\" \"-mmacosx-version-min=26.1\" \"-Werror\" \"-Wall\" \"-Wextra\" \"-march=armv8.4-a+sha3\" \"-Wno-unused-parameter\" \"-o\" \"/<SNIP>/min_test/target/aarch64-apple-darwin/debug/build/aws-lc-sys-17e13aba969dbeff/out/out-neon_sha3_check/7dfda64fdf5a526c-neon_sha3_check.o\" \"-c\" \"/<SNIP>/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/aws-lc-sys-0.34.0/aws-lc/tests/compiler_features_tests/neon_sha3_check.c\"" }).

Issue does not occur when running cargo run --target aarch64-apple-darwin without zigbuild.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions