Skip to content

xx-cargo broken with xx-sdk #196

@milas

Description

@milas

When using xx-sdk (osxcross), xx-cargo tries to set an invalid var:

/usr/bin/xx-cargo: export: line 84: CARGO_TARGET_ARM64_UNKNOWN_MACOS10.16_LINKER: bad variable name

This is because the result from xx-info is arm64-apple-macos10.16, which is then transformed for the CARGO_TARGET_{triple}_LINKER env var:

export "CARGO_TARGET_$(xx-info | tr '[:lower:]' '[:upper:]' | tr - _)_LINKER=$(xx-info)-clang"


I think this needs to be aarch64-apple-darwin based on available rustc triples:

❯ rustc --print target-list | rg darwin
aarch64-apple-darwin
arm64e-apple-darwin
i686-apple-darwin
x86_64-apple-darwin
x86_64h-apple-darwin

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions