aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/rules/apple
Commit message (Collapse)AuthorAge
* Add a flag to make Apple rules not share C++ compile actions.Gravatar lberki2018-07-26
| | | | | | | | | | | | | | | | | | | This is accomplished by: - Setting the APPLE_CROSSTOOL configuration distinguisher in AppleCrosstoolTransition - Doing nothing in AppleCrosstoolTransition in case we are already in an Apple configuration so that funky use cases like a binary having a dependency on a swift_library both directly and through an objc_library work - Adding the "apl-" prefix to the output directory name in APPLE_CROSSTOOL configurations Plus a few minor cleanups: - Removed some unused methods - Nopped out --enable_apple_crosstool_transition if the new flag is set - Nopped out --target_uses_apple_crosstool if the new flag is set These latter reduce the possible space of Apple configurations, thus making the code a bit more comprehensible. RELNOTES: None. PiperOrigin-RevId: 206157413
* Reference bazel rather than blaze in user message.Gravatar schmitt2018-07-13
| | | | | RELNOTES: None. PiperOrigin-RevId: 204531667
* Tell user to blaze clean --expunge.Gravatar dmaclach2018-07-09
| | | | PiperOrigin-RevId: 203813666
* Deletes AutoCodec.PUBLIC_FIELDS strategy. Superseded by DynamicCodec.Gravatar shahan2018-06-29
| | | | PiperOrigin-RevId: 202704472
* Make some Apple objects more serializable: tag constants as constant, tag ↵Gravatar janakr2018-06-19
| | | | | | lambdas as Serializable. PiperOrigin-RevId: 201191461
* Migrate remaining apple-related skylark types to skylarkbuildapiGravatar cparsons2018-06-01
| | | | | RELNOTES: None. PiperOrigin-RevId: 198880301
* Start migration of apple skylark build APIGravatar cparsons2018-05-25
| | | | | RELNOTES: None. PiperOrigin-RevId: 198107604
* Rename some instances of overloaded skylark-accessible methodsGravatar cparsons2018-05-23
| | | | | RELNOTES: None. PiperOrigin-RevId: 197799961
* Rename an AppleToolchain method to prevent overloading a skylark-exposed methodGravatar cparsons2018-05-23
| | | | | RELNOTES: None. PiperOrigin-RevId: 197744356
* Add libc_top attribute to cc_toolchain in preparation for moving config data ↵Gravatar jcater2018-05-16
| | | | | | out of CppConfiguration. PiperOrigin-RevId: 196838680
* Extract logic for dealing with CROSSTOOL values and build variables into ↵Gravatar rosica2018-05-14
| | | | | | | separate class RELNOTES: None. PiperOrigin-RevId: 196517537
* Clean up code that directly imports nested classes like Builder, Entry, etc.Gravatar jcater2018-05-02
| | | | PiperOrigin-RevId: 195100670
* Clean up code that directly imports nested classes like Builder, Entry, etc.Gravatar jcater2018-05-01
| | | | PiperOrigin-RevId: 194985157
* Remove `--swift_whole_module_optimization` flag.Gravatar allevato2018-03-28
| | | | | | Users should instead pass `--swiftcopt=-whole-module-optimization`, which has the same effect. PiperOrigin-RevId: 190800123
* Remove categories from Bazel options.Gravatar ccalvarin2018-03-28
| | | | | | | | | These have all had a chance to be categorized with the OptionDocumentationCategory enum, and the help output already uses the enum-grouped format. The "incompatible changes" category has meaning for --all_incompatible_changes and will be removed separately. RELNOTES: None. PiperOrigin-RevId: 190773778
* Expose an actions provider on RuleConfiguredTarget instances.Gravatar cparsons2018-03-06
| | | | | | | | | Given a target (for example from a skylark aspect), one will be able to access a list of actions that the target generated using "target.actions". This is without additional memory footprint. Actions themselves are not fully exposed to skylark (and thus there isn't much meaning to gather from them in skylark yet). Access methods will follow soon. RELNOTES: None. PiperOrigin-RevId: 188098079
* Convert a bunch of non-AutoCodec classes to use @AutoCodec: ↵Gravatar janakr2018-03-06
| | | | | | BuildConfiguration, BuildOptions, CollectTargetsUnderDirectoryValue. PiperOrigin-RevId: 188059815
* Deletes CODEC fields now that they are no longer needed.Gravatar shahan2018-02-28
| | | | PiperOrigin-RevId: 187397314
* Deprecate and remove several uses of the 'values' map in NativeInfo subclasses.Gravatar cparsons2018-02-28
| | | | | | | | | | These subclasses should be using @SkylarkCallable(structField = true) instead This is a bit of a memory win, as there is now no need to store field information twice. There are still a couple of stragglers that are more difficult, namely ToolchainInfo and DefaultInfo. Their APIs will likely need some more extensive revamping before proceeding. RELNOTES: None. PiperOrigin-RevId: 187364392
* Adds ObjectCodecRegistry to {Des|S}erializationContext.Gravatar shahan2018-02-20
| | | | | | | | | | | | * AutoCodec now delegates to the registry. * Adds getSuperclass logic for resolving a codec. * Small cleanups for classes that break the registry. TODO after this change: * Explicit CODEC definitions are no longer needed and existing ones should be cleaned up. * POLYMORPHIC is no longer be needed and should be cleaned up. PiperOrigin-RevId: 186351845
* Add context argument to ObjectCodec.{serialize,deserialize}Gravatar michajlo2018-02-11
| | | | | | | | | | Context implementations are currently empty, just doing the plumbing in this change. Once this is in we can start passing along the ObjectCodecRegistry, which will allow runtime codec resolution for classes not known at compile time. We'll also inevitably add some memoization helpers, allowing us to optimize the serialization process further. PiperOrigin-RevId: 185305674
* Stop allowing generic LateBoundDefault value types. Such types are always ↵Gravatar janakr2018-02-02
| | | | | | | | either a Label or a List<Label>. We can easily enforce this through static type checking, so do it. This will help with LateBoundDefault serialization, since we don't have to serialize an arbitrary object. PiperOrigin-RevId: 184347100
* Allows @AutoCodec to use factory methods.Gravatar shahan2018-01-29
| | | | | | Generalizes @AutoCodec.Constructor to @AutoCodec.Instantiator. PiperOrigin-RevId: 183702768
* Suggest 'bazel clean --expunge' to fix Xcode errors in AppleCcToolchain.Gravatar ruperts2018-01-17
| | | | | RELNOTES: None. PiperOrigin-RevId: 182271042
* Refactor SkylarkInfo constructorsGravatar brandjon2018-01-11
| | | | | | | | | - Info now has one protected constructor. (Would've preferred the builder pattern, but inheritance makes it much more verbose.) - Direct SkylarkInfo subclass access is replaced by factory methods and an isCompact() accessor. - Added/simplified tests RELNOTES: None PiperOrigin-RevId: 181616757
* Use an annotation preprocessor to validate SkylarkConfigurationField.Gravatar cparsons2018-01-10
| | | | | | | | This is a rollforward -- the previous attempt was rolled back due to incorrectly adding test sources. In addition, the newly checked in tests do not work on Windows, and are thus disabled on the Windows platform. I suspect this is due to a bug in the compile-testing library. RELNOTES: None. PiperOrigin-RevId: 181482589
* Codecs for all non-test Fragment subclasses (except CppConfiguration, ↵Gravatar shahan2018-01-05
| | | | | | handled separately). PiperOrigin-RevId: 180974083
* Automated rollback of commit 46356dfa59428b665aa280ba4cbca6e449f73c5b.Gravatar laszlocsomor2018-01-02
| | | | | | | | | | | | | *** Reason for rollback *** causes github #4375 and #4373 *** Original change description *** Use an annotation preprocessor to validate SkylarkConfigurationField. RELNOTES: None. PiperOrigin-RevId: 180535458
* ObjectCodecs for all non-test FragmentOption subclasses.Gravatar Googler2017-12-27
| | | | PiperOrigin-RevId: 180202221
* Use an annotation preprocessor to validate SkylarkConfigurationField.Gravatar cparsons2017-12-21
| | | | | RELNOTES: None. PiperOrigin-RevId: 179845261
* Remove xcode_toolchain flagGravatar dmishe2017-12-21
| | | | PiperOrigin-RevId: 179785531
* Removes skyframe/serialization's dependency on cmdline and vfs. Instead, ↵Gravatar Googler2017-12-11
| | | | | | make cmdline and vfs depend on serialization. This allows a class to have a pointer to its codec, which simplifies automatic recursive composite codecs. PiperOrigin-RevId: 178683500
* Improve error messaging for invalid values of the --xcode_version flag.Gravatar cparsons2017-11-29
| | | | | RELNOTES: None. PiperOrigin-RevId: 177337384
* Migrate callsites of CppConfiguation#getCompiler, #getTargetLibc, #getCpu toGravatar cpeyser2017-11-28
| | | | | | | CcToolchainProvider. Toolchain information must be removed from CppConfiguration to allow the c++ rules to use hermetic platforms. PiperOrigin-RevId: 177163880
* Shape sharing for Skylark providers.Gravatar Benjamin Peterson2017-11-27
| | | | | | | | | | Add CompactSkylarkInfo, which stores its values as an array instead of a map. The space savings will probably not be dramatic because providers usually have a limited amount of keys. But, there are a lot of them! Change-Id: Idd452a5e3982f773b1c5202c73f3d7031ec022c6 PiperOrigin-RevId: 176995376
* 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 support for Swift 2.3 toolchainGravatar dmishe2017-10-27
| | | | PiperOrigin-RevId: 173618971
* 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
* Categorize build options for BuildConfiguration.Gravatar gregce2017-10-06
| | | | PiperOrigin-RevId: 171017483