aboutsummaryrefslogtreecommitdiffhomepage
Commit message (Collapse)AuthorAge
...
* repository_resolved_file: pretty printGravatar Klaus Aehlig2018-06-01
| | | | | | | | As the list of external repositories with their resolved information can grow quite large, pretty print it, to make it easier for humans to inspect. Change-Id: I34b2d6df84e52c07471a0bfaf97994cabd45feff PiperOrigin-RevId: 198871353
* Fix broken flag existence check for linking flags in unix_cc_configure.Gravatar hlopko2018-06-01
| | | | | | | Fixes #5090 RELNOTES: NONE. PiperOrigin-RevId: 198870918
* Release 0.14.0 (2018-06-01)Gravatar Bazel Release System2018-06-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Baseline: 5c3f5c9be7fa40d4fb3c35756891fab8483ca406 Cherry picks: + f96f037f8f77335dc444844abcc31a372a3e1849: Windows, Java launcher: Support jar files under different drives + ff8162d01409db34893de98bd840a51c5f13e257: sh_configure.bzl: FreeBSD is also a known platform + 7092ed324137f03fcd34856bdb0595a1bdec3069: Remove unneeded exec_compatible_with from local_sh_toolchain + 57bc201346e61c62a921c1cbf32ad24f185c10c9: Do not autodetect C++ toolchain when BAZEL_DO_NOT_DETECT_CPP_TOOLCHAIN=1 is present + 35a78c09cf2fbfc3de9c124d2142e3d72aac4348: remote: recursively delete incomplete downloaded output directory. + 3c9cd82b847f3ece8ec04b2029bd5e8ad0eb7502: distfile: pack the archives needed later in the build + 27487c77387e457df18be3b6833697096d074eab: Slightly refactor SpawnAction to improve env handling + 1b333a2c37add9d04fe5bc5258ee4f73c93115e2: Fix Cpp{Compile,Link}Action environment and cache key computation + 3da8929963e9c70dff5d8859d6e988e6e7f4f9d7: Make SymlinkTreeAction properly use the configuration's environment + eca7b81cf8cc51e1fe56e5ed7d4ad5cd1668a17a: Add a missing dependency from checker framework dataflow to javacutils Incompatible changes: - Add --incompatible_disallow_legacy_javainfo flag. - Added flag --incompatible_disallow_old_style_args_add to help migrate from args.add() to args.add_all() / args.add_joined() where appropriate. New features: - Bash,runfiles: use the new platform-independent library in `@bazel_tools//tools/bash/runfiles` to access runfiles (data-dependencies). See https://github.com/bazelbuild/bazel/blob/master/tools/bash/runfile s/runfiles.bash for usage information. - TemplateVariableInfo can now be constructed from Skylark. - The java_host_runtime_alias rule is now implemented in Java. Important changes: - Flip default value of --experimental_shortened_obj_file_path to true, Bazel now generates short object file path by default. - Introduce fdo_profile rule that allows architecture-sensitive specification of fdo profiles. - canonicalize-flags no longer reorders the flags - CppRules: optional_compiler_flag was removed from CROSSTOOL, use features instead. - Labels of the form ////foo are disallowed. - The `/` operator is deprecated in favor of `//` (floor integer division). Try the `--incompatible_disallow_slash_operator` flag to ensure your code is forward-compatible. - Flip default value of --experimental_shortened_obj_file_path to true, Bazel now generates short object file path by default. - Exposed "mnemonic" and "env" fields on skylark "Action" objects. - Removed flag `--incompatible_disallow_toplevel_if_statement`. - Remove vestigial 'deps' and 'data' attributes from proto_lang_toolchain - Args objects (ctx.actions.args()) have new methods add_all() and add_joined() for building command lines using depsets. - `FileType` is deprecated and will be removed soon. Try the `--incompatible_disallow_filetype` flag to ensure your code is forward-compatible. - Introduce absolute_path_profile attribute that allows fdo_profile to accept absolute paths. - Support two-arg overloads for ctx.actions.args (eg. args.add("--foo", val)) - Introduce 'tools' attribute to ctx.actions.run. - Fixed error message for proguard_apply_dictionary. - "bazel run" now lets one run interactive binaries. The BUILD_WORKSPACE_DIRECTORY and BUILD_WORKING_DIRECTORY environment variables indicate the working directory and the workspace root of the Bazel invocation. Tests are provided with an approximation of the official test environment. - repository rules are no longer restricted to return None. - Add --high_priority_workers flag. - CppRules: Feature configuration can be created from Skylark - Adds new-style JavaInfo provider constructor. - Make java_common.compile now uses java_toolchain javacopts by default; explicitly retrieving them using java_common.default_javac_opts is unnecessary. - CppRules: C++ command lines and env variables for C++ actions can be retrieved from feature configuration. - Skylark rule definitions may advertise providers that targets of the rule must propagate. - Bazel now supports running actions inside Docker containers. To use this feature, run "bazel build --spawn_strategy=docker --experimental_docker_image=myimage:latest". - Remote execution works for Windows binaries with launchers. - Fixing start/end lib expansion for linking. There were many cases where archive files were still being used with toolchains that support start/end lib. This change consolidates the places that make that decision so they can be more consistent. - Add support for reporting an error if android_test.binary_under_test contains incompatible versions of deps - We replaced the --experimental_local_disk_cache and --experimental_local_disk_cache_path flags into a single --disk_cache flag. Additionally, Bazel now tries to create the disk cache directory if it doesn't exist. - Save Blaze memory by not storing LinkerInput objects in LinkCommandLine - In the JavaInfo created by java_common.create_provider now includes both direct and transitive arguments in transitive_compile_time_jars and transitive_runtime_jars - Allow --worker_max_instances to take MnemonicName=value to specify max for each worker. - Allow java_toolchain.header_compiler to be an arbitrary executable
* Revert "Release 0.14.0 (2018-06-01)"Gravatar Luis Pino2018-06-01
| | | | This reverts commit 2269ee2af91b7df13820381d61e8e4e26a257b3a.
* C++: Remove CcSpecificLinkParamsProvider.Gravatar plf2018-06-01
| | | | | | No longer needed since proto_library cannot be used for Java. PiperOrigin-RevId: 198859993
* Format all bzl files with buildifierGravatar vladmos2018-06-01
| | | | | | This CL aslo enables a presubmit check for correct formatting of all bzl files in //third_party/bazel. PiperOrigin-RevId: 198857055
* Release 0.14.0 (2018-06-01)Gravatar Bazel Release System2018-06-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Baseline: 5c3f5c9be7fa40d4fb3c35756891fab8483ca406 Cherry picks: + f96f037f8f77335dc444844abcc31a372a3e1849: Windows, Java launcher: Support jar files under different drives + ff8162d01409db34893de98bd840a51c5f13e257: sh_configure.bzl: FreeBSD is also a known platform + 7092ed324137f03fcd34856bdb0595a1bdec3069: Remove unneeded exec_compatible_with from local_sh_toolchain + 57bc201346e61c62a921c1cbf32ad24f185c10c9: Do not autodetect C++ toolchain when BAZEL_DO_NOT_DETECT_CPP_TOOLCHAIN=1 is present + 35a78c09cf2fbfc3de9c124d2142e3d72aac4348: remote: recursively delete incomplete downloaded output directory. + 3c9cd82b847f3ece8ec04b2029bd5e8ad0eb7502: distfile: pack the archives needed later in the build + 27487c77387e457df18be3b6833697096d074eab: Slightly refactor SpawnAction to improve env handling + 1b333a2c37add9d04fe5bc5258ee4f73c93115e2: Fix Cpp{Compile,Link}Action environment and cache key computation + 3da8929963e9c70dff5d8859d6e988e6e7f4f9d7: Make SymlinkTreeAction properly use the configuration's environment + eca7b81cf8cc51e1fe56e5ed7d4ad5cd1668a17a: Add a missing dependency from checker framework dataflow to javacutils Incompatible changes: - Add --incompatible_disallow_legacy_javainfo flag. - Added flag --incompatible_disallow_old_style_args_add to help migrate from args.add() to args.add_all() / args.add_joined() where appropriate. New features: - Bash,runfiles: use the new platform-independent library in `@bazel_tools//tools/bash/runfiles` to access runfiles (data-dependencies). See https://github.com/bazelbuild/bazel/blob/master/tools/bash/runfile s/runfiles.bash for usage information. - TemplateVariableInfo can now be constructed from Skylark. - The java_host_runtime_alias rule is now implemented in Java. Important changes: - Flip default value of --experimental_shortened_obj_file_path to true, Bazel now generates short object file path by default. - Introduce fdo_profile rule that allows architecture-sensitive specification of fdo profiles. - canonicalize-flags no longer reorders the flags - CppRules: optional_compiler_flag was removed from CROSSTOOL, use features instead. - Labels of the form ////foo are disallowed. - The `/` operator is deprecated in favor of `//` (floor integer division). Try the `--incompatible_disallow_slash_operator` flag to ensure your code is forward-compatible. - Flip default value of --experimental_shortened_obj_file_path to true, Bazel now generates short object file path by default. - Exposed "mnemonic" and "env" fields on skylark "Action" objects. - Removed flag `--incompatible_disallow_toplevel_if_statement`. - Remove vestigial 'deps' and 'data' attributes from proto_lang_toolchain - Args objects (ctx.actions.args()) have new methods add_all() and add_joined() for building command lines using depsets. - `FileType` is deprecated and will be removed soon. Try the `--incompatible_disallow_filetype` flag to ensure your code is forward-compatible. - Introduce absolute_path_profile attribute that allows fdo_profile to accept absolute paths. - Support two-arg overloads for ctx.actions.args (eg. args.add("--foo", val)) - Introduce 'tools' attribute to ctx.actions.run. - Fixed error message for proguard_apply_dictionary. - "bazel run" now lets one run interactive binaries. The BUILD_WORKSPACE_DIRECTORY and BUILD_WORKING_DIRECTORY environment variables indicate the working directory and the workspace root of the Bazel invocation. Tests are provided with an approximation of the official test environment. - repository rules are no longer restricted to return None. - Add --high_priority_workers flag. - CppRules: Feature configuration can be created from Skylark - Adds new-style JavaInfo provider constructor. - Make java_common.compile now uses java_toolchain javacopts by default; explicitly retrieving them using java_common.default_javac_opts is unnecessary. - CppRules: C++ command lines and env variables for C++ actions can be retrieved from feature configuration. - Skylark rule definitions may advertise providers that targets of the rule must propagate. - Bazel now supports running actions inside Docker containers. To use this feature, run "bazel build --spawn_strategy=docker --experimental_docker_image=myimage:latest". - Remote execution works for Windows binaries with launchers. - Fixing start/end lib expansion for linking. There were many cases where archive files were still being used with toolchains that support start/end lib. This change consolidates the places that make that decision so they can be more consistent. - Add support for reporting an error if android_test.binary_under_test contains incompatible versions of deps - We replaced the --experimental_local_disk_cache and --experimental_local_disk_cache_path flags into a single --disk_cache flag. Additionally, Bazel now tries to create the disk cache directory if it doesn't exist. - Save Blaze memory by not storing LinkerInput objects in LinkCommandLine - In the JavaInfo created by java_common.create_provider now includes both direct and transitive arguments in transitive_compile_time_jars and transitive_runtime_jars - Allow --worker_max_instances to take MnemonicName=value to specify max for each worker. - Allow java_toolchain.header_compiler to be an arbitrary executable
* Windows,testing: add query regression testGravatar Laszlo Csomor2018-06-01
| | | | | | | | | | | This test could have prevented https://github.com/bazelbuild/bazel/issues/5300 Change-Id: I02e3b723958c81e0de80f2c2130b583ea4e7f40b Closes #5310. Change-Id: I02e3b723958c81e0de80f2c2130b583ea4e7f40b PiperOrigin-RevId: 198849437
* Converts PLACEHOLDER FileValues into RegularFileValue when queried viaGravatar shahan2018-05-31
| | | | | | ActionExecutionValue.getAllFileValues. PiperOrigin-RevId: 198807229
* Remove the Blaze strict java deps exemption for Android databinding. As ofGravatar Googler2018-05-31
| | | | | | | | | | | | | unknown commit, we are using the JavaBuilder processor exemption list instead of disabling strict deps for the affected rules outright. This narrows the degree to which the exemption is applied, and prevents other strict deps violations from accruing on targets that enable databinding. Step 2 of 2; we needed the change to roll out in JavaBuilder first to be able to fix up issues in the depot first before removing the exemption in Blaze. See https://github.com/bazelbuild/bazel/commit/7edc5d49c8e764ab2bdf19e3a9fb58ea30fa708f for the original attempt. PiperOrigin-RevId: 198793976
* Migrate remaining Android Skylark API to skylarkbuildapiGravatar asteinb2018-05-31
| | | | | | | | I don't know much about most of this code, but there should be no functional changes. RELNOTES: none PiperOrigin-RevId: 198773657
* Explicitly validate local resources are passed to Java compilation firstGravatar asteinb2018-05-31
| | | | | | | We thought we had a test for this, but it turns out we didn't. Add one now. RELNOTES: none PiperOrigin-RevId: 198772854
* Make test more explicit about what it is testing.Gravatar dannark2018-05-31
| | | | | RELNOTES: None PiperOrigin-RevId: 198765991
* Log warning cleanupGravatar neerajen2018-05-31
| | | | | | | Setting --config in .blazerc that overrode previous options in .blazerc was triggering unnecessary warnings. Fixed by only logging warnings when a user attempts to override an option specified on the command line. RELNOTES: None. PiperOrigin-RevId: 198756160
* Remove redundant @SkylarkModule annotation on JavaInfo.Provider, as its ↵Gravatar cparsons2018-05-31
| | | | | | | skylarkbuildapi interface is annotated. RELNOTES: None. PiperOrigin-RevId: 198743504
* Update android_common's layoutlib to 26.1.2 to support fonts in BazelGravatar Jingwen Chen2018-05-31
| | | | | | | | | RELNOTES: For Android projects, Bazel now supports building fonts as resources. See https://developer.android.com/guide/topics/ui/look-and-feel/fonts-in-xml for more information on the feature. Change-Id: I1cb25828b04e98cacc19d3c7a2e23ea764b48e92
* Migrate config-related skylark objects to skylarkbuildapiGravatar cparsons2018-05-31
| | | | | RELNOTES: None. PiperOrigin-RevId: 198735582
* Remove unused codepaths now that non_propagated_deps has been removed as an ↵Gravatar kaipi2018-05-31
| | | | | | attribute. PiperOrigin-RevId: 198735448
* Migrate test-related skylark API to skylarkbuildapiGravatar cparsons2018-05-31
| | | | | RELNOTES: None. PiperOrigin-RevId: 198728350
* Improve DependencyAndroidData VALID_REGEX's robustness.Gravatar jingwen2018-05-31
| | | | | | | | | | | | | | This prevents an invalid flag like `resources:assets:AndroidManifest.xml:::local.bin` to match, as with the case in https://github.com/bazelbuild/bazel/issues/5214 where the R.txt file is missing (shouldn't happen, but let's be defensive) Error message: ``` .. invalid DependencyAndroidData: bazel-out/android-armeabi-v7a-fastbuild/bin/external/androidsdk/com.android.support/_aar/unzipped/resources/support-compat-25.0.0/res:bazel-out/android-armeabi-v7a-fastbuild/bin/external/androidsdk/com.android.support/_aar/unzipped/assets/support-compat-25.0.0/assets:bazel-out/android-armeabi-v7a-fastbuild/bin/external/androidsdk/com.android.support/support-compat-25.0.0_processed_manifest/AndroidManifest.xml:::bazel-out/android-armeabi-v7a-fastbuild/bin/external/androidsdk/com.android.support/support-compat-25.0.0_symbols/local.bin is not in the format 'resources[#resources]:assets[#assets]:manifest:r.txt(:symbols.zip?):symbols.bin' ``` RELNOTES: None. PiperOrigin-RevId: 198724816
* Open up visibility of BuildConfiguration$OutputDirectory for serialization ↵Gravatar janakr2018-05-31
| | | | | | and remove unused repositoryName field from BuildConfiguration. PiperOrigin-RevId: 198723339
* docs(tutorial/cpp): fix link to other tutorialsGravatar Kelsey Z2018-05-31
| | | | | | | | iOS and android now have separated tutorials, fix a dead-link in the documentation Closes #5298. PiperOrigin-RevId: 198723211
* Update tools/cpp/toolchain_utils.bzl to return the proper C++ toolchainGravatar hlopko2018-05-30
| | | | | RELNOTES: None PiperOrigin-RevId: 198676014
* Remove the non_propagated_deps attribute from objc_library and apple_binary. ↵Gravatar kaipi2018-05-30
| | | | | | | This was a workaround created to deal with duplicated symbol errors, but there are now better ways to avoid them than using this attribute. RELNOTES: non_propagated_deps has been removed from objc_library and apple_binary. PiperOrigin-RevId: 198620886
* Remove support for ↵Gravatar cushon2018-05-30
| | | | | | --experimental_one_version_enforcement_use_transitive_jars_for_binary_under_test PiperOrigin-RevId: 198601057
* Fix some tests when run with a JDK9 javabase.Gravatar tomlu2018-05-30
| | | | | RELNOTES: None PiperOrigin-RevId: 198600493
* Special case * in target lookup, work around for #5300.Gravatar twerth2018-05-30
| | | | | | | | * is not an allowed file system character on Windows and checking if it's a directory or file for the wilcard check would throw an InvalidPathException. RELNOTES: None PiperOrigin-RevId: 198595138
* Resolve all super classes even if we have found missing super classes. This isGravatar cnsun2018-05-30
| | | | | | | | | necessary. If we stop resolving the super classes, then the checker will complain that some methods are missign. In fact, these methods exist, but their class is not resolved due to the existing early-break strategy. RELNOTES: none PiperOrigin-RevId: 198594008
* Allow rules that provide resources and assets as deps of android_* rulesGravatar asteinb2018-05-30
| | | | | | | | | | | | | | | | | | | These restrictions were originally put in place to prevent things like android_binary from being used as dependencies of android_library. However, it doesn't actually work - the restrictions are all ORed together, and that means rules that are of the allowed kind OR that have a JavaProvider are allowed. Since all android_binary targets presumably have Java providers, they are presumably all allowed. Slightly expand these restrictions by also allowing rules that have Android resource and asset providers. This will allow us to use Skylark rules to only inherit assets and resources from a target, but not anything else. I don't anticipate this expansion will have unwanted side effects, since virtually all Android targets already have Java providers anyway. RELNOTES: none PiperOrigin-RevId: 198593996
* Modify cc_toolchain_suite rule to allow selection of cc_toolchain label ↵Gravatar rosica2018-05-30
| | | | | | | | | | | | | | | | without reading the CROSSTOOL file. As we want to reroute selecting the toolchain from CROSSTOOL through cc_toolchain, cc_toolchain_suite should have all the necesarry information for obtaining the cc_toolchain label without accessing the CROSSTOOL file. In order to do that, besides the existing <toolchain.targetCpu>|<toolchain.compiler>, we add <cpu> type of key in 'toolchains' attribute of cc_toolchain_suite. Now the selection of cc_toolchain label goes as follows: 1. Return toolchains[<cpu>|<compiler> if it exists 2. Return toolchains[<cpu>] if it exists 3. Fall back to the previous state: return toolchains[<toolchain.targetCpu>|<toolchain.compiler>] RELNOTES: None. PiperOrigin-RevId: 198588849
* Adds support for InlineFileArtifactValue.Gravatar shahan2018-05-30
| | | | PiperOrigin-RevId: 198584000
* Prevent ijar from stripping out .kotlin_module files, which are needed for ↵Gravatar Googler2018-05-30
| | | | | | extension functions. PiperOrigin-RevId: 198579700
* Add --apple_enable_auto_dsym_dbg flagGravatar Googler2018-05-30
| | | | | | | | | This new flag can be used to forcibly enable dSYM generation for dbg apple builds, which is especially useful for debugging in remote builds, which may require the use of dSYMs. RELNOTES: Added --apple_enable_auto_dsym_dbg flag. PiperOrigin-RevId: 198577541
* Fix Skylark type typoGravatar asteinb2018-05-30
| | | | | | | | Fortunately or unfortunately, Skylark doesn't seem to validate against this type, so tests don't pick this mistyping up. RELNOTES: none PiperOrigin-RevId: 198568282
* Fix a few tests when run under JDK9.Gravatar tomlu2018-05-30
| | | | | RELNOTES: None PiperOrigin-RevId: 198565423
* Fix Bazel crash on bad config_setting labels.Gravatar gregce2018-05-30
| | | | | | | | | | | | | | | | This used to work more smoothly. But the introduction of ConfiguredTargetAndData adds a Precondition check: https://source.bazel.build/bazel/+/master:src/main/java/com/google/devtools/build/lib/skyframe/ConfiguredTargetAndData.java;l=68?q=ConfiguredTargetAndData that crashes if innerConfigurationKey is null. The only way that can happen is when reading a bad label, which Bazel assumes (incorrectly in this case) to be a null-configured source file. Good times. PiperOrigin-RevId: 198557148
* Fix an incorrect example in the platform documentation.Gravatar jcater2018-05-30
| | | | PiperOrigin-RevId: 198556851
* Turn on pseudo locale generation for compilation.Gravatar corysmith2018-05-30
| | | | | RELNOTES: android_binary.aapt_version='aapt2' now supports en_XA and ar_XB PiperOrigin-RevId: 198555305
* Provide more details on the transition to Skylark {git,http}_repositoryGravatar Klaus Aehlig2018-05-30
| | | | | | | | In the description of incompatible changes, provide more information on the how to transition to the Skylark versions of the deprecated native rules. Change-Id: I30c6ee6560a4aed0d6d8356b00e6c1afec460f22 PiperOrigin-RevId: 198544104
* Fix `equals()` and `hashCode()` for artifacts: artifacts of different ↵Gravatar Dmitry Lomov2018-05-30
| | | | | | | | | | | | | classes are not equal. Also validate that there are no tree and file artifacts with the same exec path. Fixes #4668. Closes #5284. Change-Id: Id97c0407a476a5bfc697b4ca7b858e3d0c0f8c75 PiperOrigin-RevId: 198540425
* Allow passing the relative symlink resolution policy to the SpawnInputExpanderGravatar ulfjack2018-05-30
| | | | PiperOrigin-RevId: 198535546
* runfiles,cc: C++ runfiles library in @bazel_toolsGravatar Laszlo Csomor2018-05-30
| | | | | | | | | | | | | | Add the C++ runfiles library to @bazel_tools//tools/cpp/runfiles:runfiles. RELNOTES[NEW]: C++,runfiles: to access data-dependencies (runfiles) in C++ programs, use the runfiles library built into Bazel. For usage info, see https://github.com/bazelbuild/bazel/blob/master/tools/cpp/runfiles/runfiles.h Change-Id: I5057a9f477289eea7244c60105e77fc71652a817 Closes #5293. Change-Id: I90cba6fa4c6595c838ae42f9d2c17548c8387e5d PiperOrigin-RevId: 198531849
* Automated rollback of commit 7fcbc8ffdead028d19606fefa2fa3be13781da98.Gravatar laszlocsomor2018-05-30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | *** Reason for rollback *** According to a post-submit regression test, this commit increased Bazel's memory usage slightly beyond some threshold. That event prompted me to consider and question the necessity of this commit. My goal is to make Bazel work on Windows without requiring MSYS, failing the build only if an action is a shell action. Toolchainifying the shell is related to, but not required by this effort. What is required is to fail the build when Bazel tries to create a shell action but the shell is missing, and we have that already with ShToolchain.getPath (which only considers the ShellConfiguration fragment). What's missing for my goal is to reimplement hardcoded shell actions (i.e. SpawnAction.builder().setShellCommand(...)) without using the shell where possible. *** Original change description *** shell toolchain: genrule now uses it genrule() now uses the shell toolchain (as well as the ShellConfiguration config fragment) to look up the shell interpreter's path. Also the CommandHelper no longer looks up the shell interpreter's path itself. Instead its ctor takes the path as an argument. This allows supporting rules that already use the shell toolchain and rules that still only consider the configuration fragment. With these changes genrule() is now able to use the shell interpreter registered as a toolchain, even if there's no `--shell_executable` flag specified (or its value is empty). Subsequent commits will migrate more and more rules to depend on the shell toolchain. This commit takes us closer to: 1. be able to detect the local shell interpreter's location, especially when it's not the default /bin/bash 2. be able to define different shell toolchains (different interpreter paths) for remote builds 3. gracefully fail the build if the machine has no shell installed but the action graph included a shell action See https://github.com/bazelbuild/bazel/issues/4319 Change-Id: I0674c7e2d5917643d87b48b19a1cb43e606ad2f7 Closes #5282. *** RELNOTES: none PiperOrigin-RevId: 198527351
* C++: Hide compilation context from SkylarkGravatar plf2018-05-30
| | | | | RELNOTES:none PiperOrigin-RevId: 198518792
* Rename r_txt from AndroidResourcesInfo to compiletime_r_txtGravatar asteinb2018-05-29
| | | | | | | | | | I didn't catch it at the time this field was initially introduced, but R files from Android libraries, exposed via AndroidResourcesInfo, are compiletime only. They should not be used at runtime or inherited from dependencies. Rename the field and add this warning to the description. RELNOTES: none PiperOrigin-RevId: 198448391
* Fix b/80260450 which saw cquery --output=proto crashing on alias configured ↵Gravatar juliexxia2018-05-29
| | | | | | | targets. Along the way, update ConfiguredTargetAccessor to return the correct Target (the alias, not the actual) when dealing with AliasedConfiguredTargets. RELNOTES: None. PiperOrigin-RevId: 198445580
* Expose Android data processing API in skylarkbuildapiGravatar asteinb2018-05-29
| | | | | | | | | | | | | | | | Expose the Android data processing API to skylarkbuildapi Rather than pass the SkylarkBuildApi interfaces (e.g., FileApi instead of Artifact) all the way through the Android data processing code, instead just cast them to the correct Bazel types. This is ugly, but is probably better than having to do multiple refactorings of the Android code. (A similar refactoring, for just a single type, took about 10 changes and 3300 lines of code.) The Skylark Build API is only meant for things exposed to Skylark, not Bazel internals, and, besides, when building with Bazel we should only expect inputs from other parts of Bazel. RELNOTES: none PiperOrigin-RevId: 198438519
* Propagate --experimental_prune_cpp_input_discovery to host builds. Otherwise,Gravatar Googler2018-05-29
| | | | | | | host builds don't profit from it. RELNOTES: None. PiperOrigin-RevId: 198437467
* Minimize the cost of Skyframe restarts during CC autoconfiguration.Gravatar jmmv2018-05-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Repository functions restart whenever they have to resolve a label due to the way Skyframe currently works. This is problematic because such functions are often costly: they try to detect features of the host system by building and running tools, and they touch the file system. To minimize the cost of these restarts, which are unavoidable, resolve the paths to all necessary labels upfront. This way, while the restarts still happen, they have no side-effects and thus are cheap. As a side-effect of this work, remove the strange and undocumented "tpl" function, which only made things more cryptic and harder to refactor. This cuts down Bazel's own analysis time on macOS on my Mac Pro 2013 from 14 seconds to 6 seconds by trimming about 15 unnecessary rebuilds and executions of the xcode-locator-bin tool to just 1. In other words: one fewer awkward pause during analysis time. Additionally, there is the hope that this will fix the problems users observe where Bazel writes persistent garbage during autoconfiguration (needing "clean --expunge" to recover) when Visual Studio Code is running and Santa is enabled on macOS; see https://github.com/bazelbuild/bazel/issues/4603. This is most likely a bug in Santa (see https://github.com/google/santa/issues/260) but we were tickling it due to our apparently-abusive behavior of building, executing, and then removing the same thing over and over again. Fixes https://github.com/bazelbuild/bazel/issues/5196 and should also fix https://github.com/bazelbuild/bazel/issues/4603. RELNOTES: None. PiperOrigin-RevId: 198434395
* Simplify RuleClass.Builder#cfg, Attribute.Builder#cfg interfaces.Gravatar gregce2018-05-29
| | | | PiperOrigin-RevId: 198427902