aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib
Commit message (Collapse)AuthorAge
* Use the RecordingInputStream from the WorkerSpawnStrategy in the ↵Gravatar kush2017-04-25
| | | | | | | WorkerTestStrategy as well, to better log errors. RELNOTES: None PiperOrigin-RevId: 154080821
* Update to javac9-r4023Gravatar cushon2017-04-25
| | | | PiperOrigin-RevId: 154078281
* Export the FILES_TO_COMPILE output group from the objc rules. Add a builder ↵Gravatar cpeyser2017-04-25
| | | | | | to CompilationSupport to clean up that expanding API. PiperOrigin-RevId: 154077775
* Cleanup SingleJarActionBuilderGravatar cushon2017-04-25
| | | | | | | | | Avoiding duplicating code between the branches for handling the Java and c++ implementations, and skip the --resources flag if there are no resources. Both of these changes should be no-ops. PiperOrigin-RevId: 154055528
* Make PathFragment an abstract class.Gravatar nharmata2017-04-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are now four concrete implementations: RelativeUnixPathFragment, AbsoluteUnixPathFragment, RelativeWindowsPathFragment, AbsoluteWindowsPathFragment. Goals: -Reduce memory usage of PathFragment on non-Windows platforms while maintaining existing semantics. -Make a few simple performance improvements along the way. -Add TODOs for a few more simple performance improvements. -Open the way for reducing code complexity of PathFragment. All of the Windows-specific stuff ought not complicate the code so much. Non goals: -Make the entire codebase as pretty as possible wrt PathFragment & Windows. -Make PathFragment usage more sane in general (e.g. change semantics to ban coexistence of Windows and Unix PathFragments). -Optimize PathFragment as much as possible wrt memory or even in any other dimensions (e.g. gc churn, cpu). To elaborate, the primary motivation is per-instance memory usage of PathFragment on Unix platforms: Before this change ------------------ +UseCompressedOops --> 32 bytes per instance -UseCompressedOops --> 40 bytes per instance After this change ------------------ +UseCompressedOops --> 24 bytes per instance -UseCompressedOops --> 32 bytes per instance Since Bazel can retain lots of PathFragments, the memory savings of this CL are fairly large. RELNOTES: None PiperOrigin-RevId: 154052905
* BEP: Show protocol upload in the UIGravatar buchgr2017-04-24
| | | | | | | | | | | | | | | | | | | | | | The BEP (build event protocol) upload may at times take longer than the build itself. This is especially true for cached builds, where there is little build work, but the protocol still needs to be uploaded. In this case the bazel UI will now display that it's waiting for BEP upload, both in the current and the new experimental UI (--experimental_ui). When executing a run command, blaze waits for the BEP upload to finish before it runs the target. Major Modifications: - The BuildEventTransport interface now also has a name() method that returns a string. When waiting for a transport to finish the BEP upload, this string is displayed in the UI. - The BuildEventStreamer now emits two new events AnnounceBuildEventTransportsEvent and BuildEventTransportClosed on the event bus. This is how the experimental UI is informed about BEP upload progress. RELNOTES: None PiperOrigin-RevId: 154052401
* Bazel: Fix wrong test count shown for failing tests.Gravatar philwo2017-04-24
| | | | | | | | | | | | | | | | | | | | | | Bazel always miscounted the number of passes that a test was run, resulting in confusing output like this: philwo@philwo:~/src/errortest$ bazel test //tests:fail [...] //tests:fail FAILED in 1 out of 2 in 0.1s ERROR .tests/fail It shows "1 out of 2" even though just one pass happened. With this fix, the output is correct: philwo@philwo:~/src/errortest$ bazel test //tests:fail [...] //tests:fail FAILED in 0.1s ERROR .tests/fail Relevant to #2855. PiperOrigin-RevId: 154043240
* Add a undocumented way to define a platform that is autodetected fromGravatar John Cater2017-04-24
| | | | | | | | | the host. Also add a single instance of that platform for standard usage. Change-Id: I0e7a8eb3a44099076540c8d955fc0c0c70447583 PiperOrigin-RevId: 153878880
* Refactor PlatformInfo.Builder to detect and report invalid configurations.Gravatar John Cater2017-04-24
| | | | | Change-Id: Ib2bbd1b35985c4ec2d1e411aea4b32af7433a426 PiperOrigin-RevId: 153856560
* Fix typo in comment in TestResult.java.Gravatar philwo2017-04-24
| | | | PiperOrigin-RevId: 153831526
* BEP: Temporarily readd default outputs for targetsGravatar Klaus Aehlig2017-04-24
| | | | | | | | | | For the TargetComplete event (not for the completion of aspects) readd the reporting of outputs, but only for the default output group. This will help existing applications to still report the outputs of a target, till they transferred to handling named sets of files. Change-Id: I1b0730b38bdc18f8fb2ccf859a7fee8f1b7f0cac PiperOrigin-RevId: 153828334
* Add explicit names to the sandboxing strategies so that they can beGravatar philwo2017-04-24
| | | | | | | | | | | selected even if they're not the preferred one on a platform. Simplify the SandboxActionContextProvider and remove the warning about sandboxing being unsupported. With the ProcessWrapperSandboxedStrategy now being reliable enough and the strategies printing their real name in the UI, this is overall a better UX. PiperOrigin-RevId: 153825986
* No longer print a warning when a sandbox directory couldn't be deleted.Gravatar philwo2017-04-24
| | | | | | With the process-wrapper improvements and the additional deletion of the sandbox base in the SandboxModule in, this should be reliable enough. The warning was also not actionable for users and annoyed them, so let's get rid of it. PiperOrigin-RevId: 153823045
* Add documentation for the (otherwise very confusing) :lipo_context attribute.Gravatar lberki2017-04-24
| | | | | RELNOTES: None. PiperOrigin-RevId: 153807467
* Don't create the LIPO context collector subgraph for instrumentation builds.Gravatar gregce2017-04-24
| | | | | | | | | The consumers of ":lipo_context_collector" only do anything with it in optimization builds. Also remove an outdated comment in FdoSupport. PiperOrigin-RevId: 153748937
* AutoValue and SkylarkClassObject interact badly, so remove that.Gravatar John Cater2017-04-24
| | | | | | | | | | | Because SkylarkClassObject declares equals, hashCode, and toString, AutoValue doesn't bother creating those, but since these classes didn't pass any data back to SkylarkClassObject, the defined methods don't work properly. This shows up as all instances of a class having the same hashCode and being equals() to each other. Change-Id: I50734f04369231cd2141dd368b04a3f0997a7d18 PiperOrigin-RevId: 153735995
* Make the test tmp directory name deterministicGravatar ulfjack2017-04-24
| | | | | | Fixes #2853. PiperOrigin-RevId: 153730500
* Remove an unused argument from FdoSupport#getGcdaArtifactsForGcdaPath().Gravatar lberki2017-04-24
| | | | | RELNOTES: None. PiperOrigin-RevId: 153716003
* Remove --microcoverage supportGravatar cushon2017-04-24
| | | | | | This feature is unused and depends on emma, which is obsolete. PiperOrigin-RevId: 153713051
* Enabling chunking of outputs in the RemoteWorker downloadBlob. This fixes ↵Gravatar olaola2017-04-24
| | | | | | | | | the bug that the RemoteWorker would fail to upload outputs that were too big to send in a single gRPC message. Fixes #2822. RELNOTES: n/a PiperOrigin-RevId: 153710733
* Initialize FeatureConfiguration for hip toolchain when building hipGravatar hlopko2017-04-24
| | | | | | | | | | | | | | | | | | | | | | Before, we correctly replaced CppConfiguration with HipCppConfiguration for hip builds, but we didn't update FeatureConfiguration. As Blaze was not using action_configs for compile actions, compiler tool was taken from configuration at the action creation time, not from FeatureConfiguration, so the tool was correct. Command line flags (some of them) were computed by FeatureConfiguration, but luckily the toolchains were so similar that it worked. In https://github.com/bazelbuild/bazel/commit/e1d692e486a2f838c3c894fd9de693fabd6685ed I tried to use action_configs for compile actions. The result was that compiler tool was taken from configuration at the CppConfiguration creation time, that was put into FeatureConfiguration, and that was used in action creation time. Sadly, the tool in CppConfiguration was different that the tool in HipCppConfiguration, and b/37315875 was discovered. This cl also uppdates FeatureConfiguration when HipCppConfiguration is replaced. RELNOTES: None. PiperOrigin-RevId: 153710405
* Remove the dash moduleGravatar dmarting2017-04-20
| | | | | | | | | | This module rely on an un-maintained codepath and is hardly used by anyone. We should also archive the code from dash until we can revive it with BEP RELNOTES[INC]: --use_dash, --dash_url and --dash_secret are removed. PiperOrigin-RevId: 153701824
* Rewrite repository lookup to return a failed value rather than throwGravatar ulfjack2017-04-20
| | | | | | | | | | | | | | | | | | | | | | | We need to lookup repositories as part of converting exec paths to artifacts, which in turn is needed for action cache lookups. These lookups should not cause a Skyframe exit, so we must not throw an exception here, unless the error makes it impossible to continue. Instead, we need to leave the decision whether to error out or not to the caller. Note that we may unnecessarily fetch a remote repository in order to do the action cache lookup, even if the action no longer depends on the input file, although this should only be possible for C++ compile actions. It's possible that there's another bug in the C++ compile action key computation that also contributes. This change also makes it so that the post-resolution action cache code ignores any errors wrt. repository lookup rather than throwing. If any of the paths could not be found, then the action cache lookup fails and we re-execute the corresponding action, which is exactly what should happen. Fixes #2759. PiperOrigin-RevId: 153696243
* Allow Skylark rule to declare a dependency on the C++ toolchain and make the ↵Gravatar lberki2017-04-20
| | | | | | | list of built-in include directories available to Skylark through it. RELNOTES: None. PiperOrigin-RevId: 153684976
* Also download stdout & stderr in case of a cache hitGravatar ulfjack2017-04-20
| | | | | | Fixes #1413. PiperOrigin-RevId: 153684106
* Automated g4 rollback of commit 50d62ee7888856f935d09e5fd60ee23d24d02b44.Gravatar cushon2017-04-20
| | | | | | | | | | | | *** Reason for rollback *** The depot has been fixed: unknown commit *** Original change description *** Partial rollback of unknown commit PiperOrigin-RevId: 153646328
* Prepare dynamic LIPO transitions.Gravatar gregce2017-04-20
| | | | | | | | Add a dynamic equivalent for LIPO_COLLECTOR transition. Rename LipoDataTransition (which handles DATA transition) to DisableLipoTransition. A future change will add a corresponding EnableLipoTransition (which will model TARGET_CONFIG_FOR_LIPO). PiperOrigin-RevId: 153611898
* OnePlatform auth support for Bazel, in preparation for next version of the API.Gravatar olaola2017-04-20
| | | | | | TESTED: local server RELNOTES: n/a PiperOrigin-RevId: 153599636
* Add repository override optionGravatar kchodorow2017-04-20
| | | | | | | | | | | RELNOTES: Adds a --override_repository option that takes a repository name and path. This forces Bazel to use the directory at that path for the repository. Example usage: `--override_repository=foo=/home/user/gitroot/foo`. Fixes #1266 PiperOrigin-RevId: 153599291
* Remove unused dsym type info from ObjcVariablesExtension.Gravatar cpeyser2017-04-20
| | | | | WANT_LGTM=all PiperOrigin-RevId: 153584480
* Filter out conflicting flag policies before invocation policy enforcement.Gravatar ccalvarin2017-04-20
| | | | | | | | | | | | | This is to minimize the likelihood of obscure policy conflict. Now, the last policy on a flag (after policy expansion) will be the only one in the "canonical" invocation policy. There should be no reason for explicitly setting multiple policies on a single flag, but if an expansion flag is policy'd and one of its children has a more specific policy on it, make sure that the policy on the child flag is after the policy on the expansion flag. Note that this restriction (only the last policy gets applied) also applies for repeatable flags. Make sure all values being set to a repeatable flag are set in a single SetValue operation, with multiple flagValues set. PiperOrigin-RevId: 153584034
* Support using minimized bitcode for ThinLTO LTO indexing stepGravatar Googler2017-04-19
| | | | | | | | This is the Blaze side of the support for emitting and using minimized bitcode files during the LTO indexing (thin link) step of a ThinLTO build. The llvm support has already been released to stable, and this needs to be submitted after the companion Crosstool support (unknown commit, will send for review once this larger part is reviewed). This enables large applications successfully build using ThinLTO and -g, otherwise the bitcode files that are input to the LTO indexing step are huge and the maximum input size is exceeded. PiperOrigin-RevId: 153549687
* RELNOTES: NoneGravatar ajmichael2017-04-19
| | | | PiperOrigin-RevId: 153545346
* RELNOTES: Fix select condition intersections.Gravatar Googler2017-04-19
| | | | PiperOrigin-RevId: 153531483
* Temporarily disable consistent split transitioning on apple_binary rules.Gravatar cparsons2017-04-19
| | | | | | | | If minimum_os is unspecified on an apple_binary target and ios_multi_cpus is not set, no apple_binary configuration transition is made. RELNOTES: None. PiperOrigin-RevId: 153529598
* Propagate iquote appropriately from apple_binary so that generated headers ↵Gravatar cparsons2017-04-19
| | | | | | | of xctest apps are seen by ios_test RELNOTES: None. PiperOrigin-RevId: 153529262
* Deprecate use of option category to describe documentation level / usage ↵Gravatar ccalvarin2017-04-19
| | | | | | | | restrictions. Prevent the old category strings "undocumented," "hidden," or "internal" from being used as categories, to prevent developers from relying on deprecated behavior. PiperOrigin-RevId: 153525499
* Change Bazel's LIPO model to support dynamic configurations.Gravatar gregce2017-04-19
| | | | | | | | | | The key change is to eliminate the need to transition from the data to the target configuration by relying on out-of-band configuration state. Specifically, the old model drops LIPO options from the data configuration. In the cases when we have to switch back (i.e. TARGET_CONFIG_FOR_LIPO), those options have to get re-injected somehow. Static configurations achieve this with the global configuration transitions table. But dynamic configs have no comparable source (and they consciously eschew global state). This cl changes the model to *keep* LIPO settings in the data config, then use a new "enableOrDisable" flag to determine whether or not to actually use them. With this model, the data -> target transition is now as simple as toggling that flag. This change doesn't actually add dynamic config LIPO support. It's doing enough as it is, and we need to make sure it doesn't break existing LIPO semantics. Dynamic support will come as a followup. PiperOrigin-RevId: 153504240
* Add warning to git_repositoryGravatar kchodorow2017-04-19
| | | | | | #2147 PiperOrigin-RevId: 153494286
* Make Bazel android_library exports_manifest default to True.Gravatar ajmichael2017-04-19
| | | | | | | Fixes https://github.com/bazelbuild/bazel/issues/2743. RELNOTES: android_library exports_manifest now defaults to True. PiperOrigin-RevId: 153493900
* Turn on --experimental_j2objc_header_map by default.Gravatar rduan2017-04-19
| | | | | RELNOTES: None. PiperOrigin-RevId: 153489730
* Fix RemoteSpawnStrategy to upload stdout/stderr to the remote cacheGravatar ulfjack2017-04-19
| | | | | | | | | | This is already fixed in the CachedLocalSpawnRunner, with tests there, which will replace RemoteSpawnStrategy in the near future. For now, I'd like to get this in in time for 0.5.0 to get test caching working. Fixes #1413. PiperOrigin-RevId: 153486592
* Skip params file handling for resource jar actions with short command linesGravatar cushon2017-04-19
| | | | PiperOrigin-RevId: 153485708
* Fix crash on graph cycle in configuration loadingGravatar gregce2017-04-19
| | | | PiperOrigin-RevId: 153473961
* Skip params file handling for genjar actionsGravatar cushon2017-04-19
| | | | | | All genjar actions have very short command lines. PiperOrigin-RevId: 153468708
* Revert "Expect the python binary on path to be a symlink "Gravatar Klaus Aehlig2017-04-19
| | | | | | | | | | | | | | This reverts commit 1cd2096284959ead26687d1d58b695d2abffb8e2. That commit tried to find a more suitable python binary by following symlinks. That, however, is not necessary, as our follow-up infrastructure can call symbolic links and our tests os.path.isfile(path) and os.access(path, os.X_OK) follow symbolic links as well. Fixes #2836. Change-Id: If37589622d141265577eb3872f68342ae1c263dc PiperOrigin-RevId: 153461118
* Write stdout and stderr to the remote cacheGravatar ulfjack2017-04-18
| | | | | | | | | | Only write a cache entry when the spawn executed successfully, and with a 0 exit code. In the test, we only check that uploadFileContents is called exactly twice. Progress on #1413. PiperOrigin-RevId: 153458240
* Implement logging in LocalSpawnRunnerGravatar ulfjack2017-04-18
| | | | | | | | This is a prerequisite for Google to use it; there's no consistent logging strategy yet, but Google internally requires logging, and it needs to be somewhat backwards compatible. PiperOrigin-RevId: 153454160
* Reword commentGravatar laurentlb2017-04-18
| | | | | RELNOTES: None. PiperOrigin-RevId: 153449924
* Generating PDB files on WindowsGravatar Yun Peng2017-04-18
| | | | | | | | | | | | | | | | | | | | | | | | | | 1. Add /Z7 as compiler flag in CROSSTOOL, this causes full debugging infomation built into object files, no PDB file is generated. 2. Add /DEBUG as linker flag so that a PDB file will be generated for executable or dll. * /DEBUG:FULL for dbg mode. the full PDB can be used to debug the executable when no other build products are available, such as when the executable is deployed. * /DEBUG:FASTLINK for fastbuild mode. object files are still needed when debugging the executable, but linking speed can be two to four times faster that full PDB generation. * No option is added for opt mode. More detailed info: https://msdn.microsoft.com/en-us/library/xe4t6fc1.aspx 3. Add an empty feature in MSVC CROSSTOOL to tell Bazel we need PDB file 4. Add PDB file artifact in an output named pdb_file of cc_binary, then you can build the pdb file by bazel build //foo/bar:bin --output_groups=pdb_file 5. Add test for PDB file generation Change-Id: Ia5096470187ebca72f2c804f32d5b723f40c0b85 PiperOrigin-RevId: 153449059