Skip to content

XcodeConfigInfo.macosMinimumOsVersion is incorrectly set for host configuration #12988

@brentleyjones

Description

@brentleyjones

Description of the problem / feature request:

When building a target with the host configuration, the macosMinimumOsVersion is being set to the SDK version instead of what is set for --macos_minimum_os. The relevant lines are:

DottedVersion macosMinimumOsVersion =
(appleOptions.macosMinimumOs != null)
? DottedVersion.maybeUnwrap(appleOptions.macosMinimumOs)
: macosSdkVersion;

Bugs: what's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.

Build a genrule that has a swift_binary tool, with --macos_minimum_os lower than the SDK version (say 10.15 when using Xcode 12.4.0, which has its SDK version at 11.1). The tool will have an incorrect -target (x86_64-apple-macosx11.1 for the example given).

What operating system are you running Bazel on?

macOS 11.2.1

What's the output of bazel info release?

release 4.0.0

Have you found anything relevant by searching the web?

Nothing.

Metadata

Metadata

Assignees

Labels

P3We're not considering working on this, but happy to review a PR. (No assignee)platform: appleteam-Rules-CPPIssues for C++ rulestype: bug

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions