aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com
Commit message (Collapse)AuthorAge
* Move RuleConfiguredTarget to lib.analysis.configuredtargets.Gravatar gregce2017-09-19
| | | | | | This is a trivial change with a large file footprint. PiperOrigin-RevId: 169169864
* Cleanup some databinding code that was messed up by ↵Gravatar ajmichael2017-09-19
| | | | | | | https://github.com/bazelbuild/bazel/commit/b30b3de23a7fa01b8290ace0e688d75405689825 RELNOTES: None PiperOrigin-RevId: 169169249
* Make ObjectCodecs.ClassKeyedBuilder more reasonableGravatar michajlo2017-09-19
| | | | | | | | | Not sure why we passed in Class<T>, ObjectCodec<? extends T> - it should really be the other way around, since ObjectCodec<T> should be able to serialize <? extends T>.... RELNOTES: None PiperOrigin-RevId: 169161061
* Remove flags with no effect from --dexopts_supported_in_dexmerger default in ↵Gravatar kmb2017-09-19
| | | | | | | | preparation for removing those flags from the tool. RELNOTES: none PiperOrigin-RevId: 169154032
* use toList.contains for depset containsKey instead of toSetGravatar cparsons2017-09-19
| | | | | | | This should be a slight performance improvement on the previous implementation, as NestedSet.toSet() calls toList() and then throws the contents into a set RELNOTES: None. PiperOrigin-RevId: 169150743
* Uploading failed action outputs to the remote cache, because even if the ↵Gravatar olaola2017-09-19
| | | | | | | | | tests fails, we still want to be able to download the logs and other outputs from CAS. This fixes a bug introduced by https://github.com/bazelbuild/bazel/commit/562fcf9f5dfd14daea718f77da95b43b1400689b. To reproduce: run a failing test vs a BES service, the test log would not be uploaded. TESTED=unit tests PiperOrigin-RevId: 169143428
* Remove unnecessary injection of precomputed values. Precomputed values are ↵Gravatar janakr2017-09-19
| | | | | | injected in BlazeCommandDispatcher#execExclusively. PiperOrigin-RevId: 169122571
* Cleanup ActionConstructionContext.Gravatar dslomov2017-09-19
| | | | | | | Do not expose the underlying Rule. RELNOTES: None. PiperOrigin-RevId: 169109552
* Unify buildevnts indicating build completionGravatar Klaus Aehlig2017-09-19
| | | | | | | ...by factoring out the common code parts. Change-Id: I2ead39ea218dd535af9684a81a7bbe29b558aa27 PiperOrigin-RevId: 169106854
* Fix documentation for android_sdk_repository.build_tools_version.Gravatar ajmichael2017-09-18
| | | | | RELNOTES: None PiperOrigin-RevId: 169092834
* Java Launcher: Create classpath jar with a random nameGravatar Yun Peng2017-09-18
| | | | | | | | | | | | | | | When the classpath is too long, the launcher creates a jar file to pass the classpath value. This change makes the jar file's name random. It fixed the bug that when running multiple instances of the same java binary, they all try to create the same classpath jar file. For example, when running java_test with shard_count > 1. Also, we delete the classpath jar file after the program finishes, so that we don't leave any garbages behind. Change-Id: I67926b3ef76dcb1806797e977ecaa7c6763c5cf2 PiperOrigin-RevId: 169087032
* Fix BEP to report SKIPPED with TargetCompletedId instead of ConfigurationIdGravatar Googler2017-09-18
| | | | PiperOrigin-RevId: 169067125
* RELNOTES: Fix documentation typo.Gravatar Googler2017-09-18
| | | | PiperOrigin-RevId: 169060289
* Change param file arg string to a format string instead of a prefix string.Gravatar tomlu2017-09-18
| | | | | | Makes it easier to do Skylark param file support which uses a format string. PiperOrigin-RevId: 169019600
* Project reorg: move *ConfiguredTarget to new configuredtargets/ pathGravatar gregce2017-09-18
| | | | | | | Exempt RuleConfiguredTarget in this change because that's liable to touch a billion files. PiperOrigin-RevId: 168929827
* Remove LipoTransition (and replace remaining LIPO_COLLECTOR references).Gravatar gregce2017-09-18
| | | | | | | | Rules should now be configured directly with patch transitions. This brings down our transition interfaces to: Transition, ConfigurationTransition, SplitTransition, PatchTransition. PiperOrigin-RevId: 168927364
* Fix PlatformInfo to correctly report all duplicate constraints, not just the ↵Gravatar John Cater2017-09-18
| | | | | | | first. Change-Id: I3d78418d2c51d09e3862fbab1854ae73a0b3253c PiperOrigin-RevId: 168889865
* Every rule class that uses a cc_toolchain also has knowledge of the label forGravatar cpeyser2017-09-18
| | | | | | the c++ toolchain type through an implicit attribute. PiperOrigin-RevId: 168864540
* Throw away the confusing UnparsedOptionValueDescription name.Gravatar ccalvarin2017-09-18
| | | | | | | | | | | | | | We get UnparsedValues after ... parsing the options. So that doesn't make sense. What was meant was that it wasn't converted to the final value. In an effort to make this distinction more clear, this change will make the terminology more consistent. The `--foo=bar` step is "parsing" and the `bar -> Object` step is "converting" (it is, in fact, done by Converters). RELNOTES: None. PiperOrigin-RevId: 168852847
* Toolchain type labels for c++ are filegroups instead of toolchain_type.Gravatar cpeyser2017-09-18
| | | | PiperOrigin-RevId: 168835640
* Automated rollback of commit f26e8694ae78599b3e2004e3360eaf3443fa53a6.Gravatar hlopko2017-09-18
| | | | | | | | | | | | | | | | | | | | *** Reason for rollback *** Breaks clang_tidy. *** Original change description *** Introduce -c source_file -o output_file build variables Prior to this cl CompileCommandLine would (almost) unconditionally emit -c and -o flags. This cl removes this logic and relies on crosstool to emit these flags. This is another small step towards platform independent C++ rules. Memory use is not affected, since the build variables used by this cl are already exposed, this cl just forces crosstools to use it. RELNOTES: None. PiperOrigin-RevId: 168834576
* Bazel now can build dynamic library from cc_libraryGravatar Yun Peng2017-09-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Working towards: https://github.com/bazelbuild/bazel/issues/3311 When building dynamic library on Windows, Bazel builds an import library and a DLL. Bazel provides a feature called windows_export_all_symbols, if this feature is enabled(and no_windows_export_all_symbols is not) for a cc_library, then Bazel parses object files of that cc_library to generate a DEF file that will be used during linking time to export symbols from DLL. This feature can be specified at crosstool, package, target and command line level. A few differences from Unix platforms: 1. We don't build the shared library on Windows by default, users have to specifiy --output_groups=dynamic_library for building dynamic libraries. This output group is also available on other platforms. 2. By default, cc_test is dynamically linked on Unix, but it will be statically linked on Windows by default. (meaning the default value of linkstatic in cc_test is 1 on Windows, and 0 on other platforms) 3. For global data symbols, __declspec(dllimport) must still be used in source files. Remaining issues: 1. Extensions for import library and DLL are not correct yet. 2. DLLs are not guaranteed to be available during runtime yet. 3. Diamond problem If a cc_library A is specified as linkstatic=0, then no dynamic library will be built for it, so if another cc_library B depends on it, A will be statically linked into B, and if a cc_binary C depends on B, A will also be statically linked into C and B will be dynamically linked to C. This is wrong because A is duplicated in both B and C. It is essentially a diamond problem describled in C++ Transitive Library. (https://docs.google.com/document/d/1-tv0_79zGyBoDmaP_pYWaBVUwHUteLpAs90_rUl-VY8/edit?usp=sharing) Hopefully, we can avoid this by using cc_shared_library rule in future. Change-Id: I23640d4caf8afe65d60b1522af6368536d7a8408 PiperOrigin-RevId: 168829958
* `repository_name()` and `package_name()` are available only in loading phaseGravatar laurentlb2017-09-18
| | | | | RELNOTES: None. PiperOrigin-RevId: 168815084
* Automated rollback of commit ca216f5eb4b1f1892219db0f578495bbbdbaa875.Gravatar philwo2017-09-15
| | | | | | | | | | | | | | | *** Reason for rollback *** Breaks Bazel building itself on FreeBSD, also #3739. *** Original change description *** Introduce empty "toolchain_category" rule for labels that will be used as categories of toolchains for the purpose of toolchain selection. Up to now, we've used the native toolchain_type rule for this purpose. That rule depends on a number of configuration fragments that supply build variables - we don't want toolchains to need to depend on those fragments as well. E.g. toolchain_type depends on JvmConfiguration, but we would like toolchains to work with --experimental_disable_jvm. PiperOrigin-RevId: 168810566
* Automatic code cleanup.Gravatar cushon2017-09-15
| | | | PiperOrigin-RevId: 168802886
* Stop passing around unused JavaCommon object.Gravatar ajmichael2017-09-15
| | | | | RELNOTES: None PiperOrigin-RevId: 168781738
* Avoid flattening nested sets when constructing SingleJar source jar.Gravatar tomlu2017-09-15
| | | | PiperOrigin-RevId: 168771952
* Avoid nested set expansion for deploy archives.Gravatar tomlu2017-09-15
| | | | | | | | | android_local_test and java_test/java_binary do not need to flatten their nested sets because they do not have a jar mapping. android_test and android_binary still flatten because of desugaring. RELNOTES: None PiperOrigin-RevId: 168771671
* blaze: g3doc: fix closing HTML tagGravatar mpn2017-09-15
| | | | | RELNOTES: Tiny all() and any() documentation fix. PiperOrigin-RevId: 168767065
* Support multiple command lines / params files in SpawnAction.Gravatar tomlu2017-09-15
| | | | | | This is necessary for the upcoming Skylark implementation of param files. PiperOrigin-RevId: 168744486
* Add whitelists for android_resources removalGravatar Googler2017-09-15
| | | | | | | Add additional tooling for removing android_resources RELNOTES: none PiperOrigin-RevId: 168741510
* Add serialization support to BlazeDirectories (and .hashCode() and .equals() ↵Gravatar janakr2017-09-15
| | | | | | | | support into the bargain). Equality checking isn't that important since there's only one instance per Blaze server, but it keeps serialization semantics reasonable. PiperOrigin-RevId: 168735669
* Do not flatten resource artifacts in Android rules.Gravatar tomlu2017-09-15
| | | | | | This involves rather tediously rolling up each artifact type in its own individual nested set. PiperOrigin-RevId: 168729120
* Use top-level targets' configurations for convenience symlinks.Gravatar mstaib2017-09-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds a new flag, --use_top_level_targets_for_symlinks. Configuration-specific convenience symlinks (i.e., (prefix)bin, (prefix)genfiles, (prefix)testlogs) previously pointed at the one top-level target configuration. If there were multiple top-level target configurations, which could only happen when --experimental_multi_cpu was used, then no symlinks would be created, though they would not be deleted either. With the flag on, the output directories of the configurations actually used by the top-level targets (after rule class transitions etc.) are compared. If all targets with non-null configurations have the same configuration (or, more specifically, if all targets with non-null configurations have configurations with the same output directory), then a symlink is created pointing at it. Otherwise, the symlink is deleted, to avoid confusion with stale symlinks from old builds. Known changes in behavior WITHOUT the flag turned on: * In the --experimental_multi_cpu case, non-configuration-specific convenience symlinks (i.e., (prefix)(workspace) and (prefix)out) will always be created, even though they previously wouldn't have been created at all in this case. (should be harmless) * In the --experimental_multi_cpu case, configuration-specific convenience symlinks will be created if all configs have the same output directory. (should be safe, or specifically, should never happen because multi-cpu would necessarily change the output path, but shouldn't hurt anything even if it did) * In the --experimental_multi_cpu case, configuration-based convenience symlinks will be deleted if some configs have a different output directory. (slightly more noticeable since that will be every build using experimental_multi_cpu, but then, it is experimental) RELNOTES: None. PiperOrigin-RevId: 168720843
* Remove warning about multiple options in copts.Gravatar Joe Finney2017-09-15
| | | | | | | | | Fixes #3526 Closes #3725. Change-Id: Ice068542e574661f9dff199f88a1e56fea191de3 PiperOrigin-RevId: 168720424
* Remove unused late-bound attributes for target and execution platforms.Gravatar jcater2017-09-15
| | | | PiperOrigin-RevId: 168703757
* Zipped LLVM multi-arch profiles is now supported.Gravatar Googler2017-09-15
| | | | | RELNOTES: None. PiperOrigin-RevId: 168703540
* BEP: Upon missing test targets, still generate a finished eventGravatar Klaus Aehlig2017-09-15
| | | | | | | | If a test command is aborted as no tests are found, still generate a BuildComplete event in the sequence of build events to properly report the exit status. Change-Id: Id811a116b309a26e67332947b3a5c66363b1ce9c PiperOrigin-RevId: 168703240
* Internal changeGravatar tomlu2017-09-15
| | | | PiperOrigin-RevId: 168699077
* Introduce "bazel help flags-as-proto" to print information about supported ↵Gravatar fwe2017-09-14
| | | | | | flags as a text protobuf. PiperOrigin-RevId: 168695297
* Only compute hostname once per server lifetimeGravatar hlopko2017-09-14
| | | | | | | | | | | | NetUtil.getShortHostName can take seconds on mac and on windows (like, 20!), since it performs reverse dns lookup. We already cached hostname for the BazelWorkspaceStatusModule, let's cache it for entire bazel server. Also make sure that users of the method understand it's cached. Fixes #3586. RELNOTES: None. PiperOrigin-RevId: 168691615
* Avoid wasting cpu/garbage formatting preconditions stringGravatar michajlo2017-09-14
| | | | | RELNOTES: None PiperOrigin-RevId: 168691489
* Implement PlatformBaseRule which describes the common settings for all ↵Gravatar juliexxia2017-09-14
| | | | | | platform-related rules PiperOrigin-RevId: 168690846
* Pass the UnparsedOptionValues when setting or adding option values.Gravatar ccalvarin2017-09-14
| | | | | | | | Stop breaking the value apart to be recombined later. Also stop using OptionValueDescriptions as though we have a final option when expanding flags for invocation policy. These values are explicitly the output from parsing the expansion strings, not yet converted or combined with other values of the same flag. After this change, only UnparsedOptionValueDescription should be used when strings of flags are parsed, and OptionValueDescription should be used when the final version of a flag is created or used. PiperOrigin-RevId: 168688063
* Implemented a check for implicitly-exported deps in android_library, and ↵Gravatar jingwen2017-09-14
| | | | | | | | | raise a warning/error depending on --experimental_allow_android_library_deps_without_srcs (defaulted to true for a warning). Previously, users of generated android_library rules with this specific attribute combination do not see the warning message because the message comes from a Skylark macro. Once this is in, users having such a rule (even in their transitive, generated dependencies) will see the warning message. RELNOTES: Deprecated: Using the android_library.deps attribute to implicitly export targets to dependent rules. If your code is using this feature, Bazel will raise a warning. To fix, please use android_library.exports to explicitly specify exported targets. Run with --experimental_allow_android_library_deps_without_srcs=false to ensure forward compatibility when this feature is removed in a future release. PiperOrigin-RevId: 168686765
* Remove duplicated error handling in build variablesGravatar hlopko2017-09-14
| | | | | RELNOTES: None. PiperOrigin-RevId: 168683400
* Categorize C++ related optionsGravatar hlopko2017-09-14
| | | | | RELNOTES: None. PiperOrigin-RevId: 168682943
* Consolidate the "unparsed" option value tracking.Gravatar ccalvarin2017-09-14
| | | | | | | In preparation for linking the parsed and unparsed values of options, consolidate and standardize our representation of the flag values as we received them (what is meant by "unparsed" values in this case). This was being done separately in ParseOptionResult, which, with extra context added, is being folded into UnparsedOptionValueDescription. We now track how an option was provided and where it came from for all option parsing. RELNOTES: None. PiperOrigin-RevId: 168682082
* bep: Properly URI encode file pathsGravatar buchgr2017-09-14
| | | | | | RELNOTES: The Build Event Protocol's File.uri field is now properly encoded according to RFC2396. PiperOrigin-RevId: 168674865
* Introduce -c source_file -o output_file build variablesGravatar hlopko2017-09-14
| | | | | | | | | | | | Prior to this cl CompileCommandLine would (almost) unconditionally emit -c and -o flags. This cl removes this logic and relies on crosstool to emit these flags. This is another small step towards platform independent C++ rules. Memory use is not affected, since the build variables used by this cl are already exposed, this cl just forces crosstools to use it. RELNOTES: None. PiperOrigin-RevId: 168671507