-
Notifications
You must be signed in to change notification settings - Fork 4.4k
XcodeConfigInfo.macosMinimumOsVersion is incorrectly set for host configuration #12988
Copy link
Copy link
Closed
Closed
Copy link
Labels
P3We're not considering working on this, but happy to review a PR. (No assignee)We're not considering working on this, but happy to review a PR. (No assignee)platform: appleteam-Rules-CPPIssues for C++ rulesIssues for C++ rulestype: bug
Description
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:
bazel/src/main/java/com/google/devtools/build/lib/rules/apple/XcodeConfig.java
Lines 149 to 152 in 24c980b
| 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.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
P3We're not considering working on this, but happy to review a PR. (No assignee)We're not considering working on this, but happy to review a PR. (No assignee)platform: appleteam-Rules-CPPIssues for C++ rulesIssues for C++ rulestype: bug