From 267142f3dc6b8d32b07beb21e3b4ba6f471a69d8 Mon Sep 17 00:00:00 2001 From: Brentley Jones Date: Fri, 18 Mar 2022 07:21:39 -0500 Subject: [PATCH] Fix conflicting actions error when specifying --host_macos_minimum_os (#15068) The flag was introduced in #13001 but not usable internally, because the host flag was not saved when doing a transition. Host flags should be saved, like in: https://github.com/bazelbuild/bazel/blob/master/src/main/java/com/google/devtools/build/lib/rules/cpp/CppOptions.java#L1212 PiperOrigin-RevId: 435091962 (cherry picked from commit b8a2ee2ca8ae1f66b40baea8fc413b2732e7ebaa) Co-authored-by: waltl --- .../build/lib/rules/apple/AppleCommandLineOptions.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/main/java/com/google/devtools/build/lib/rules/apple/AppleCommandLineOptions.java b/src/main/java/com/google/devtools/build/lib/rules/apple/AppleCommandLineOptions.java index ceef26271006ca..13bfeec836eab6 100644 --- a/src/main/java/com/google/devtools/build/lib/rules/apple/AppleCommandLineOptions.java +++ b/src/main/java/com/google/devtools/build/lib/rules/apple/AppleCommandLineOptions.java @@ -511,6 +511,9 @@ public FragmentOptions getHost() { host.includeXcodeExecutionRequirements = includeXcodeExecutionRequirements; host.appleCrosstoolTop = appleCrosstoolTop; + // Save host option for further use. + host.hostMacosMinimumOs = hostMacosMinimumOs; + return host; }