diff options
author | bbaren <bbaren@google.com> | 2018-08-15 13:58:00 -0700 |
---|---|---|
committer | Copybara-Service <copybara-piper@google.com> | 2018-08-15 13:59:26 -0700 |
commit | c5442570ecba9a540a552825c8aed7ac9c62c321 (patch) | |
tree | c5d3eb1b56ab2b8faa444d130361149c2537ac92 /src/main/java/com/google/devtools/build/lib/rules/objc/CompilationSupport.java | |
parent | e2f61b197a1375b04222aa99a6bbcb290a19e36c (diff) |
When setting the standard Xcode version feature (see
commit eb952d08f76afa907bb34eaf7e1a69899102c523), always use exactly two
components for the version number. Grouping all point releases together
simplifies writing CROSSTOOLs.
Also fix a bug in MockObjcSupport that prevented Xcode version selection
in tests from working properly.
RELNOTES:
The standard `xcode_VERSION` feature now always uses exactly two
components in the version, even if you specify `--xcode_version` with
more or fewer than two.
PiperOrigin-RevId: 208877588
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/rules/objc/CompilationSupport.java')
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/rules/objc/CompilationSupport.java | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/rules/objc/CompilationSupport.java b/src/main/java/com/google/devtools/build/lib/rules/objc/CompilationSupport.java index f7e7a4a401..40938048a1 100644 --- a/src/main/java/com/google/devtools/build/lib/rules/objc/CompilationSupport.java +++ b/src/main/java/com/google/devtools/build/lib/rules/objc/CompilationSupport.java @@ -553,8 +553,11 @@ public class CompilationSupport { // next release. activatedCrosstoolSelectables.add(NO_DSYM_ZIPS_FEATURE_NAME); + // Add a feature identifying the Xcode version so CROSSTOOL authors can enable flags for + // particular versions of Xcode. To ensure consistency across platforms, use exactly two + // components in the version number. activatedCrosstoolSelectables.add(XCODE_VERSION_FEATURE_NAME_PREFIX - + XcodeConfig.getXcodeVersion(ruleContext).toStringWithMinimumComponents(2)); + + XcodeConfig.getXcodeVersion(ruleContext).toStringWithComponents(2)); activatedCrosstoolSelectables.addAll(ruleContext.getFeatures()); |