Skip to content

How do I ensure my preferred version of -mmacosx-version-min "wins" #665

@Icantjuddle

Description

@Icantjuddle

I need to provide "-mmacosx-version-min=10.14" as a compiler flag so I don't get compile failures.
I tried

llvm.toolchain(
     cxx_standard = {"": "c++23"},
     llvm_version = "21.1.6",
     extra_cxx_flags = { "darwin-aarch64": ["-mmacosx-version-min=10.14"] },
)

as well as cxx_flags, but there seems to be a -mmacosx-version-min=10.11 coming from somewhere that is overriding my preferred version and coming later in the command line arguments. I have an empty .bazelrc so it isn't from there. I couldn't find any reference in the repo. I finally settled on

#.bazelrc
build --cxxopt=-mmacosx-version-min=10.14
build --linkopt=-mmacosx-version-min=10.14

but would rather do this in the toolchain. Where am I going wrong?

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