Skip to content

ld64.lld doesn't respect -macos_version_min #159747

@CendioOssman

Description

@CendioOssman

Over the years, Apple's ld64 has accepted multiple ways of specifying the target OS version. The current flag is -platform_version, but it has previously been -macos_version_min and -macosx_version_min.

Apple's ld64 accepts all three, but lld only accepts the latest one. This is a major issue when using gcc, which prefers -macos_version_min.

The end result is that ld64.lld is not a drop in replacement for ld64, as any usage results in:

ld64.lld: error: must specify -platform_version

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions