aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main
Commit message (Collapse)AuthorAge
* Depend on //tools/jdk:host_jdk for the host javabase instead of the default JDK.Gravatar lberki2017-12-06
| | | | | RELNOTES: None. PiperOrigin-RevId: 178074510
* Update bazel py rules "deps" documentationGravatar elenairina2017-12-06
| | | | | | | | | since it is not allowed to have cc_library dependencies. Fixes #4237 RELNOTES: None. PiperOrigin-RevId: 178074296
* Disallow undeclared access to the $(JAVA) and $(JAVABASE) template variables.Gravatar lberki2017-12-06
| | | | | | | | | If a rule needs these template variables, it will need to declare a dependency on them in the future by adding @bazel_tools//tools/jdk:current_java_runtime to its toolchains= attribute. RELNOTES[INC]: In order to access the template variables $(JAVA) and $(JAVABASE), @bazel_tools//tools/jdk:current_java_runtime needs to be added to the toolchains= attribute from now on. RELNOTES: None. PiperOrigin-RevId: 178070807
* Make ProcessWrapperUtil aware of the execution statistics file, and add new ↵Gravatar ruperts2017-12-05
| | | | | | | ExecutionStatisticsProvider. RELNOTES: None. PiperOrigin-RevId: 178056182
* Reflect progress on incremental dexing in android_binary's ↵Gravatar kmb2017-12-05
| | | | | | | | incremental_dexing attribute documentation. RELNOTES: None. PiperOrigin-RevId: 178047799
* Check for null build file returned from getBuildFileForPackage.Gravatar jcater2017-12-05
| | | | | | This can occur in genqueries when a referenced package isn't in the scope. PiperOrigin-RevId: 178038701
* Upgrade --target_environment, --auto_cpu_environment_group.Gravatar gregce2017-12-05
| | | | | | | 1: Allow both in the same build (before, just one would trigger) 2: Don't check environment defaults from other groups, since neither flag asserts any expectations on those groups PiperOrigin-RevId: 178026699
* Moving the RemoteWorker into tools/remote directory.Gravatar olaola2017-12-05
| | | | | | | | This is because I want to add another remote execution related tool, the remote_client, which will use the Remote Execution API to fetch blobs from a remote cache. I will use this tool as part of end-to-end tests for remote execution. TESTED=remote integration tests, presubmit RELNOTES: None PiperOrigin-RevId: 177995895
* Automated rollback of commit d0f06a6e4b61adc39bf5e1cfbae39501a89dc8e3.Gravatar nharmata2017-12-05
| | | | | RELNOTES: None PiperOrigin-RevId: 177965330
* Fix error prone warning about reference equality.Gravatar ajmichael2017-12-05
| | | | | RELNOTES: None PiperOrigin-RevId: 177965009
* Expose getGenJarsProvider methods from JavaSkylarkApiProvider in JavaInfoGravatar dbabkin2017-12-05
| | | | | | | | | | | JavaSkylarkApiProvider will be deprecated soon and replaced by JavaInfo. Methods exposed: getGenJarsProvider() Made changed in all relevant Java family rules, to build JavaGenJarsProvider provider and assign to JavaInfo RELNOTES:none PiperOrigin-RevId: 177950965
* Build output files if the build tag filter contains only tags to exclude.Gravatar lberki2017-12-05
| | | | | | | | | This is arguably more correct, since output files don't have any tags, therefore you cannot exclude them by specifying tags to exclude. Fixes #4012. RELNOTES: None. PiperOrigin-RevId: 177950851
* Add --experimental_java_coverage.Gravatar elenairina2017-12-05
| | | | | | | | | | | | | | | | | | Context: java_import or other custom rules (genrules or Skylark) do not propagate coverage information. Coverage metadata is retrieved from the compilation information and it is passed around through providers as Artifact(s). The problem with the current implementation is that there is no way of retrieving instrumentation metadata from arbitrary jars provided by java_import or other custom rules. --experimental_java_coverage solves the issue presented above ONLY for the java rules (has no effect for android/[]/etc). Implementation details: * For each build jar create a .txt file containing the relative path of each Java file. This file is included in the build jar. It is used for recreating the correct path for each covered file when included in the coverage report. * java_binary/java_test will set 3 environment variables: 1) JACOCO_METADATA_JAR - in experimental mode will be a txt file containing all the jars considered for collecting coverage (JacocoCoverageRunner filters out the ones that don't have .uninstrumented.class files). In non-experimental mode will be a jar containing all the instrumented class files. 2) JACOCO_MAIN_CLASS - The main class to be called for the current coverage run. Previously this information was embedded in the JACOCO_METADATA_JAR's manifest. 3) JACOCO_JAVA_RUNFILES RELNOTES: --experimental_java_coverage is available for testing. PiperOrigin-RevId: 177941471
* remote: Have --remote_rest_cache respect --remote_timeout.Gravatar buchgr2017-12-05
| | | | | RELNOTES: The --remote_rest_cache flag now respects --remote_timeout. PiperOrigin-RevId: 177926523
* Fix docs for repository_nameGravatar Rodrigo Queiro2017-12-05
| | | | | | | | Fixes #3573 Closes #3574. PiperOrigin-RevId: 177925152
* Added execution platform to the ActionExecutionMetadata.Gravatar John Cater2017-12-04
| | | | | | | Part of #4128. Change-Id: Id822d3ae6f8daf7c92a75bd8bd28590d4f625845 PiperOrigin-RevId: 177905460
* Platform options are no longer experimental.Gravatar jcater2017-12-04
| | | | | RELNOTES: The --host_platform and --platform flags are no longer experimental. PiperOrigin-RevId: 177863761
* From apple_binary, receive AppleExecutableBinaryProvider from the ↵Gravatar cparsons2017-12-04
| | | | | | | | | bundle_loader attribute Prior to this change, apple_binary relied on bundle_loader targets (which are themselves apple_binary) to propagate an unwrapped ObjcProvider. That is deprecated, is disabled by --noexperimental_objc_provider_from_linked, and will be killed off shortly. RELNOTES: None. PiperOrigin-RevId: 177862573
* Expose ObjcProtoProvider as a Skylark object.Gravatar cparsons2017-12-04
| | | | | | | | | This does not provide any meaningful API to interact with ObjcProtoProvider from a skylark context -- it simply allows ObjcProtoProvider to be passed between skylark API calls as an opaque object. This helps facilitate exposure of an Apple Linking API to Skylark which will take place in future changes. RELNOTES: None. PiperOrigin-RevId: 177844029
* Clarify bazel clean's options.Gravatar ccalvarin2017-12-04
| | | | | | | | | | Basically a refactor of https://github.com/bazelbuild/bazel/pull/2053, which separated the concepts of async and expunge but kept them intertwined at the option level. This was confusing to a number of users. The standard interface is to use one of --expunge, --async, or --expunge_async. --clean_style was more verbose and added no value, so can be removed. The contents of actuallyClean() could use some ... actual cleaning. This CL just changes the options, removing some of the artificial option-related complexity. RELNOTES[INC]: --clean_style is no longer an option. PiperOrigin-RevId: 177843049
* Remove some deadish Windows-related runfiles code.Gravatar Benjamin Peterson2017-12-04
| | | | | | | | | | | | | | | In particular, SymlinkTreeAction no longer needs to accept artifacts as an input. --experimental_enable_runfiles now immediately reports an error on Windows. This mostly unwinds e4974e4cc6aeb437d36b3b36eb20142b7120fb16 ("Separate runfiles middlemen into two layers") and 41f4456ac2348bef66739194853a1ddadcbb887e ("Make runfiles tree creation on Windows depend on the artifacts of the actual runfiles."). See https://groups.google.com/d/msg/bazel-dev/btOAgxv434g/bDhTOOePAgAJ. Change-Id: Iac3308669bfc07abfd1c91445922269d8fdc2a26 PiperOrigin-RevId: 177837504
* remote: Replace Retrier with Retrier2.Gravatar buchgr2017-12-04
| | | | | | | | | - Replace the existing Retrier with Retrier2. - Rename Retrier2 to Retrier and remove the old Retrier + RetryException class. RELNOTES: None. PiperOrigin-RevId: 177835070
* Add BAZEL_VC and JAVA_HOME to build_windows_jni.shGravatar Loo Rong Jie2017-12-04
| | | | | | | | | | User might have Visual C++ Build Tools and JDK installed at non-default location, but they are still usable for bootstrapping. PS: I used Visual C++ 2017 15.3 for bootstrapping, there is a nice 1.5MB size reduction in final `bazel.exe` compared with `bazel-0.7.0-without-jdk-windows-x86_64.exe`. Closes #3943. PiperOrigin-RevId: 177815687
* Remove `-R` flags from the MacOS crosstool template.Gravatar John Millikin2017-12-04
| | | | | | | | Fixes https://github.com/bazelbuild/bazel/issues/4028 Closes #4029. PiperOrigin-RevId: 177813419
* Fix getBuildFiles to not assume BUILD is the name of the build file.Gravatar John Cater2017-12-04
| | | | | | | Fixes #4056. Change-Id: Ia7425c2146f15e9293605ee3da53007805e82275 PiperOrigin-RevId: 177813070
* Expose some methods from JavaSkylarkApiProvider in JavaInfoGravatar dbabkin2017-12-04
| | | | | | | | | | | | | JavaSkylarkApiProvider will be deprecated soon and replaced by JavaInfo. Methods exposed: NestedSet<Artifact> getTransitiveSourceJars() NestedSet<Artifact> getTransitiveRuntimeDeps() NestedSet<Artifact> getTransitiveDeps() Also created helped method to eliminate all duplication code and refactored some methods with is. RELNOTES:none PiperOrigin-RevId: 177804645
* py_binary can now be used as data with custom python.Gravatar Austin Schuh2017-12-04
| | | | | | | | | | | | | | The stub template now looks for the python binary relative to the modules if a relative path was provided. This correctly finds it inside the runfiles folder both when the py_binary is the output, and when the py_binary is called by another binary (ie is data for it). We also now add the binary and dependencies to the runfiles when it is used as data so python is accesible. Change-Id: I3bf6ff17265e72d964614ad66af22933c89f853d PiperOrigin-RevId: 177803641
* Allow `python3` as value for the `--python_path` flag.Gravatar Misha Seltzer2017-12-04
| | | | | | | | Resolves issue https://github.com/bazelbuild/bazel/issues/4146 Closes #4147. PiperOrigin-RevId: 177803394
* Switch GenRuleBase to use the new Expander APIGravatar ulfjack2017-12-04
| | | | | | | | | | | | | | | | | This is a roll-forward of https://github.com/bazelbuild/bazel/commit/e8d32b7c922f65539b74357711d5ad6b70934115, which broke some genrules, but without some cleanup changes which I'm submitting separately, and with a fix for the bug. The problem was that I switched from withExecLocations(labels) to withExecLocations(); the original code was in CommandHelper, and the new code in GenRuleBase, so this was not obvious. Also, we didn't have test coverage for this case - note that the specified labels are _added_ to the default map of labels, rather than replacing the default map of labels. This only matters if the dependent rule provides a GenRuleSourcesProvider, which only a single (Google-internal) rule does. PiperOrigin-RevId: 177802902
* Set default value of incompatible_load_argument_is_label to true.Gravatar laurentlb2017-12-04
| | | | | | | RELNOTES: First argument of 'load' must be a label. Path syntax is removed. (label should start with '//' or ':'). PiperOrigin-RevId: 177802628
* Remove the java_executable field from ctx.fragments.jvm .Gravatar lberki2017-12-04
| | | | | | | | | | The same information is accessible as JavaRuntimeInfo.java_executable_exec_path. In order to access that, add an implicit attribute that depends on @bazel_tools//tools/jdk:current_java_runtime, then do ctx.attr._java_runtime[java_common.JavaRuntimeInfo].java_executable_exec_path . RELNOTES[INC]: The path to the JVM executable is not accessible anymore as ctx.{fragments,host_fragments}.jvm.java_executable. Use JavaRuntimeInfo.java_executable_exec_path instead. PiperOrigin-RevId: 177786910
* Change Bazel's default hash function to SHA256. Fixes #3193Gravatar buchgr2017-12-03
| | | | | | | RELNOTES: Bazel's default hash function was changed from MD5 to SHA256. In particular, this affects users of remote caching and execution, as all hashes will be SHA256 by default. PiperOrigin-RevId: 177740702
* Fix missing print statements in output functionsGravatar vladmos2017-12-02
| | | | PiperOrigin-RevId: 177708823
* Fixed @androidsdk's qemu2 paths on darwin.Gravatar jingwen2017-12-02
| | | | | RELNOTES: None. PiperOrigin-RevId: 177695015
* Forward test relevant flags to mobile-install launcher.Gravatar Googler2017-12-01
| | | | | | | | Add new flag to specify the adb device serial number (--device). Change ..._mi/launcher.sh to ..._mi/launcher (see unknown commit). RELNOTES: None PiperOrigin-RevId: 177662635
* Make Predicate<String> obtainable from RuleClassNamePredicateGravatar Googler2017-12-01
| | | | | | | * Extend RuleClassNamePredicate to be both inclusive or exclusive * Attribute uses RuleClassNamePredicate instead of Predicate<RuleClass> PiperOrigin-RevId: 177656647
* Add user and system execution time to provide total CPU execution time for ↵Gravatar ruperts2017-12-01
| | | | | | | each Action. RELNOTES: None. PiperOrigin-RevId: 177652741
* Remove duplicated method from AndroidBinary.Gravatar ajmichael2017-12-01
| | | | | RELNOTES: None PiperOrigin-RevId: 177638999
* Move IDL constant out of AndroidSemanticsGravatar ajmichael2017-12-01
| | | | | | | | | AndroidSemantics is for "pluggability". Defining static constants on the interface does not do that. Furthermore, output group names are not something we would want to change between internal and external. RELNOTES: None PiperOrigin-RevId: 177632488
* Make AndroidSdkProvider.verifyPresence throw.Gravatar ajmichael2017-12-01
| | | | | | | All call sites were just returning null if it failed anyways. RELNOTES: None PiperOrigin-RevId: 177632366
* Avoid NPEs when providers are not found in JavaInfo.Gravatar elenairina2017-12-01
| | | | | | | Fixes #4173. RELNOTES: None. PiperOrigin-RevId: 177582228
* Windows: Don't leak any handles from Bazel client to Bazel serverGravatar Yun Peng2017-12-01
| | | | | | | | | | | Explicitly specify which handles to inherit Fixes https://github.com/bazelbuild/bazel/issues/4193 Fixes https://github.com/bazelbuild/bazel/issues/2182 Fixes https://github.com/bazelbuild/bazel/issues/2248 Change-Id: Ifa0201a6764c633016784c245d480542966efc6d PiperOrigin-RevId: 177564007
* Remove unused adb_jobs flag.Gravatar Googler2017-11-30
| | | | | | | | Flag is mobile-insall v1 only, and has not been used in the last 30 days. This change is a NOP since the default value in //third_party/bazel/tools/android/incremental_install.py is 2. RELNOTES: None PiperOrigin-RevId: 177536782
* Properly enforce one version for android_robolectric_test targets by ↵Gravatar Googler2017-11-30
| | | | | | | respecting the one version for java test flag, and enforcing one version on the _deploy.jar RELNOTES: n/a PiperOrigin-RevId: 177525487
* Automated rollback of commit a7a9d56539a467ef095d3003a16d33922d9505a5.Gravatar ajmichael2017-11-30
| | | | | | | | | | | | | | | | | | | | | | *** Reason for rollback *** Breaks lots of web_test targets (b/69963706) *** Original change description *** Implemented fix for case when 'use_testrunner' attribute works interconnected with 'main_class' in java_test rule. for manual testing I used BUILD file: java_test( name = "mytest", srcs = glob(["*.java"]), main_class = "com.test.Test", use_testrunner = 1, ) RELNOTES: java_tests no complain when use_testrunner is explicitly set to 1 and main_class is set. PiperOrigin-RevId: 177517757
* Move bazel conditions into src/conditions.Gravatar tomlu2017-11-30
| | | | | | | This will enable an easier transition from checked-in BUILD files to ones generated by copybara. RELNOTES: None PiperOrigin-RevId: 177514519
* Add rexopts attribute to android_binary.Gravatar dannark2017-11-30
| | | | | RELNOTES: None PiperOrigin-RevId: 177510583
* Remove some unused code from GenRuleBaseGravatar ulfjack2017-11-30
| | | | PiperOrigin-RevId: 177504645
* Suppress ThinLTO indexing for linkstatic testsGravatar Googler2017-11-30
| | | | | | | | | | | | | ThinLTO and static linking of test suites is a bad combination since it results in a combinatorial explosion of the ThinLTO backends - each object file needs a separate LTO backend action per target. If you are static linking O(N) objects, and have O(M) targets, with ThinLTO you will get O(N*M) LTO backend jobs. This is because the whole program optimization step is per-target, and may make different decisions affecting the object files. With dynamic linking it isn't a problem, since the ThinLTO optimization happens at the .so level, which are shared across tests. And for statically-linked cc_binary it hasn't been an issue since typically only a single target is built at a time, unlike tests. In general it isn't incredibly useful to run tests with ThinLTO, although most projects are in the habit of running their tests with the same options that they use to optimize their main binary (and most blueprints seem to be set up to share options between them). With ThinLTO since it is doing whole-program optimization, you are getting different whole-program optimizations for the main binary and each test binary, so it isn't the case that this will optimize the tests in the same exact way as the main binary anyway. Therefore, when creating LTO backends for statically-linked *_test targets, skip the LTO indexing stage, and create (or use if already created) shared dummy LTO backend actions for each library. These LTO backends are fed an empty index, so they don't do any whole program optimization and are safe to share. Enable this under a new feature so that we can enable it by default via blazerc but provide a facility to disable if needed. RELNOTES: None PiperOrigin-RevId: 177495858
* Refactor the FileSystem API to allow for different hash functions.Gravatar buchgr2017-11-30
| | | | | | | | | | | | | Refactor the FileSystem class to include the hash function as an instance field. This allows us to have a different hash function per FileSystem and removes technical debt, as currently that's somewhat accomplished by a horrible hack that has a static method to set the hash function for all FileSystem instances. The FileSystem's default hash function remains MD5. RELNOTES: None PiperOrigin-RevId: 177479772