aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/buildtool/ExecutionTool.java
Commit message (Collapse)AuthorAge
...
* Automated g4 rollback of commit 1d9e1ac90197b1d3d7b137ba3c1ada67bb9ba31b.Gravatar hlopko2017-04-04
| | | | | | | | | | | | | | | | | | *** Reason for rollback *** Breaks //src/test/shell/integration:force_delete_output_test *** Original change description *** Symlink output directories to the correct directory name If the workspace directory is /path/to/my/proj and the name in the WORKSPACE file is "floop", this will symlink the output directories to output_base/execroot/floop instead of output_base/execroot/proj. More prep for #1262, fixes #1681. PiperOrigin-RevId: 152126545
* Symlink output directories to the correct directory nameGravatar kchodorow2017-03-31
| | | | | | | | | | If the workspace directory is /path/to/my/proj and the name in the WORKSPACE file is "floop", this will symlink the output directories to output_base/execroot/floop instead of output_base/execroot/proj. More prep for #1262, fixes #1681. PiperOrigin-RevId: 151712384
* Clear AspectValues when discarding analysis cache, along with ↵Gravatar janakr2017-03-29
| | | | | | | | ConfiguredTargetValues. Also clear transitive packages for both, even for top-level targets. This is not expected to save significant memory, but is expected to reduce the number of references to Packages, allowing them to be dropped more easily when discarding analysis cache and running in batch mode. PiperOrigin-RevId: 151508877
* Add Action context mnemonic to imprecise spawn strategy error message.Gravatar Chloe Calvarin2017-03-22
| | | | | | -- PiperOrigin-RevId: 150750767 MOS_MIGRATED_REVID=150750767
* Convert --use_action_cache to a regular optionGravatar Googler2017-03-01
| | | | | | | | RELNOTES: Convert --use_action_cache to a regular option -- PiperOrigin-RevId: 148804881 MOS_MIGRATED_REVID=148804881
* Rollback of commit 4b73e972d909bcd533f2f9940f95a00b9b73bdde.Gravatar Dmitry Lomov2017-02-17
| | | | | | | | | | | | | | | | | | | | | | | *** Reason for rollback *** Broke tests on CI: http://ci.bazel.io/job/bazel-tests/570/ *** Original change description *** Roll forward execroot change RELNOTES[INC]: Previously, an external repository would be symlinked into the execution root at execroot/local_repo/external/remote_repo. This changes it to be at execroot/remote_repo. This may break genrules/Skylark actions that hardcode execution root paths. If this causes breakages for you, ensure that genrules are using $(location :target) to access files and Skylark rules are using http://bazel.io/docs/skylark/lib/File.html's path, dirname, etc. functions. Cust... -- PiperOrigin-RevId: 147833177 MOS_MIGRATED_REVID=147833177
* Roll forward execroot changeGravatar Kristina Chodorow2017-02-16
| | | | | | | | | | | | | | | | | RELNOTES[INC]: Previously, an external repository would be symlinked into the execution root at execroot/local_repo/external/remote_repo. This changes it to be at execroot/remote_repo. This may break genrules/Skylark actions that hardcode execution root paths. If this causes breakages for you, ensure that genrules are using $(location :target) to access files and Skylark rules are using http://bazel.io/docs/skylark/lib/File.html's path, dirname, etc. functions. Custom crosstools that hardcode external/<repo> paths will have to be updated. Issue #1262. -- PiperOrigin-RevId: 147726370 MOS_MIGRATED_REVID=147726370
* Rollback of commit 49d97f9bb4dd04ef62198ded7b53b2a8f8c603db.Gravatar Luis Fernando Pino Duque2017-02-10
| | | | | | | | *** Reason for rollback *** -- PiperOrigin-RevId: 147146321 MOS_MIGRATED_REVID=147146321
* Apply --symlink_prefix to the output and exec root symlinks.Gravatar Luis Fernando Pino Duque2017-02-08
| | | | | | | | | | | | | | | | Turns out --symlink_prefix is not applied to the bazel-{out,workspace} unlike bazel-{bin,genfiles,testlogs} thus breaking the semantics of --symlink_prefix. This CL fixes the problem by using the symlink prefix instead of the product name when building the output and exec root symlinks. RELNOTES[INC]: Using --symlink_prefix is now applied to the output symlink (e.g. bazel-out) and the exec root symlink (e.g. bazel-workspace). -- PiperOrigin-RevId: 146902534 MOS_MIGRATED_REVID=146902534
* Add a flag to print the effective (Spawn)ActionContexts for debugging.Gravatar Philipp Wollermann2017-02-01
| | | | | | | | | | | | | | | | | | | | | | | | | By specifying the flag "--debug_print_action_contexts", Bazel will print the contents of the internal SpawnActionContext and ContextMap maps, which allows developers to see which kind of actions are run using which strategy. Example output of Bazel at HEAD: $ ./output/bazel build --debug_print_action_contexts INFO: SpawnActionContextMap: "" = LinuxSandboxedStrategy INFO: SpawnActionContextMap: "Closure" = WorkerSpawnStrategy INFO: SpawnActionContextMap: "Javac" = WorkerSpawnStrategy INFO: ContextMap: Context = BazelWorkspaceStatusActionContext INFO: ContextMap: CppCompileActionContext = SpawnGccStrategy INFO: ContextMap: CppLinkActionContext = SpawnLinkStrategy INFO: ContextMap: FileWriteActionContext = FileWriteStrategy INFO: ContextMap: FilesetActionContext = FilesetActionContextImpl INFO: ContextMap: IncludeScanningContext = DummyIncludeScanningContext INFO: ContextMap: SpawnActionContext = LinuxSandboxedStrategy INFO: ContextMap: SymlinkTreeActionContext = SymlinkTreeStrategy INFO: ContextMap: TestActionContext = ExclusiveTestStrategy (Can you spot the bug found by this feature here? The default TestActionContext is ExclusiveTestStrategy, which is probably not what we want.) -- PiperOrigin-RevId: 146233390 MOS_MIGRATED_REVID=146233390
* Merge the action input prefetcher into the ExecutorBuilder.Gravatar Ulf Adams2017-01-13
| | | | | | | | | This should be a no-op change, primarily intended to improve the BlazeModule API. The code simplification in the distributor code path is incidental. -- PiperOrigin-RevId: 144441458 MOS_MIGRATED_REVID=144441458
* Move some classes to lib.exec in preparation for layering enforcementGravatar Ulf Adams2016-12-21
| | | | | | | | | | | | This change is part of the mu-bazel effort, which aims to build a minimally useful Bazel binary with most extraneous functionality removed. As part of that, we want to enforce layering of packages. In particular, lib.actions must not depend on lib.rules or lib.exec. lib.rules must not depend on lib.exec. Moving these classes is a necessary step to enforce that layering. -- PiperOrigin-RevId: 142668172 MOS_MIGRATED_REVID=142668172
* Move some actions to language-specific packages, where they belong.Gravatar Lukacs Berki2016-11-23
| | | | | -- MOS_MIGRATED_REVID=140024976
* Move createActionCache to ExecutorBuilder.Gravatar Ulf Adams2016-11-02
| | | | | -- MOS_MIGRATED_REVID=137936478
* Refactor the module API to use the builder pattern for executor creation.Gravatar Ulf Adams2016-11-02
| | | | | | | This significantly simplifies several of our modules. -- MOS_MIGRATED_REVID=137713119
* Revert creating a convenience symlink usiing the workspace nameGravatar Kristina Chodorow2016-09-26
| | | | | | | | | | Switch back to using the directory name, since there's no good way to get the workspace name from `clean` (yet). Fixes #1795. -- MOS_MIGRATED_REVID=134083065
* Rollback of commit 82d43279f93d95e4c41b4bc598a3cc05ddd1ae1a.Gravatar Laszlo Csomor2016-09-21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | *** Reason for rollback *** Breaks TensorFlow and other Bazel jobs on ci.bazel.io *** Original change description *** Change execution root for external repositories to be ../repo Some of the important aspect of this change: * Remote repos in the execution root are under output_base/execroot/repo_name, so the prefix is ../repo_name (to escape the local workspace name). * Package roots for external repos were previously "output_base/", they are now output_base/external/repo_name (which means source artifacts always have a relative path from their repository). * Outputs are under bazel-bin/external/repo_name/ (or similarly under genfiles). Note that this is a bit of a change from how this was implemented in the previous cl. Fixes #1262. RELNOTES[INC]: Previously, an external repository would be symlinked into the execution root at execroot/local_repo/external/remote_repo. This changes it to be at execroot/remote_repo. This may break genrules/Skylark actions that hardcode execution root paths. If this causes breakages for you, ensure that genrules are using $(location :target) to access files and Skylark rules are using http://bazel.io/docs/skylark/lib/File.html's path, dirname, etc. functions. Roll forward of bdfd58a. -- MOS_MIGRATED_REVID=133709658
* Change execution root for external repositories to be ../repoGravatar Kristina Chodorow2016-09-20
| | | | | | | | | | | | | | | | | | | | | | | Some of the important aspect of this change: * Remote repos in the execution root are under output_base/execroot/repo_name, so the prefix is ../repo_name (to escape the local workspace name). * Package roots for external repos were previously "output_base/", they are now output_base/external/repo_name (which means source artifacts always have a relative path from their repository). * Outputs are under bazel-bin/external/repo_name/ (or similarly under genfiles). Note that this is a bit of a change from how this was implemented in the previous cl. Fixes #1262. RELNOTES[INC]: Previously, an external repository would be symlinked into the execution root at execroot/local_repo/external/remote_repo. This changes it to be at execroot/remote_repo. This may break genrules/Skylark actions that hardcode execution root paths. If this causes breakages for you, ensure that genrules are using $(location :target) to access files and Skylark rules are using http://bazel.io/docs/skylark/lib/File.html's path, dirname, etc. functions. Roll forward of bdfd58a. -- MOS_MIGRATED_REVID=133606309
* Remove some more occurences of deprecated getExecRoot() callsGravatar Kristina Chodorow2016-09-15
| | | | | -- MOS_MIGRATED_REVID=133257532
* Create a symlink with the right workspace name under the execrootGravatar Kristina Chodorow2016-07-22
| | | | | | | | | | | | | | | | | | The execution root currently uses the basename of the workspace directory for the workspace name, not the name in the WORKSPACE file. (For example, if our sources were in /path/to/foo and our WORKSPACE file had workspace(name = "bar"), our execution root would look like execroot/foo.) This creates a symlink bar -> foo, so that accessing ../repo_name actually works for the main repository. RELNOTES[INC]: The main repository's execution root is under the main repository's workspace name, not the source directory's basename. This shouldn't have any effect on most builds, but it's possible it could break someone doing weird things with paths in actions. -- MOS_MIGRATED_REVID=128175455
* --Gravatar Luis Fernando Pino Duque2016-07-20
| | | | MOS_MIGRATED_REVID=127927495
* Model the TopLevelArtifactContext as an argument to the CompletionFunction ↵Gravatar Googler2016-07-18
| | | | | | | | | rather than a PRECOMPUTED value. Having a stale TopLevelArtifactContext leads to invalidation of all the top level target nodes, causing time wasted due to a lot of cache hits for a null build. -- MOS_MIGRATED_REVID=127585059
* Make execution root symlink builder handle PackageIdentifiersGravatar Kristina Chodorow2016-06-23
| | | | | | | Part of the rollforward for #1262. -- MOS_MIGRATED_REVID=125562871
* Move execroot tree creation to its own classGravatar Kristina Chodorow2016-06-21
| | | | | | | Part 1 of many for #1262, rolling forward. -- MOS_MIGRATED_REVID=125334954
* Rollback of commit bdfd58a8ca2ed5735d6aaa5b238fb0f689515724.Gravatar Laurent Le Brun2016-06-20
| | | | | -- MOS_MIGRATED_REVID=125160288
* Make the execution root match the runfiles tree structure for external ↵Gravatar Kristina Chodorow2016-06-17
| | | | | | | | | | | | | | | | | | | | | repositories One interesting side effect of how this is implemented is that for external repositories, bin/ and genfiles/ are combined. External repo output is under bazel-out/local-fastbuild/repo_name for each repo. Fixes #1262. RELNOTES[INC]: Previously, an external repository would be symlinked into the execution root at execroot/local_repo/external/remote_repo. This changes it to be at execroot/remote_repo. This may break genrules/Skylark actions that hardcode execution root paths. If this causes breakages for you, ensure that genrules are using $(location :target) to access files and Skylark rules are using http://bazel.io/docs/skylark/lib/File.html's path, dirname, etc. functions. -- MOS_MIGRATED_REVID=125095799
* --Gravatar Luis Fernando Pino Duque2016-06-16
| | | | MOS_MIGRATED_REVID=125042781
* Fix action cache save save time reporting: We were giving the time in nanos ↵Gravatar Eric Fellheimer2016-06-15
| | | | | | | and saying it was in ms. -- MOS_MIGRATED_REVID=124841976
* Replace the occurrences of Constants.PRODUCT_NAME for a call toGravatar Luis Fernando Pino Duque2016-05-23
| | | | | | | | | BlazeRuntime#getProductName() or a reference to TestConstants.PRODUCT_NAME for tests. This CL prepares the codebase in order to delete the constant. -- MOS_MIGRATED_REVID=122993568
* Refactor BlazeWorkspace creation to happen after BlazeRuntime construction.Gravatar Ulf Adams2016-04-13
| | | | | | | | As part of that, move a BinTools and the WorkspaceStatusActionFactory to the BlazeWorkspace. -- MOS_MIGRATED_REVID=119633702
* Eliminate BuildConfiguration.Fragment#prepareForExecutionPhase().Gravatar Lukacs Berki2016-04-07
| | | | | | | It is only used for FDO, for which purpose it seems to be unnecessary. -- MOS_MIGRATED_REVID=119151709
* Move most of the workspace-handling code from BlazeRuntime to a new class.Gravatar Ulf Adams2016-03-30
| | | | | -- MOS_MIGRATED_REVID=118563271
* Move most BlazeRuntime methods related to workspace directories to CommandEnv.Gravatar Ulf Adams2016-03-30
| | | | | -- MOS_MIGRATED_REVID=118561661
* Remove calls of CommandEnvironment.getView; remove ide-info from BuildView.Gravatar Ulf Adams2016-03-30
| | | | | | | This makes the late initialization of BuildView more obviously safe. -- MOS_MIGRATED_REVID=118469655
* Respect --noexperimental_check_output_files in FileSystemValueChecker. ↵Gravatar Nathan Harmata2016-03-25
| | | | | | | | | FileStateValues for output files can make their way into the Skyframe graph if a source file is symlink to an output file. Also fix a bug where ExternalFilesHelper#isExternalFileSeen would always return true after returning true once in the past. This meant if an external file ever made its way into the Skyframe graph, we would always do a full graph scan at the beginning of each build (iow, we would always waste some CPU time doing nothing interesting). -- MOS_MIGRATED_REVID=118190190
* Let ActionContextConsumer#getActionContexts() return a Multimap instead of a ↵Gravatar Philipp Wollermann2016-02-28
| | | | | | | | | | | Map. This makes it possible to request multiple implementations of the same ActionContext to be available via Executor#getContext(). Currently, specialized SpawnActionContexts like the sandbox or the worker strategy that might have to do a fallback each instantiate their own private copy of e.g. the StandaloneSpawnStrategy. With this change, they can instead get a global instance from the Executor. -- MOS_MIGRATED_REVID=115705811
* Windows: execute build-runfiles through shell.Gravatar Dmitry Lomov2016-02-12
| | | | | | | Needed for #276. -- MOS_MIGRATED_REVID=114529775
* Make local_repository and new_local_repository work with the limitations of ↵Gravatar Lukacs Berki2016-01-26
| | | | | | | our plans for symlink support on Windows. -- MOS_MIGRATED_REVID=113043269
* Create convenience symlinks before the build so that they are available for ↵Gravatar Lukacs Berki2016-01-22
| | | | | | | | | intra-build debugging. As a drive-by fix, create the configuration-independent symlinks even when we have >1 target configurations. Fix broken windows! -- MOS_MIGRATED_REVID=112764311
* Create the convenience symlinks only after the build, and only those that ↵Gravatar Lukacs Berki2016-01-21
| | | | | | | | | point to an existing directory. This required fixing the worker strategy so that it reads params files not through said convenience symlinks, but from the execroot. -- MOS_MIGRATED_REVID=112682485
* Use Bazel Preconditions variant which avoids varargs array creationGravatar Mark Schaller2015-12-10
| | | | | | | Reduces garbage. -- MOS_MIGRATED_REVID=109914243
* Don't print "Building complete" (and save the action caches) if we're about ↵Gravatar Janak Ramakrishnan2015-12-08
| | | | | | | to crash or exit abruptly. It just confuses users and could potentially cause other problems. -- MOS_MIGRATED_REVID=109702171
* Refactoring: pull out the call to update buildResult.Gravatar Ulf Adams2015-12-04
| | | | | | | Also remove the unnecessary state check. -- MOS_MIGRATED_REVID=109396856
* Make --symlink_prefix= work as expected again (i.e. create links called ↵Gravatar Lukacs Berki2015-11-25
| | | | | | | "bin"/"genfiles" instead of the default ones) -- MOS_MIGRATED_REVID=108699595
* Notify the output service at startup whether output tree tracking is enabled.Gravatar Eric Fellheimer2015-11-19
| | | | | -- MOS_MIGRATED_REVID=108142409
* Track the entire OutputService instead of just the BatchStatter.Gravatar Eric Fellheimer2015-11-16
| | | | | -- MOS_MIGRATED_REVID=107800790
* Move the outputService field to the CommandEnvironment.Gravatar Ulf Adams2015-10-20
| | | | | -- MOS_MIGRATED_REVID=105841398
* Move commandStartTime from BlazeRuntime to CommandEnvironment.Gravatar Ulf Adams2015-10-20
| | | | | -- MOS_MIGRATED_REVID=105840775
* Description redacted.Gravatar Googler2015-10-13
| | | | | -- MOS_MIGRATED_REVID=105214382
* Rationalize copyright headersGravatar Damien Martin-Guillerez2015-09-25
| | | | | | | | | | | The headers were modified with `find . -type f -exec 'sed' '-Ei' 's|Copyright 201([45]) Google|Copyright 201\1 The Bazel Authors|' '{}' ';'` And manual edit for not Google owned copyright. Because of the nature of ijar, I did not modified the header of file owned by Alan Donovan. The list of authors were extracted from the git log. It is missing older Google contributors that can be added on-demand. -- MOS_MIGRATED_REVID=103938715