aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/rules
Commit message (Collapse)AuthorAge
* Remove defunct Android incremental dexing flagsGravatar kmb2018-01-04
| | | | | | RELNOTES: Remove defunct flags --experimental_incremental_dexing_for_lite_proto and --experimental_incremental_dexing_error_on_missed_jars that have long been enabled by default PiperOrigin-RevId: 180821902
* Correct comment for OneVersionEnforcementLevelConverter.Gravatar Benjamin Peterson2018-01-04
| | | | | | | Fixup from copy-paste in c5672f8edb1cb9fb7806024706d776901d7d434e ("Add the option for warning-level enforcement of One Version violations.") Change-Id: I90909b2f14aa7a8e0beadb99a72c25ab71bc40d8 PiperOrigin-RevId: 180779047
* 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
* Enable switching def_parser's Windows target for remote executionGravatar Yun Peng2018-01-02
| | | | | | | | | | | | When --define EXECUTOR=remote is specified in bazel command, embedded tools 'def_parser' will be compiled remotely from source. Because def_parser itself is a cc_binary, if we want to compile it remotely, to avoid cycle dependency it cannot be a dependency of cc_toolchain. Therefore, we make it a dependency of cc rules. Change-Id: I77faf77238f8edd3585d0e5e5c780b14e9782a40 PiperOrigin-RevId: 180534568
* Add android_local_test rule to Bazel.Gravatar dannark2017-12-31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This rule enables testing android_librarys locally in the jvm (as opposed to on a device). To use this rule with robolectric (robolectric.org), add the following to your WORKSPACE file: http_archive( name = "bazel_android", url = "...", ) load("@bazel_android//:setup_robolectric.bzl", "setup_robolectric") setup_robolectric() and then an android_local_test rule would need to add: "@bazel_android//:robolectric", to its dependencies. android_local_test( name = "MyTest", srcs = ["MyTest.java"], deps = [ "//java/app:lib", "@bazel_android//:robolectric", ], ) RELNOTES[NEW]: New android test rule, android_local_test. PiperOrigin-RevId: 180438995
* Replace Attribute.ConfigurationTransition with ↵Gravatar gregce2017-12-28
| | | | | | | | | | | | | | | | config.transitions.ConfigurationTransitionProxy. The "proxy" part is to dissuade people from writing: void myfunc(ConfigurationTransition transition) signatures casually. Maybe that's actually a better name than "Transition". But I'd rather rename Transition to ConfigurationTransition in its own change if we want to do that. PiperOrigin-RevId: 180285321
* Rename some ClassObject/Provider-related methodsGravatar brandjon2017-12-28
| | | | | | | The terminology "field" is preferred over "key" for the components of a struct or struct-like object. RELNOTES: None PiperOrigin-RevId: 180269374
* Fix include scanner's absolute path handling.Gravatar tomlu2017-12-27
| | | | | | | | | When absolute include dirs are used we can discover absolute includes outside any known root. * Fix bug where we try to create an absolute exec path. Instead, make the exec path relative to the root directory '/'. * Reverse the condition we use to filter absolute includes. We can identify these by their fake root ('/') before we create a path and linearly check if it is a system include. PiperOrigin-RevId: 180217154
* ObjectCodecs for all non-test FragmentOption subclasses.Gravatar Googler2017-12-27
| | | | PiperOrigin-RevId: 180202221
* Replace Attribute.SplitTransition with config.transitions.SplitTransition.Gravatar gregce2017-12-22
| | | | PiperOrigin-RevId: 179948322
* Remove some dead code from AndroidIdeInfoProvider.Gravatar ajmichael2017-12-22
| | | | | RELNOTES: None PiperOrigin-RevId: 179947662
* Replace Attribute.Transition with config.transitions.Transition.Gravatar gregce2017-12-22
| | | | PiperOrigin-RevId: 179936355
* Remove more dead codeGravatar Googler2017-12-22
| | | | | RELNOTES: none PiperOrigin-RevId: 179933248
* Remove dead android_resources codeGravatar Googler2017-12-22
| | | | | RELNOTES: none PiperOrigin-RevId: 179928735
* Redo FileType to reduce generated garbage.Gravatar tomlu2017-12-22
| | | | | | | | | | | | | * Change FileType to no longer assume it operates on just the base name (it can now be given a full path). * Move the responsibility to specific classes (Artifact, Path, PathFragment) to decide how they want to offer up a string that includes the file name. * Flip the order in which users are expected to check Artifact type, from FileType#matches(Artifact) to Artifact#isFileType(FileType). This looks natural and should encourage developers to use efficient file type checking methods. * Change CppCompileAction to use the new API. RELNOTES: None PiperOrigin-RevId: 179903239
* Only return a nocopts matcher if the attribute is explicitly specified.Gravatar tomlu2017-12-21
| | | | | | | Previously we'd return a matcher even for empty attributes. Pattern matching in Java generates garbage. RELNOTES: None PiperOrigin-RevId: 179864316
* Move config transition definitions out of lib.packages.Attribute.Gravatar gregce2017-12-21
| | | | | | | | | | | | | This cleans up a legacy API from Bazel's "static configuration" days, when transition definitions involved deep and complex logic in the analysis code. That was too much cruft to embed into lib.packages. But the modern definitions are way simpler and thus easier to embed. This change only *copies* the existing definitions. Because a lot of references will have to be updated, we'll migrate the move over a few changes. PiperOrigin-RevId: 179859293
* Deprecate "xctest" attribute from ios_test. This removes any functionality ↵Gravatar kaipi2017-12-21
| | | | | | related to using xctest = 0, but keeps the attribute to not break the users who have xctest = 1. PiperOrigin-RevId: 179855856
* Fix AliasRule to skip platform and toolchain resolution.Gravatar John Cater2017-12-21
| | | | | | | | | This causes a cycle in loading when an alias of a platform or constraint is used. Fixes https://github.com/bazelbuild/rules_go/issues/1161 Change-Id: I8b19ba94bfc52221416a3d99f5e5d4d80ce15bbd PiperOrigin-RevId: 179853665
* Automated rollback of commit 43f45b58acf10beadbb1221b71dfa06fa1341510.Gravatar jcater2017-12-21
| | | | | | | | | | | | | | | *** Reason for rollback *** Breaks some remote execution clients. *** Original change description *** Have the RemoteSpawnRunner use the execution platform present in the Spawn to get the remote execution properties. Fixes #4128. Change-Id: I7e71caef2465204d2dd8225448d54e52366807e6 PiperOrigin-RevId: 179847553
* Terminate --javacopt flags with `--`Gravatar cushon2017-12-21
| | | | | | | | | | | | JDK 9 adds javac flags that start with `--`, so we can't assume that `--` flags belong to JavaBuilder or turbine. Instead, we will use `--` by itself as a delimiter to parse e.g. `--javacopts --release 8 -- sources Hello.java`. This change cannot be released until versions of turbine and JavaBuilder are released that support the trailing `--`. After it is included in a Blaze release the other tools will be updated again to require the trailing `--`. PiperOrigin-RevId: 179847276
* Roll forward ↵Gravatar cushon2017-12-21
| | | | | | https://github.com/bazelbuild/bazel/commit/26b7ea6a37961ce993afe510d0ff8c1b5ecb30bc PiperOrigin-RevId: 179847149
* Use an annotation preprocessor to validate SkylarkConfigurationField.Gravatar cparsons2017-12-21
| | | | | RELNOTES: None. PiperOrigin-RevId: 179845261
* Remove android_resources and "resources" attributeGravatar Googler2017-12-21
| | | | | RELNOTES: none PiperOrigin-RevId: 179844898
* Remove package name from license.Gravatar dannark2017-12-21
| | | | | RELNOTES: None PiperOrigin-RevId: 179838832
* Change cfg(HOST) to cfg(HostTransition.INSTANCE).Gravatar gregce2017-12-21
| | | | | | Preparatory step for removing ConfigurationTransition.HOST. PiperOrigin-RevId: 179838374
* Use more robust check for bitcode inputs to linkGravatar Googler2017-12-21
| | | | | | | | | | | | The current checks used in several places for whether an LTO indexing step is needed only looked for direct LTO bitcode inputs. Instead we should use the existing hasLtoBitcodeInputs() method to look both at the direct inputs as well as inputs on all LibraryToLink. This was already used in similar checking on the CppBinary. With this change, all places that test for needing an LTO indexing step use the correct interface. RELNOTES: None PiperOrigin-RevId: 179812972
* Remove xcode_toolchain flagGravatar dmishe2017-12-21
| | | | PiperOrigin-RevId: 179785531
* Automated rollback of commit 56ef727987c05df2953a4a53935b4f9b899f9d81.Gravatar dannark2017-12-20
| | | | | | | | | | | | | | *** Reason for rollback *** Breaks guitar tests *** Original change description *** Allow --javabase to accept java_runtime (not just java_runtime_suite) Fixes bazelbuild/bazel#3407 PiperOrigin-RevId: 179771492
* Remove ConfigurationTransition.HOST references from lib.packages.Gravatar gregce2017-12-20
| | | | | | | | | | | | | | | | | | | | This removes the main barrier to making host transitions routine patch transitions. Today you signify a host transition by calling Attribute.Builder.cfg(ConfigurationTransition.HOST). Blaze's configuration machinery auto-converts this to HostTransition.INSTANCE, which is a patch transition. This change provides the groundwork for removing ConfigurationTransition.HOST and removing the special conversion logic. This also paves the way for better API support for multiple host configurations. Also change some cfg(HOST) rule references to cfg(HostTransition.INSTANCE). PiperOrigin-RevId: 179754619
* Remove legacy_native_support attribute.Gravatar ajmichael2017-12-20
| | | | | | | | This has been a no-op for a while. RELNOTES[INC]: android_* rules no longer support legacy_native_support attribute. PiperOrigin-RevId: 179749745
* Correct typos found by the linter.Gravatar gregce2017-12-20
| | | | PiperOrigin-RevId: 179748374
* Expose ObjcProtoAspect to Skylark.Gravatar cparsons2017-12-20
| | | | | RELNOTES: None. PiperOrigin-RevId: 179737025
* Inline JavaToolchainData into JavaToolchainProviderGravatar cushon2017-12-20
| | | | PiperOrigin-RevId: 179735701
* Allow --javabase to accept java_runtime (not just java_runtime_suite)Gravatar cushon2017-12-20
| | | | | | Fixes bazelbuild/bazel#3407 PiperOrigin-RevId: 179735489
* Default to not allowing the Android 'resources' attributeGravatar Googler2017-12-20
| | | | | RELNOTES: none PiperOrigin-RevId: 179733057
* Remove references to some internal tooling.Gravatar ajmichael2017-12-20
| | | | | RELNOTES: None PiperOrigin-RevId: 179722149
* Support for ThinLTO to be enabled implicitly with AFDOGravatar Googler2017-12-20
| | | | | | | Allows for ThinLTO to be enabled once the --features=autofdo_implicit_thinlto feature is enabled in the crosstool. Also allows for --features=-thin_lto to override and prevent ThinLTO from being enabled. RELNOTES: None. PiperOrigin-RevId: 179687743
* Remove CppConfiguration#supportsFission and #useFission. To do this, we:Gravatar cpeyser2017-12-20
| | | | | | | | | | | | (1) Remove configuration-level warnings arising from fission. (2) Move the setting of the "per_object_debug_info" feature from the configuration to FeatureConfiguration construction in the analysis phase. (3) Access the c++ toolchain in java_binary to decide on stripping. In order to migrate the c++ rules to platform-based toolchain resolution, we must remove all toolchain information from CppConfiguration. PiperOrigin-RevId: 179682420
* Expose --android_sdk to skylark as a configuration field.Gravatar ajmichael2017-12-19
| | | | | | | This is necessary for the Skylark migration of the Android rules. RELNOTES: None PiperOrigin-RevId: 179609332
* Replace java_plugin_configuration with java_package_configurationGravatar cushon2017-12-19
| | | | | | | | | java_toolchain.plugin_configuration creates cycles in the unconfigured target graph. Instead, use the same per-package configuration approach to allow enabling javacopts, which can be used to enable built-in checks on a per-package basis. PiperOrigin-RevId: 179598500
* Have the RemoteSpawnRunner use the execution platform present in the Spawn ↵Gravatar John Cater2017-12-19
| | | | | | | | | to get the remote execution properties. Fixes #4128. Change-Id: I7e71caef2465204d2dd8225448d54e52366807e6 PiperOrigin-RevId: 179595126
* Initial java_toolchain Java 9 readinessGravatar cushon2017-12-19
| | | | | | | | | | | | | Add a generic java_toolchain.javacopts attribute, and make some attributes that aren't needed for Java 9 optional (source_version, target_version, bootclasspath, extclasspath). In hindsight there aren't any real advantages to baking details of javac flags into java_toolchain except for the ones that deal with search paths (classpath etc.). Using a more general javacopts attribute will avoid churn in the future as the javac API changes. This is pre-work for supporting e.g. --release. PiperOrigin-RevId: 179590640
* Retire some pre-skylark machinery for accessing the contents of java_toolchainGravatar cushon2017-12-19
| | | | | | and replace the only use with java_common.default_javac_opts. PiperOrigin-RevId: 179571481
* Ensure that the target package in the <instrumentation> tag of the ↵Gravatar jingwen2017-12-19
| | | | | | | | | | | | instrumentation android_binary's AndroidManifest.xml references the correct package name of the instrumented android_binary. During an instrumentation test, ART will use the targetPackage specified in the instrumentation APK's AndroidManifest to determine the application to be instrumented. We can perform this check in Bazel at execution time, before the apps are loaded onto the device. See android_instrumentation_test_integration_test.sh for the e2e example. GITHUB: https://github.com/bazelbuild/bazel/issues/903 RELNOTES: None. PiperOrigin-RevId: 179564246
* Move CppConfiguration#getCompilerFlags and #getCxxFlags to CcToolchainProvider.Gravatar cpeyser2017-12-19
| | | | | | This is required to migrate the c++ rules to use platform based toolchain selection. PiperOrigin-RevId: 179552579
* Remove FeatureSpecification, use plain sets insteadGravatar hlopko2017-12-19
| | | | | RELNOTES: None. PiperOrigin-RevId: 179534164
* Remove source category from CcCommon.configureFeaturesGravatar hlopko2017-12-19
| | | | | | | | Inline SourceCategory.CC action configs, as CC is the only source category that is ever passed to this method. RELNOTES: None. PiperOrigin-RevId: 179522955
* Consolidate instances of the --keep_going flag.Gravatar juliexxia2017-12-18
| | | | | RELNOTES: None. PiperOrigin-RevId: 179468685
* Remove support for --android_sdk=<filegroup>.Gravatar ajmichael2017-12-18
| | | | | | RELNOTES[INC]: --android_sdk no longer supports filegroup targets. PiperOrigin-RevId: 179451275