aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
Commit message (Collapse)AuthorAge
* Fix test configured target creation code that was dropping split deps.Gravatar Greg Estren2016-12-06
| | | | | | | | | | | | | | | Short story: Dependency -> BuildConfiguration maps can have multiple values because of split transitions. This is unfortunately one of those instances where the test logic is forked from production. So this doesn't actually demonstrate bugs in production code. We already have tests in ConfigurationsForTargetsTest that directly check the production logic. So this cl's primary value is to unbreak tests that depend on the forked logic. -- PiperOrigin-RevId: 141094830 MOS_MIGRATED_REVID=141094830
* Pass isExternal field to blaze ide info protoGravatar Googler2016-12-06
| | | | | | | | | Roll forward after fixing tests. The intellij aspect tests now correctly retains the required toolchain targets in the WORKSPACE file. -- PiperOrigin-RevId: 141093346 MOS_MIGRATED_REVID=141093346
* Rollback of commit 67b4d5250edcefa7220e928e529b1f385e2dc464.Gravatar Alex Humesky2016-12-06
| | | | | | | | | | | | | | | | | | | | | *** Reason for rollback *** Memory regression: [] *** Original change description *** Pass direct jars to Jack. The R class generator produces a compiled jar, not a java source file. This means all android libraries/binaries with resources will need to convert this jar to jack to ensure that they have access to jars. This change will not fix Jack builds, but it is a necessary step toward fixing them. -- PiperOrigin-RevId: 141091215 MOS_MIGRATED_REVID=141091215
* Mount TreeArtifact directories as inputs to Spawns.Gravatar Adam Michael2016-12-06
| | | | | | | | Fixes https://github.com/bazelbuild/bazel/issues/1928. -- PiperOrigin-RevId: 141077737 MOS_MIGRATED_REVID=141077737
* Make aar_import always process the resources.Gravatar Adam Michael2016-12-06
| | | | | | | | | | Previously, the FilesToBuild included the unprocessed resources. This meant that some bugs did not manifest themselves by building just the aar_import but only showed up if the aar_import was depended on by an android_library. -- PiperOrigin-RevId: 141068502 MOS_MIGRATED_REVID=141068502
* Make BuildConfiguration output directories understand repositoriesGravatar Kristina Chodorow2016-12-05
| | | | | | | | | This doesn't change the behavior at all, just prep for rolling forward the execroot change. -- PiperOrigin-RevId: 141059303 MOS_MIGRATED_REVID=141059303
* Add 'aspect_id' for to identify aspects that has been applied to the target.Gravatar Dmitry Lomov2016-12-05
| | | | | | | | | | | | | | | | | | | Add a concept of aspect_id: an unique string that identifies a propagating aspect (aspect class + parameters). This string is designed to be: - Unique for each aspect - human-readable for debugging purposes - not easily parsable. Skylark API: - `ctx.aspect_id` returns an identifier of the current aspect inside aspect implementation function - `Target.aspect_ids` return a list of aspect ids for aspects applied to a given Target (https://www.bazel.io/versions/master/docs/skylark/lib/Target.html) -- PiperOrigin-RevId: 141057865 MOS_MIGRATED_REVID=141057865
* Allow dicts to contain non-comparable objects as keysGravatar Vladimir Moskva2016-12-05
| | | | | | | | | RELNOTES: Skylark dicts internally don't rely on keys order anymore and accept any hashable values (i.e. structs with immutable values) as keys. Iteration order of dictionaries is no longer specified. -- PiperOrigin-RevId: 141055080 MOS_MIGRATED_REVID=141055080
* Add JacocoCoverageRunner to junitrunner.Gravatar Yue Gan2016-12-05
| | | | | | | | (series 3/4 of open-sourcing coverage command for java test) -- PiperOrigin-RevId: 141046146 MOS_MIGRATED_REVID=141046146
* Include a trailing newline in printStatusMap outputGravatar Benjamin Staffin2016-12-05
| | | | | | | | | | | | This makes it harder to screw up when doing things like concatenating bazel-out/{stable,volatile}-status.txt in a genrule, and makes console output slightly nicer when you print them to stdout. -- Change-Id: Ib558ddcb09e66452a4780355716d9d6d1d143355 Reviewed-on: https://cr.bazel.build/7190 PiperOrigin-RevId: 141044546 MOS_MIGRATED_REVID=141044546
* Mark //src/test/shell/bazel:bazel_windows_example_test as manualGravatar Damien Martin-Guillerez2016-12-05
| | | | | | | | This test has became flaky due to long path, see #2178 -- PiperOrigin-RevId: 141044418 MOS_MIGRATED_REVID=141044418
* Add LcovMerger.Gravatar Yue Gan2016-12-05
| | | | | | | | (series 2/4 of open-sourcing coverage command for java test) -- PiperOrigin-RevId: 141044216 MOS_MIGRATED_REVID=141044216
* Windows: explicitly use ASCII-version of Win32 APIGravatar Laszlo Csomor2016-12-05
| | | | | | | | | | | This way it's easier to find the functions we need to change to widechar version. See https://github.com/bazelbuild/bazel/issues/2181 -- PiperOrigin-RevId: 141043389 MOS_MIGRATED_REVID=141043389
* Rollback of commit 7a668370e350f602ec863eb4169729885e1c7c93.Gravatar Damien Martin-Guillerez2016-12-05
| | | | | | | | | | | | | | | | | | | | | | *** Reason for rollback *** Fails test_swift_import_objc_framework of //src/test/shell/bazel/apple:bazel_apple_test Tested on: https://cr.bazel.build/7611/ Fixes #2179. *** Original change description *** Split ObjcProvider.framework_dir into static and dynamic framework directories. *** -- Change-Id: I10db5e14b219bc921bff72c45fab1455be8fa25a Reviewed-on: https://cr.bazel.build/7311 PiperOrigin-RevId: 141043141 MOS_MIGRATED_REVID=141043141
* Add instructions regarding running android_integration_test.Gravatar Irina Iancu2016-12-05
| | | | | | -- PiperOrigin-RevId: 141039788 MOS_MIGRATED_REVID=141039788
* Rollback of commit 9de9f374cf63e8e6938c9ce80820c9f46f641241.Gravatar Damien Martin-Guillerez2016-12-05
| | | | | | | | | | | | | | | | | | | *** Reason for rollback *** Broke ci.bazel.io See http://ci.bazel.io/job/bazel-tests/BAZEL_VERSION=HEAD-jdk7,PLATFORM_NAME=linux-x86_64/379/console for error log. See https://cr.bazel.build/7610/ for tests that confirm fix. *** Original change description *** Pass isExternal field to blaze ide info proto -- Change-Id: Ieff9fbc719ea7baf8321bf50570fae5f7d6c7fdd Reviewed-on: https://cr.bazel.build/7610 PiperOrigin-RevId: 141029777 MOS_MIGRATED_REVID=141029777
* Add missing <time.h> include.Gravatar Piotr Sikora2016-12-05
| | | | | | | | Fixes build on FreeBSD 11. -- PiperOrigin-RevId: 141029578 MOS_MIGRATED_REVID=141029578
* Make build events correctly report target expansionGravatar Klaus Aehlig2016-12-05
| | | | | | | | | | | In particular, correctly report the expansion of a test suite even if only requested to build (but not test). -- Change-Id: Ia25305a4f5ed53118cbb1970a8055d156e8e50be Reviewed-on: https://cr.bazel.build/7535 PiperOrigin-RevId: 141027655 MOS_MIGRATED_REVID=141027655
* Add strip_prefix and strip_include_prefix attributes of cc_library.Gravatar Lukacs Berki2016-12-05
| | | | | | | | | | Design doc is at https://docs.google.com/document/d/18qUWh0uUiJBv6ZOySvp6DEV0NjVnBoEy-r-ZHa9cmhU . RELNOTES: cc_library now supports the strip_prefix and strip_include_prefix attributes for control of include paths. -- PiperOrigin-RevId: 140950225 MOS_MIGRATED_REVID=140950225
* Fix NPE in RClassGenerator when dev has code in unnamed packageGravatar Googler2016-12-05
| | | | | | | | | | | | | | | | | | | | Just put the R class in the unnamed package. If we disable the RClassGenerator and use the old code path, we would have constructed a cmdline flag set to "null" for aapt, and aapt would write "package null;" which also wouldn't work... This may allow you to build an android_library but it may be hard to build an android_binary because ultimately AAPT will reject an empty "package" attribute in the AndroidManifest.xml when you try to build the APK, so you'd need to stamp that differently. -- PiperOrigin-RevId: 140945125 MOS_MIGRATED_REVID=140945125
* Delete ANDROID_LIBRARY_AAR_CLASSES_JAR implicit outputGravatar Googler2016-12-05
| | | | | | | | No longer used after commit c4413e17a45d1892320c61a996fd09aadb352636. -- PiperOrigin-RevId: 140944013 MOS_MIGRATED_REVID=140944013
* When a strict proto dep violation occurs, tell the user what they should fix.Gravatar Carmi Grushko2016-12-05
| | | | | | -- PiperOrigin-RevId: 140912072 MOS_MIGRATED_REVID=140912072
* Add documentation for add{Skylark,Native}DeclaredProvider.Gravatar Dmitry Lomov2016-12-05
| | | | | | -- PiperOrigin-RevId: 140904064 MOS_MIGRATED_REVID=140904064
* Correctly set module file flags in FakeCppCompileAction.Gravatar Googler2016-12-05
| | | | | | -- PiperOrigin-RevId: 140892655 MOS_MIGRATED_REVID=140892655
* Fix another test that instantiates BuildOptions its own special way.Gravatar Greg Estren2016-12-05
| | | | | | | | | Since this is a narrowly defined test specifically for C++ configs, this case makes some more sense. -- PiperOrigin-RevId: 140891377 MOS_MIGRATED_REVID=140891377
* Fix bug with java_import desugaring and incremental dexing for Android whenGravatar Googler2016-12-05
| | | | | | | | multiple jars have the same simple filename (e.g., l.jar) -- PiperOrigin-RevId: 140880491 MOS_MIGRATED_REVID=140880491
* Advertise JavaCompilationArgsProvider java_proto_library.Gravatar Rumou Duan2016-12-05
| | | | | | | | Aspects like J2ObjcAspect needs an advertised provider from java_proto_library in order to attach to it. In the case of J2ObjcAspect, it needs to attach to java_proto_library to reach its dependent proto_library rules, and generates j2objc protos from the proto_library rules. -- PiperOrigin-RevId: 140875994 MOS_MIGRATED_REVID=140875994
* Fix bug in configuration creation logic that wrongly trims notrim configs.Gravatar Greg Estren2016-12-05
| | | | | | | | Without this, many Bazel tests fail with --experimental_dynamic_configs=notrim_partial. -- PiperOrigin-RevId: 140873563 MOS_MIGRATED_REVID=140873563
* Make a rogue test case honor --experimental_dynamic_configs=notrim_partial ↵Gravatar Greg Estren2016-12-05
| | | | | | | | | | like everywhere else. Unfortunately this doesn't use ConfiguredRuleClassProvider to prepare its configuration's BuildOptions like every other code path does. -- PiperOrigin-RevId: 140873428 MOS_MIGRATED_REVID=140873428
* Split ObjcProvider.framework_dir into static and dynamic framework directories.Gravatar Chris Parsons2016-12-05
| | | | | | | | | | | Previously there was no difference between static and dynamic framework directories in how they affected link actions. However, there will be a difference moving forward: Dynamic framework files and their directories will be propagated up dynamic library edges, and static frameworks will not. (If an app A depends on a dylib B which depends on a dylib C, A should not link any static framework dependencies of C, but should link against C itself.) -- PiperOrigin-RevId: 140869357 MOS_MIGRATED_REVID=140869357
* Add option to disable dynamic configs with LIPO.Gravatar Greg Estren2016-12-02
| | | | | | | | | | | | New option --experimental_dynamic_configs=notrim_partial automatically switches to --experimental_dynamic_configs=off if any BuildOptions fragment sets useStaticConfigurationsOverride(). CppOptions implements this override for FDO/LIPO. -- PiperOrigin-RevId: 140864317 MOS_MIGRATED_REVID=140864317
* Null out perBuildSyscallCache after analysis is finished to save memory ↵Gravatar Janak Ramakrishnan2016-12-02
| | | | | | | | during execution. -- PiperOrigin-RevId: 140864295 MOS_MIGRATED_REVID=140864295
* Pass isExternal field to blaze ide info protoGravatar Googler2016-12-02
| | | | | | -- PiperOrigin-RevId: 140862659 MOS_MIGRATED_REVID=140862659
* For all function expressions of the form f(..., e1, ..., e2, ..., eK, ...), ↵Gravatar Nathan Harmata2016-12-02
| | | | | | | | ensure that all of e1, e2, ..., and eK are elligble for parallel evaluation. This is _not_ the same as providing a parallel implementation of f, which we can do separately in followup CLs. -- PiperOrigin-RevId: 140861694 MOS_MIGRATED_REVID=140861694
* Make the settings attribute of Skylark maven_jar and maven_aar a label.Gravatar Adam Michael2016-12-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes https://github.com/bazelbuild/bazel/issues/2117. The settings attribute allows you to optional specify a custom Maven settings.xml file as a label. Previously, this attribute was an absolute path. As an absolute path it cannot really be used to specify a file in the workspace because each developer may install the workspace in a different location. And if the settings.xml cannot be included in the workspace, the developers may as well use one of Maven's default locations for settings.xml. Now the attribute is a label. An example use case is: $ cat WORKSPACE load("@bazel_tools//tools/build_defs/repo:maven_rules.bzl") maven_jar( name = "guava", artifact = "com.google.guava:guava:19.0", settings = "//:my_custom_settings.xml", ) $ cat BUILD java_library( srcs = glob(["**/*.java"]), deps = ["@guava//jar"], ) $ cat my_custom_settings.xml <settings xmlns="http://maven.apache.org/SETTINGS/1.0.0 https://maven.apache.org/xsd/settings-1.0.0.xsd"> <mirrors> <mirror> <id>planetmirror.com</id> <name>PlanetMirror Australia</name> <url>http://downloads.planetmirror.com/pub/maven2</url> <mirrorOf>central</mirrorOf> </mirror> </mirrors> </settings> Note that `settings = "my_custom_settings.xml"` will not work as the workspace rule will not know to look in the main workspace. RELNOTES[INC]: Skylark maven_jar and maven_aar settings attribute is now a label so it can be checked into your workspace. -- PiperOrigin-RevId: 140861633 MOS_MIGRATED_REVID=140861633
* Merge J2ObjcAspect and J2ObjcProtoAspect.Gravatar Rumou Duan2016-12-02
| | | | | | -- PiperOrigin-RevId: 140854070 MOS_MIGRATED_REVID=140854070
* Introduce FlagGroup.expandIfTrue, expandIfFalseGravatar Marcel Hlopko2016-12-02
| | | | | | | | | | This cl adds support for expand_if_true and expand_if_false messages to the flag_group, allowing more elegant design of build variables. This cl also adds IntegerValue VariableValue subclass. -- PiperOrigin-RevId: 140849578 MOS_MIGRATED_REVID=140849578
* Prune modules when building modules themselves to reduce build times shortenGravatar Googler2016-12-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | critical paths. When the inputs of a module M are reduced to a set S, then that same set S also needs to be supplied to compile something that uses M. To do this, input discovery is divided into two stages. For each CppCompileAction, the first stage discovers the necessary modules (M above). These are then added as inputs to ensure that they are built. The second stage then finds all the modules (S above) that are required to use those and also adds them as inputs. For now, the new behavior is guarded by a new flag --experimental_prune_more_modules. This is currently implemented by reading the .d files of used modules add adding all their module dependencies. There are two noteworthy alternatives: 1. Hack up input discovery to understand modules, e.g. if a modular header is hit, continue scanning from all it's headers. However, this seems very brittle and a lot of additional information would have to be passed to the input discovery. 2. Directly pass the results from input discovery of one CppCompileAction to another one. However, this seems to tightly couple the execution of different CppCompileActions and might lead to a mess of different states, more memory consumption, etc. With the current implementation, there is a bit of runtime overhead of reading the .d files (many times). This could potentially be improved by caching the results. However, even without this caching, the runtime overhead is limited (<10%) for all builds I have tried (I have tried with builds where all the compile results are already in the executor's cache. -- MOS_MIGRATED_REVID=140793217
* Clean up RuleContext's attribute access API.Gravatar Greg Estren2016-12-02
| | | | | | | | | | | | | | | All calls now go through RuleContext.attributes(), which guarantees both native and aspect-supplied attributes are checked. For aspect attributes, only type queries are supported (e.g. "does this attribute exist?", "what is its type?"). Not value queries. This is because the code this is cleaning up accesses aspect attributes through a String->Attribute map, which doesn't include values. If ever needed we could further extend with something more robust. -- MOS_MIGRATED_REVID=140771242
* Move constraint enforcement policy into attribute definitions.Gravatar Greg Estren2016-12-02
| | | | | | | | | This makes is easier to understand and change which attributes are checked. Also turn off checking for "data" and java_* "resources" attributes. -- MOS_MIGRATED_REVID=140771015
* Proto changes required to recognize external artifactsGravatar Googler2016-12-02
| | | | | -- MOS_MIGRATED_REVID=140769347
* Set User-Agent to "Bazel/{{Release Name}}" for http connectionsGravatar Justin Buchanan2016-12-02
| | | | | | | | | | | | | | Previously the java default was used, which was of the format "Java/x.x.x". This caused a problem fetching external dependencies for some websites that block user agents of that format. I initially was going to include the bazel version in the user agent string, but it seems that a version number isn't always baked into the bazel binary. When I compile bazel locally, no "Build label: x.x.x" shows up when I run `bazel version`. Fixes #2131 Closes #2148. -- Reviewed-on: https://github.com/bazelbuild/bazel/pull/2148 MOS_MIGRATED_REVID=140750146
* Description redacted.Gravatar Googler2016-12-02
| | | | | -- MOS_MIGRATED_REVID=140742419
* Rollback of commit 7c4a8093da6272969c86f22a08c72ddbbf6e8274.Gravatar Kristina Chodorow2016-12-02
| | | | | | | | | | | | | | | | | *** Reason for rollback *** Broke //src/test/shell/bazel:external_skylark_load_test See http://ci.bazel.io/job/bazel-tests/BAZEL_VERSION=HEAD,PLATFORM_NAME=linux-x86_64/370/console, for example. *** Original change description *** Remove callerLabel from Environment. It is a Bazel-specific information. -- MOS_MIGRATED_REVID=140742037
* Compute module file compile command line flags right before executing theGravatar Googler2016-12-02
| | | | | | | | | | | | action. This removes flattening of nested sets (for the transitive/top-level header modules) in the analysis phase making it about 10% faster. Also remove the calculation of top-level modules entirely as it doesn't seem to be necessary and doing it might actually lead to unexpected results when actions are restored from cache and thus the module input flags are computed from the actually used inputs (determined from .d files). -- MOS_MIGRATED_REVID=140738461
* Replace UnixGlob's package glob prefetching functionality with anGravatar Googler2016-12-02
| | | | | | | | optional method in FileSystem. Custom FileSystem implementations can use this to provide their own implementation of glob prefetching. -- MOS_MIGRATED_REVID=140736304
* Add --ltoindexopt to pass options to LTO indexing stepGravatar Googler2016-12-02
| | | | | | | This makes it much easier to pass options just to the LTO indexing. Previously these had to be passed via --linkopt, but that also passed the options to the final native link, which causes issues since most useful ThinLTO indexing options are plugin options and gold gives an error when these are passed to native links not involving a plugin. -- MOS_MIGRATED_REVID=140735846
* Description redacted.Gravatar Googler2016-12-01
| | | | | -- MOS_MIGRATED_REVID=140731289
* Phrasing cleanup for dynamic configuration tests.Gravatar Greg Estren2016-12-01
| | | | | -- MOS_MIGRATED_REVID=140729772
* Add Jacoco related code to buildjar.Gravatar Yue Gan2016-12-01
| | | | | | | (series 1/4 of open-sourcing coverage command for java test) -- MOS_MIGRATED_REVID=140723068