aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/rules
Commit message (Collapse)AuthorAge
* Enforce @SkylarkCallable must have a non-empty doc string or explicitly be ↵Gravatar cparsons2018-03-30
| | | | | | | documented=false. RELNOTES: None. PiperOrigin-RevId: 191112140
* Remove category checking from incompatible changes.Gravatar ccalvarin2018-03-30
| | | | | | | String categories are deprecated, replace this special-cased value with a specific OptionMetadata tag, TRIGGERED_BY_ALL_INCOMPATIBLE_CHANGES. RELNOTES: None. PiperOrigin-RevId: 191069412
* Allow Merge action to take an interface as primary, not just ResourceContainerGravatar asteinb2018-03-29
| | | | | | | | | | | | | | In future reviews, we will use this to be able to pass assets and resources individually. Introduce replacement for ResourceContainerConverter that can handle generics and should be about as flexible. To support that replacement, slightly improve how CustomCommandLine handles generics. RELNOTES: none PiperOrigin-RevId: 190970298
* Pass resources and assets seperately into parse and compile actionsGravatar asteinb2018-03-29
| | | | | | | | | | | This will eventually allow us to parse or compile assets and resources separately. Also, remove a no-op null check that was making the code confusing, and some unneeded resource filtering that was doing the same. RELNOTES: none PiperOrigin-RevId: 190951667
* Fixing issue with external j2objc protos (reattempt at #4058)Gravatar Mike Lewis2018-03-29
| | | | | | | | | | | | | | | | | | This is a re-attempt at https://github.com/bazelbuild/bazel/pull/4058 which got reverted via https://github.com/bazelbuild/bazel/issues/4780 #4780 was being caused because cc plugin and j2objc plugin used different paths for outputs. I also manually verified that this works for both external cc_proto_librarys and external j2objc java_proto_libraries. The output files are created without a repository, but the expected filenames have them This resolves issues when having a proto_library from an external build file. cc @c-parsons @pmbethe09 Closes #4793. PiperOrigin-RevId: 190950452
* Rename LocalResourceContainer to AndroidResources and remove asset code from itGravatar asteinb2018-03-29
| | | | | | | | | | | | | As part of decoupling Android resources and assets, rename LocalResourceContainer to AndroidResources and remove asset code from it. Some general asset and manfiest code still remains and will be dealt with in future changes. Remove LocalResourceContainer from the ParsingActionBuilder, since it's always used to build the ResourceContainer that is subsequently passed in. RELNOTES: none PiperOrigin-RevId: 190945260
* Split AndroidAssets class out of LocalResourceContainerGravatar asteinb2018-03-29
| | | | | | | | | | AndroidAssets will be the new home for asset-related code (including, in the future, from ResourceContainer). This is the first step towards decoupling Android asset and resource processing. LocalResourceContainer will be replaced with resource-specific code in the next change. RELNOTES: none PiperOrigin-RevId: 190936954
* C++: Remove headers from input to linking action.Gravatar plf2018-03-29
| | | | | | | | | Headers were made an input to the linking action simply to get an error when we have a src-less cc_library with declared but missing headers. Since there was no compilation action, the headers were not an input to any action and there was no error when the files were missing. After discussing it with the team, it was decided that this is not needed anymore. Files can be missing as long as they are not consumed. RELNOTES:none PiperOrigin-RevId: 190915591
* Rename Blaze -> Bazel in Cpp optionsGravatar andy g scott ?2018-03-29
| | | | | | Closes #4909. PiperOrigin-RevId: 190895706
* Remove BuildConfiguration from ConfiguredTarget.Gravatar janakr2018-03-28
| | | | PiperOrigin-RevId: 190804641
* 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
* Make deprecated ObjcProvider fields return empty sets when ↵Gravatar cparsons2018-03-28
| | | | | | | | | --incompatible_disable_objc_provider_resources is true. This involves propagating SkylarkSemantics to all ObjcProvider constructors. RELNOTES: Introduce --incompatible_disable_objc_provider_resources to turn off all resource-related fields of the Objc provider. PiperOrigin-RevId: 190778491
* Add a skylark-compatible alternative to MessageBundleProviderGravatar cushon2018-03-28
| | | | PiperOrigin-RevId: 190775527
* 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
* Delete the ios_device rule from bazel.Gravatar kaipi2018-03-28
| | | | PiperOrigin-RevId: 190771926
* Move strip and compile build variables into separate classesGravatar hlopko2018-03-28
| | | | | | | | Working on link build variables I see they cannot stay in a single file, they're too big and complicated. This will make the followup cl smaller. RELNOTES: None. PiperOrigin-RevId: 190771072
* Inline ObjectFilePathHelperGravatar pcloudy2018-03-28
| | | | | | | Since it's not used anywhere else outside of CcCompilationHelper.java RELNOTES: PiperOrigin-RevId: 190755588
* ObjcLibrary.java: Use objectFilesCollector to get object filesGravatar pcloudy2018-03-28
| | | | | | | This can avoid passing targetBuilder to CompilationSupport.java RELNOTES: None PiperOrigin-RevId: 190743994
* Expose j2objc.dead_code_report as a configuration field instead of a basic ↵Gravatar cparsons2018-03-27
| | | | | | | struct field on the j2objc fragment. RELNOTES: None. PiperOrigin-RevId: 190672475
* C++: Fixes Blaze crashing on CLIF in toolchains that don't need PICGravatar plf2018-03-27
| | | | | | | | | | | | | | | | | | | | For CLIF it doesn't matter whether we use PIC or no-PIC, the important thing is we get an output protobuf. Before https://github.com/bazelbuild/bazel/commit/35773928532c132e3229b490ad98f4ebfd3e5770, using no-PIC was hardcoded. In this CL it was decided to generate PIC instead because the toolchains used by CLIF targets appeared to all have needsPic. In b/73955395 it has been shown not to be the case. In this CL I'm changing the logic again to use no-PIC for CLIF and to circumvent the logic that checks what the configuration and the toolchain say. At the same time, SWIG also used the method setGenerateNoPic() after the variable onlySingleOutput was removed in https://github.com/bazelbuild/bazel/commit/4e9c9f93b15dd2594097644c6b9ca5a579c712fb. In this CL I use the enum to apply PIC and no-PIC in the same cases as before for SWIG. This CL also refactors the methods and boolean variables used to determine whether to use PIC or not, hopefully making it clearer. RELNOTES:none PiperOrigin-RevId: 190615548
* Remove optional_*_flag fields from crosstoolGravatar hlopko2018-03-27
| | | | | | | | | They are not used anyway. optional_compiler_flag will be removed once internal migration is finished. RELNOTES: CppRules: Remove optional_*_flag fields from CROSSTOOL, they are not used, and could be expressed using features. PiperOrigin-RevId: 190600731
* Avoid using ObjectFilePathHelper in CompilationSupport.javaGravatar pcloudy2018-03-27
| | | | | RELNOTES: None. PiperOrigin-RevId: 190591828
* Isolate C++ compile build variablesGravatar hlopko2018-03-27
| | | | | | | | | | | | | | This is a preparation work to expose Variables instance for all compile actions to Skylark. I didn't do linking variables in this cl, because this cl is already too big. But they're coming shortly in a separate cl. This is also in line with our goal to make build variables more discoverable and better document. RELNOTES: None. PiperOrigin-RevId: 190591080
* Simplify Executor.getSpawnActionContext() by removing mnemonic: spawn is enough.Gravatar Googler2018-03-26
| | | | | RELNOTES: None PiperOrigin-RevId: 190544948
* Enable params files for DexMapper.Gravatar ahumesky2018-03-26
| | | | | RELNOTES: None PiperOrigin-RevId: 190516662
* Prohibit using Java serialization for protos.Gravatar cpeyser2018-03-26
| | | | PiperOrigin-RevId: 190500851
* Simplified ActionContextConsumer by having it operate on a new class which ↵Gravatar Googler2018-03-26
| | | | | | holds a variety of strategy/context maps. PiperOrigin-RevId: 190491357
* Remove the unused label //tools/defaults:coverage .Gravatar lberki2018-03-26
| | | | | RELNOTES: None. PiperOrigin-RevId: 190434178
* @AutoCodec some more classes needed for large Java builds.Gravatar janakr2018-03-25
| | | | PiperOrigin-RevId: 190392567
* @AutoCodec ProtoCompileActionBuilder$LazyCommandLineExpansion and ↵Gravatar janakr2018-03-24
| | | | | | $LazyLangPluginFlag. PiperOrigin-RevId: 190349246
* @AutoCodec map functions in ProtoCompileActionBuilder.Gravatar janakr2018-03-23
| | | | PiperOrigin-RevId: 190293560
* @AutoCodec JavaRunfilesProvider.Gravatar janakr2018-03-23
| | | | PiperOrigin-RevId: 190277450
* Expose mergeManifests method in SkylarkGravatar asteinb2018-03-23
| | | | | RELNOTES: none PiperOrigin-RevId: 190253911
* RELNOTES: Move (c/cxx)opts from legacy_compile_flags to user_compile_flagsGravatar Googler2018-03-23
| | | | PiperOrigin-RevId: 190224987
* Fix test flakiness due to the filesystem mutations done during the 'fetch' ↵Gravatar nharmata2018-03-23
| | | | | | | | | work done by BazelPackageBuilderHelperForTesting#sanityCheckBazelPackageLoader. We fix this flakiness by _not_ having RepositoryDelegatorFunction unconditionally 'fetch' local repos. We then have to make a change to BazelPackageLoader test to reinstate these mutations, since it was only working before due to the unconditional filesystem mutations done here :p RELNOTES: None PiperOrigin-RevId: 190222830
* Shorten object file pathGravatar pcloudy2018-03-23
| | | | | | | | | | | | | | | | | | | | | | | Closes #4781. Fix https://github.com/bazelbuild/bazel/issues/4149 RELNOTES: Users can now pass --experimental_shortened_obj_file_path=true to have a shorter object file path, the object file paths (and all other related paths) will be constructed as following: If there's no two or more source files with the same base name: <bazel-bin>/<target_package_path>/_objs/<target_name>/<source_base_name>.<extension> otherwise: <bazel-bin>/<target_package_path>/_objs/<target_name>/N/<source_base_name>.<extension> N = the file?s order among the source files with the same basename, starts from 0. Examples: 1. Output names for ["lib1/foo.cc", "lib2/bar.cc"] are ["foo", "bar"] 2. Output names for ["foo.cc", "bar.cc", "foo.cpp", "lib/foo.cc"] are ["0/foo", "bar", "1/foo", "2/foo"] The default value of --experimental_shortened_obj_file_path option is false, but we plan to flip it to true and eventually remove this option. You shouldn't depend on the format of generated object file path, but if you do and this change breaks you, please use --experimental_shortened_obj_file_path=false to work around it. PiperOrigin-RevId: 190214375
* Victory lap: Remove all code that used to support the three-argument form of ↵Gravatar lberki2018-03-23
| | | | | | | vardef(). RELNOTES: None. PiperOrigin-RevId: 190196933
* Add AndroidManifest and related classes for new manifest merging implementationGravatar asteinb2018-03-22
| | | | | | | | | | | | | | | | | | | | | | | | | | AndroidManifest represents a new class to handle decoupled Android manifest processing (as opposed to the existing ApplicationManifest, which handles manifests, resources, and assets all together). This new manifest processing pipeline will be used by the Skylark Android Data API. AndroidManifest wraps the manifest and related information, so we don't just pass around untyped Artifacts all the time. Additionally, the StampedAndroidManifest subclass explicitly states that a manifest has been stamped with the correct package (previous confusion between passing around the stamped and unstamped manifests has led to bugs in Blaze). Unlike the old manifest processing pipeline, AndroidManifest: - Does not support the old legacy manifest merger - Is decoupled from resource and asset processing - Does incremental merges - Always has the package defined at analysis time - Can be run without an input manifest (for rules which don't specify their own manifest but either inherit manifests that should be merged or to provide a dummy manifest for tooling) RELNOTES: none PiperOrigin-RevId: 190119992
* Create AndroidManifestInfo providerGravatar asteinb2018-03-22
| | | | | | | | | This provider is the first part of the Skylark Android Data API. This provider is not yet used by the native android_* rules, and is subject to change if needed to implement the rest of the Skylark Android data API. RELNOTES: none PiperOrigin-RevId: 190078860
* Ensure -fPIC set on shared non-LTO backends as neededGravatar Googler2018-03-22
| | | | | | | | | | | | | | Set the usePicForLtoBackend bit on the link action builder when we create static link actions. Before https://github.com/bazelbuild/bazel/commit/8c5e290dfab3cab378a9ca107ecdd6267403cd4b this wasn't required for static library link actions, as the LTO backend actions weren't created until the dependent binary's link action, which set this flag for the binary static link. However, with that change, we now create shared non-LTO backend actions early, when creating the library link action, for use later when we create the binary link action. So that flag needs to be set properly on the static library link action to get the -fPIC flag set as needed on the shared non-LTO backends. RELNOTES: None PiperOrigin-RevId: 190074918
* Move ConfigFeatureFlagConfiguration.Options to a top-level class.Gravatar mstaib2018-03-22
| | | | | | | | This class is about to get bigger in a major way, so let's put it in its own class. This also moves the tests to their own test class, since that class is about to get a lot bigger too. RELNOTES: None. PiperOrigin-RevId: 190065717
* Assume toolchain supportsDynamicLinker from presence of ↵Gravatar hlopko2018-03-22
| | | | | | | | | | | | | | | "dynamic_linking_mode" feature Toolchains no longer have to provide linking_mode_flags { mode: DYNAMIC } to state that they support dynamic linking mode. It is enough to provide a feature. This is part of ongoing work to get rid of linking_mode_flags from the CROSSTOOL. This is rollforward of https://github.com/bazelbuild/bazel/commit/3dab964407a2f1e12feb439d8507079bc06cb769. RELNOTES: None. PiperOrigin-RevId: 190059334
* Remove ResourceFilterFactory#getOutputDirectorySuffix().Gravatar lberki2018-03-22
| | | | | | | | | I have a bit of a PTSD wrt. output directory naming (although stritcly speaking, the trauma is not over yet...) so I'm very happy to remove functionality that reminds me of having that problem. RELNOTES: None. PiperOrigin-RevId: 190052059
* Remove overloaded function in QueryEnvironmentFactoryGravatar dbabkin2018-03-22
| | | | | RELNOTES: none PiperOrigin-RevId: 190046225
* Remove an unused flag.Gravatar lberki2018-03-22
| | | | | | | I don't know what it *was* used for, but it sure is never writen at the moment, nor is it useful on the command line. RELNOTES: None. PiperOrigin-RevId: 190031826
* Stop objc_proto_library from returning the generated sources.Gravatar kaipi2018-03-21
| | | | PiperOrigin-RevId: 189971511
* Remove obsolete phrase about SDKs and aaptGravatar Googler2018-03-21
| | | | | | | All SDKs now have aapt2 in them. RELNOTES: None. PiperOrigin-RevId: 189935587
* Automated rollback of commit 3dab964407a2f1e12feb439d8507079bc06cb769.Gravatar hlopko2018-03-21
| | | | | | | | | | | | | | | | | | | *** Reason for rollback *** Break bazel ci. *** Original change description *** Assume toolchain supportsDynamicLinker from presence of "dynamic_linking_mode" feature Toolchains no longer have to provide linking_mode_flags { mode: DYNAMIC } to state that they support dynamic linking mode. It is enough to provide a feature. This is part of ongoing work to get rid of linking_mode_flags from the CROSSTOOL. RELNOTES: None. PiperOrigin-RevId: 189928991
* Remove support for dynamically configured resource filteringGravatar asteinb2018-03-21
| | | | | | | | | | | | Dynamically configured resource filtering was never turned on, as dynamic configuration turned out to be too slow. While we're at it, do a bit of related cleanup (remove the unused flag that controlled resource filtering in analysis, and switch from a now-two-valued enum to a boolean to specify whether resources should be filtered in analysis). RELNOTES: none PiperOrigin-RevId: 189923588
* Automated rollback of commit 67549a752c2316234b19d7b50ea84a8ae80d3669.Gravatar hlopko2018-03-21
| | | | | | | | | | | | | | | | | | | | | | | | *** Reason for rollback *** Breaks on windows: https://www.google.com/url?sa=D&q=https%3A%2F%2Fbuildkite.com%2Fbazel%2Fgoogle-bazel-presubmit%2Fbuilds%2F624%234a68440b-948b-437b-a633-4f0595721bab *** Original change description *** Automated rollback of commit 3c5a1098af0c5ae80d4e3b1fc52dd1fef6027d43. *** Reason for rollback *** Breaks bazel ci: https://github.com/bazelbuild/bazel/issues/4894#event-1533040075 *** Original change description *** Add crosstool_lib.bzl and crosstool_utils.bzl These will be used to rewrite current crosstool autoconfiguration into action_configs and features. RELNOTES: None. PiperOrigin-RevId: 189906675