aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/rules/apple/AppleConfiguration.java
Commit message (Collapse)AuthorAge
* Replace all usages of Blaze's Preconditions class with guava.Gravatar tomlu2017-11-09
| | | | | | | | Blaze had its own class to avoid GC from varargs array creation for the precondition happy path. Guava now (mostly) implements these, making it unnecessary to maintain our own. This change was almost entirely automated by search-and-replace. A few BUILD files needed fixing up since I removed an export of preconditions from lib:util, which was all done by add_deps. There was one incorrect usage of Preconditions that was caught by error prone (which checks Guava's version of Preconditions) that I had to change manually. PiperOrigin-RevId: 175033526
* Expose late-bound-attributes to Skylark.Gravatar cparsons2017-11-06
| | | | | RELNOTES: Late-bound attributes are exposed to skylark. This is a new API (`configuration_field()`) to depend on certain configuration-defined targets from skylark rules. PiperOrigin-RevId: 174534104
* Remove OS/Xcode versions (and thus package loading) from ↵Gravatar lberki2017-10-26
| | | | | | | | | | | | | AppleConfiguration.Loader. This is a roll-forward of https://github.com/bazelbuild/bazel/commit/f9a379157d1e992390c5b6f0b75ef853e0870689, which was rolled back in https://github.com/bazelbuild/bazel/commit/0446714686119dd97f8d1f99290f98db91a65e44. Fixes #3424 (again!) RELNOTES[INC]: Selecting on "xcode_version" and "{ios,tvos,macos,watchos}_sdk_version" is not supported anymore. What was config_setting(values={"$FOO_version": $VALUE}) is now config_setting(flag_values={"@bazel_tools//tools/osx:$FOO_versi... PiperOrigin-RevId: 173505814
* Automated rollback of commit f9a379157d1e992390c5b6f0b75ef853e0870689.Gravatar lberki2017-10-23
| | | | | | | | | | | | | | | | | *** Reason for rollback *** Breaks a single, but very important target :( *** Original change description *** Remove OS/Xcode versions (and thus package loading) from AppleConfiguration.Loader. Fixes #3424. RELNOTES[INC]: Selecting on "xcode_version" and "{ios,tvos,macos,watchos}_sdk_version" is not supported anymore. What was config_setting(values={"$FOO_version": $VALUE}) is now config_setting(flag_values={"@bazel_tools//tools/osx:$FOO_version_flag": $VALUE}). PiperOrigin-RevId: 173085962
* Remove OS/Xcode versions (and thus package loading) from ↵Gravatar lberki2017-10-20
| | | | | | | | | | | AppleConfiguration.Loader. Fixes #3424. RELNOTES[INC]: Selecting on "xcode_version" and "{ios,tvos,macos,watchos}_sdk_version" is not supported anymore. What was config_setting(values={"$FOO_version": $VALUE}) is now config_setting(flag_values={"@bazel_tools//tools/osx:$FOO_version_flag": $VALUE}). PiperOrigin-RevId: 172714477
* Remove the target_apple_env and the apple_host_system_env methods from ↵Gravatar lberki2017-10-18
| | | | | | | | | | ctx.fragments.apple . Progress towards #3424. RELNOTES[INC]: the target_apple_env and apple_host_system_env methods on ctx.fragments.apple are not supported anymore. The same information is accessible through apple_common.target_apple_env and apple_common.apple_host_system_env . They need the Xcode configuration as an argument, which can be obtained by declaring an implicit dependency on it (i.e. attr.label(default=Label("@bazel_tools//tools/osx:current_xcode_config")) and then calling e.g. apple_common.apple_host_system_env(ctx.attr._xcode_config[apple_common.XcodeVersionConfig]). PiperOrigin-RevId: 172430475
* Export apple_host_system_env and target_apple_env through apple_common (as ↵Gravatar lberki2017-10-16
| | | | | | | | | opposed to only through ctx.fragments.apple) Progress towards #3424. RELNOTES: None. PiperOrigin-RevId: 172299240
* Put the platform version from the options into the output directory name ↵Gravatar lberki2017-10-13
| | | | | | | instead of the one computed based on xcode_config. RELNOTES: None. PiperOrigin-RevId: 172064337
* Remove sdk_version_for_platform from ctx.fragments.apple .Gravatar lberki2017-10-11
| | | | | | | | Progress towards #3424. RELNOTES[INC]: ctx.fragments.apple.sdk_version_for_platform is not supported anymore. The same information is accessible through the target @bazel_tools//tools/osx:current_xcode_config: point an implicit attribute to it (i.e. attr.label(default=Label("@bazel_tools//tools/osx:current_xcode_config")) then use ctx.attr._xcode_config[apple_common].XcodeVersionConfig].sdk_version_for_platform . PiperOrigin-RevId: 171652446
* Remove ctx.fragments.apple.minimum_os_for_platform_type.Gravatar lberki2017-10-10
| | | | | | | | Progress towards #3424. RELNOTES[INC]: ctx.fragments.apple.minimum_os_for_platform_type is not supported anymore. The same information is accessible through the target @bazel_tools//tools/osx:current_xcode_config: point an implicit attribute to it (i.e. attr.label(default=Label("@bazel_tools//tools/osx:current_xcode_config")) then use ctx.attr._xcode_config[apple_common].XcodeVersionConfig].minimum_os_for_platform_type . PiperOrigin-RevId: 171648040
* if --experimental_apple_mandatory_minimum_version is specified, make Apple ↵Gravatar lberki2017-10-10
| | | | | | | | | | | rules only add the minimum version of the OS to the output directory name if the configuration is behind an AppleBinaryTransition, or if a minimum_os flag (such as --ios_minimum_os) is specified on the command line. This is necessary so that the only time the minimum OS version affects the output directory name is when it's explicitly specified and therefore is accessible without looking at the xcode_config rule. Progress towards #3424. RELNOTES: None. PiperOrigin-RevId: 171641295
* Remove ctx.fragments.apple.{xcode_version,ios_minimum_os}.Gravatar lberki2017-10-10
| | | | | | | | | | These are now accessible using ctx.attr._xcode_config[apple_common.XcodeVersionConfig]. Progress towards #3424. RELNOTES[INC]: ctx.fragments.apple.{xcode_version,ios_minimum_os} is not supported anymore. The same information is accessible through the target @bazel_tools//tools/osx:current_xcode_config: point an implicit attribute to it (i.e. attr.label(default=Label("@bazel_tools//tools/osx:current_xcode_config")) then use ctx.attr._xcode_config[apple_common].XcodeVersionConfig]. PiperOrigin-RevId: 171517550
* Consolidate ObjectCodec<String> creationGravatar michajlo2017-10-09
| | | | | | | | Opens the door to swapping in different implementations without needing to touch a ton of code. RELNOTES: None PiperOrigin-RevId: 171412555
* Contingent on a flag --experimental_objc_provider_from_linked, apple_binary ↵Gravatar cparsons2017-09-25
| | | | | | | and apple_static_library no longer propagate ObjcProvider. RELNOTES: None. PiperOrigin-RevId: 169690934
* Delete ios_application, ios_extension(_binary), objc_binary.Gravatar allevato2017-09-21
| | | | PiperOrigin-RevId: 169428146
* Allow non-dottedversion aliases for --xcode_versionGravatar cparsons2017-08-31
| | | | | RELNOTES: None. PiperOrigin-RevId: 167143657
* Error reporting for invalid dynamic configurationsGravatar cparsons2017-08-31
| | | | | | | also, AppleConfiguration no longer throws NPE with invalid cpu. RELNOTES: None. PiperOrigin-RevId: 167013760
* Add an xcode_config_alias rule that is an alias to the current xcode_config ↵Gravatar lberki2017-08-24
| | | | | | | | | | | rule in use and expose data in XcodeConfigProvider to Skylark. This gives us a way to discover Xcode version information from Skylark in a way other than by AppleConfiguration, which in turn makes it possible to remove said data (and thus dependencies on BUILD files) from AppleConfiguration. Work towards https://github.com/bazelbuild/bazel/issues/3424 . RELNOTES: None. PiperOrigin-RevId: 166311454
* Properly handle some values that can be null in AppleCommandLineOptions.Gravatar janakr2017-08-18
| | | | PiperOrigin-RevId: 165622047
* Open-source Skyframe serialization, and make AppleConfiguration serializable ↵Gravatar janakr2017-08-18
| | | | | | as a pilot. Currently not hooked up to anything, but will be shortly. PiperOrigin-RevId: 165583517
* Route Xcode version information through an implicit dependency instead of ↵Gravatar lberki2017-07-25
| | | | | | | | | | | | | | the configuration. This is part of the crusade to kill package loading in configuration creation. AppleConfiguration still retains the version information for the following reasons: - Some Skylark rules access it that way. The plan is to create an xcode_config_alias() rule that can be an implicit dependency of Skylark rules and to export the version information to Skylark from XcodeVersionsProvider. - The minimum OS version is part of the name of the output directory. The plan for that is simply to remove it. Hopefully we can get away with it. - They allow us to add assertions to make sure the new mechanism works like the old one. RELNOTES: None. PiperOrigin-RevId: 163038724
* Add a command line option to make the minimum_os_version attribute mandatory ↵Gravatar lberki2017-07-25
| | | | | | | on Apple rules. RELNOTES: None. PiperOrigin-RevId: 163035922
* Clean up/improve docs across several Apple classes.Gravatar allevato2017-07-21
| | | | PiperOrigin-RevId: 162676133
* Refactor the logic to determine Xcode configuration so that getting the ↵Gravatar lberki2017-07-14
| | | | | | | | | | | information from the BUILD files and determining what to do with them is separated. This is so that we can eventually determine this information not in AppleConfiguration.Loader, but in the implementation of the xcode_config rule so that the former doesn't need to look at BUILD files anymore. Of course, this requires changing Skylark code that uses ctx.fragments.apple.$WHATEVER, but it's a good first step. RELNOTES: None. PiperOrigin-RevId: 161916770
* Remove apple_watch1_extension and apple_watch_extension_binary rulesGravatar cparsons2017-07-12
| | | | | RELNOTES: Remove apple_watch1_extension and apple_watch_extension_binary rules. Users should be using the skylark watchos_application and watchos_extension rules. https://github.com/bazelbuild/rules_apple has details. PiperOrigin-RevId: 161555395
* Platform -> ApplePlatform, to avoid ambiguity with the newly introducedGravatar cpeyser2017-07-07
| | | | | | Platform rule. PiperOrigin-RevId: 161203491
* {ios,macos}_minimum_os flags now default to {ios_macos}_sdk_version valuesGravatar cparsons2017-06-30
| | | | | RELNOTES: None. PiperOrigin-RevId: 160566592
* Remove usage of --ios_cpu from Bazel.Gravatar cpeyser2017-06-26
| | | | PiperOrigin-RevId: 160143322
* Rollback the copt-changing functionality of the extension_safe attributeGravatar cparsons2017-06-16
| | | | | | | | | | This change impacted build times of builds with libraries that needed to be built both extension-safe and non-extension-safe. This also caused duplicate symbol issues in such builds. The extension_safe attribute will now be a no-op, with subsequent removal to follow. RELNOTES: The extension_safe attribute of apple_binary no longer validates transitive dependencies are compiled against extension_safe APIs. PiperOrigin-RevId: 159142000
* Rollforward attempt 2 of "apple_binary extension_safe attribute results in ↵Gravatar cparsons2017-04-28
| | | | | | | configuration transition on dependencies" RELNOTES: None. PiperOrigin-RevId: 154544751
* Remove AppleCrosstoolSplitTransition.Gravatar cpeyser2017-04-26
| | | | PiperOrigin-RevId: 154232604
* "minimum_os" attribute on multi-arch linking rules.Gravatar cparsons2017-04-13
| | | | | | | This issues a configuration transition on the dependencies of the rule, causing deps to be compiled with the appropriate minimum os version. RELNOTES: None. PiperOrigin-RevId: 152952168
* Make immutability explicit for things exposed to Skylark.Gravatar dslomov2017-04-12
| | | | | RELNOTES: None. PiperOrigin-RevId: 152800780
* Add support for 'macos' platform_type in apple binary. This type is only ↵Gravatar Cal Peyser2017-03-09
| | | | | | | | supported for crosstool builds - there is no support in LegacyCompilationSupport. -- PiperOrigin-RevId: 149558653 MOS_MIGRATED_REVID=149558653
* Rollback of commit 5e945570ec0b9079596756bf89437ac37e031c36.Gravatar Jon Brandvein2017-02-28
| | | | | | | | *** Reason for rollback *** -- PiperOrigin-RevId: 148781019 MOS_MIGRATED_REVID=148781019
* Rollforward of "apple_binary extension_safe attribute results in ↵Gravatar Chris Parsons2017-02-24
| | | | | | | | | | | configuration transition on dependencies" This includes a fix: Propagate iquote appropriately from apple_binary so that generated headers of xctest apps are seen by ios_test -- PiperOrigin-RevId: 148403601 MOS_MIGRATED_REVID=148403601
* Disable bitcode for simulator architectures, regardless of the apple_bitcode ↵Gravatar Chris Parsons2017-02-22
| | | | | | | | flag. -- PiperOrigin-RevId: 148115586 MOS_MIGRATED_REVID=148115586
* Rollback of commit 59b01953143562502dc036735c2cd23e5255cb24.Gravatar Laurent Le Brun2017-02-20
| | | | | | | | | | | | | | | | *** Reason for rollback *** Breaks Blaze nightly *** Original change description *** apple_binary extension_safe attribute results in configuration transition on dependencies RELNOTES: apple_binary has a new "extension_safe" attribute to set extension compilation options on dependencies. -- PiperOrigin-RevId: 148009147 MOS_MIGRATED_REVID=148009147
* apple_binary extension_safe attribute results in configuration transition on ↵Gravatar Chris Parsons2017-02-20
| | | | | | | | | | dependencies RELNOTES: apple_binary has a new "extension_safe" attribute to set extension compilation options on dependencies. -- PiperOrigin-RevId: 147864346 MOS_MIGRATED_REVID=147864346
* Fills out some macOS support needed for the bundler.Gravatar Googler2017-02-02
| | | | | | | | | | | | | | | | | | This CL also changes some names from "MacOSX" to "macOS", such as the command line options, internal constants/enum values, and platform constants that are accessible from Skylark but are not let being used. It also adds some flags that are needed for completeness, like macos_minimum_os and macos_cpus. This change intentionally omits a few reference (such as "default_macosx_sdk_version" in "xcode_version") that are currently used in BUILD files in order to prevent those from breaking--I'll try to attack those later. This CL also does *not* add compiling/linking support for macOS. -- PiperOrigin-RevId: 146250799 MOS_MIGRATED_REVID=146250799
* Remove apple_dynamic_library rule.Gravatar Chris Parsons2017-02-01
| | | | | | -- PiperOrigin-RevId: 146150539 MOS_MIGRATED_REVID=146150539
* When the apple crosstool transition is being used (set with ↵Gravatar Cal Peyser2017-01-30
| | | | | | | | --apple_crosstool_transition), the APPLE_CROSSTOOL distinguisher does not modify output directory. -- PiperOrigin-RevId: 145999133 MOS_MIGRATED_REVID=145999133
* Set defaults for xcode_version and *_sdk_version flags based on the ↵Gravatar Chris Parsons2017-01-26
| | | | | | | | information available in the xcode config -- PiperOrigin-RevId: 145597372 MOS_MIGRATED_REVID=145597372
* Introduces --apple_crosstool_transition, which turns controls the activation ofGravatar Cal Peyser2017-01-20
| | | | | | | | the AppleCrosstoolTransition. -- PiperOrigin-RevId: 145006581 MOS_MIGRATED_REVID=145006581
* Set correct ENV variables for macOS builds.Gravatar Dmitry Shevchenko2017-01-19
| | | | | | | | * This allows xcrunwrapper to set the correct SDKROOT when building darwin targets. -- PiperOrigin-RevId: 144874291 MOS_MIGRATED_REVID=144874291
* AppleCrosstoolTransition is also applied to any incoming edge to a rule classGravatar Cal Peyser2017-01-13
| | | | | | | | | | | that may contain objc source. This only works with dynamic configurations turned on. This ensures that objc dependencies of non-objc targets use the apple crosstool. -- PiperOrigin-RevId: 144384483 MOS_MIGRATED_REVID=144384483
* Manually add periods to documentation strings where needed.Gravatar John Cater2017-01-03
| | | | | | | | -- Change-Id: I9ec3209a69ba5a51943b334f278ba93d67d4f9f4 Reviewed-on: https://cr.bazel.build/8090 PiperOrigin-RevId: 143470915 MOS_MIGRATED_REVID=143470915
* Expose apple.xcode_version() to skylark.Gravatar Chris Parsons2016-12-28
| | | | | | -- PiperOrigin-RevId: 143036358 MOS_MIGRATED_REVID=143036358
* Introduce --apple_crosstool_top, which sets the crosstool for sources in ↵Gravatar Cal Peyser2016-12-23
| | | | | | | | objc_*/apple_*/ios_* targets and their dependencies. -- PiperOrigin-RevId: 142793925 MOS_MIGRATED_REVID=142793925
* Rollback of commit 87fd5baeaa3f983bbec0c0dbc7b16eb52cf2267f.Gravatar Tobias Werth2016-12-22
| | | | | | -- PiperOrigin-RevId: 142758502 MOS_MIGRATED_REVID=142758502