Skip to content

routing: Mach-O cross from Linux via ld64.lld, and the macOS darwin-cc rule (reld#123 Phase 3, step 3) #192

Closed

Description

@zackees

Sub-issue of #123 (Phase 3). Follows #184 / PR #190, which made TargetProbe drive engine selection and added Engine::MingwLld.

Scope

1. Mach-O cross from Linux. A Mach-O link on a Linux host must route to ld64.lld, whether rustc asks for it with -Clinker-flavor=ld64.lld or clang with --target=arm64-apple-darwin --ld-path=reld. The probe signals already exist (-arch, -platform_version, Mach-O input magic); wire them to the ld64.lld engine for a non-macOS host.

2. The macOS darwin-cc rule — decided: soldr injects -Clinker-flavor=ld64.lld. rustc's default flavor for Apple targets is darwin-cc, which hands the linker clang-driver arguments (-arch, -nodefaultlibs, -mmacosx-version-min, -Wl,-wrapped flags). The alternative was having reld unwrap -Wl, and translate driver-only flags, but that makes reld own an open-ended driver-compatibility surface. Injecting the flavor is one flag in one place. So:

Acceptance

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