aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/analysis/actions
Commit message (Collapse)AuthorAge
* Use nested sets for configured target runfiles instead of flattened lists.Gravatar Googler2017-05-26
| | | | | RELNOTES: None PiperOrigin-RevId: 157124371
* Automated g4 rollback of commit e2edf2e141a09c025a958d580c7cac7b57c70d83.Gravatar Googler2017-05-26
| | | | | | | | | | | | | | | | | | | | | | | | | *** Reason for rollback *** Rollforward with fix. *** Original change description *** Automated g4 rollback of commit c78c947e6a8cbb323304f872a3dcabb989a3d76b. *** Reason for rollback *** Breaks android targets in the nightly - see [] *** Original change description *** Do not retain transitive data in AndroidLocalTestBase... *** ROLLBACK_OF=156745610 RELNOTES: None PiperOrigin-RevId: 157028029
* Automated g4 rollback of commit c78c947e6a8cbb323304f872a3dcabb989a3d76b.Gravatar cpeyser2017-05-23
| | | | | | | | | | | | | | *** Reason for rollback *** Breaks android targets in the nightly - see [] *** Original change description *** Do not retain transitive data in AndroidLocalTestBase. The argument strings and artifacts were both transitive and flattened, causing O(N^2) memory consumption. PiperOrigin-RevId: 156745610
* Do not retain transitive data in AndroidLocalTestBase.Gravatar Googler2017-05-15
| | | | | | The argument strings and artifacts were both transitive and flattened, causing O(N^2) memory consumption. PiperOrigin-RevId: 156083738
* Remove methods from CommandLine, making it a simple argument list interface.Gravatar Googler2017-05-15
| | | | | | | * isShellCommand is now passed directly to SpawnAction * Getting the associated params file action was a test-only thing. We can pull this out of the action graph instead. PiperOrigin-RevId: 156060366
* Do not expand nested sets in resource merging action construction.Gravatar Googler2017-05-15
| | | | PiperOrigin-RevId: 155900259
* Set the local CPU reservation for tests based on their "cpu:<n>" tag.Gravatar philwo2017-05-03
| | | | | | | | | | | | | | | | | | This lets users specify that their test needs a minimum of <n> CPU cores to run and not be flaky. Example for a reservation of 4 CPUs: sh_test( name = "test", size = "large", srcs = ["test.sh"], tags = ["cpu:4"], ) This could also be used by remote execution strategies to tune their resource adjustment. RELNOTES: You can increase the CPU reservation for tests by adding a "cpu:<n>" (e.g. "cpu:4" for four cores) tag to their rule in a BUILD file. This can be used if tests would otherwise overwhelm your system if there's too much parallelism. PiperOrigin-RevId: 154856091
* Convert LLVM raw profiles to indexed format if necessary.Gravatar Googler2017-04-30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Here is what is done today: bazel build -c opt --fdo_optimize=<path_to_profdata_file> //target The .profdata file is the LLVM profiles in indexed format and bazel creates a symlink to it from bazel-fdo/_fdo/... and compiles the target. However, the instrumented binary generates a .profraw file and hence the conversion to .profdata must be done manually using the llvm-profdata binary which is shipped along with the crosstool as: $ llvm-profdata -merge -o <path_to_profdata_file> <path_profraw_file> We are trying to avoid this intermediate step in this change by baking this into bazel. This implementation does the following: * In CppConfiguration.java, adds new tool llvm-profdata. * In CcToolchain.java, in function create, if LLVM instrumented FDO is desired, the profile format is checked and the profile conversion takes place. * FdoSupport.java checks for LLVM instrumented FDO is bypassed. RELNOTES[NEW]: Raw LLVM profiles are now supported. PiperOrigin-RevId: 154569896
* Refactor all ctor callsites of PathFragment to instead call a static ↵Gravatar nharmata2017-04-05
| | | | | | | | | | | | 'create' method. This paves the way for changing PathFragment to e.g. an abstract class with multiple subclasses. This way we can split out the windows-specific stuff into one of these concrete classes, making the code more readable and also saving memory (since the shallow heap size of the NonWindowsPathFragment subclass will hopefully be smaller than that of the current PathFragment). This also lets us pursue gc churn optimizations. We can now do interning in PathFragment#create and can also get rid of unnecessary intermediate PathFragment allocations. RELNOTES: None PiperOrigin-RevId: 152145768
* A partial, manual rollback of commit 7af14dfdbd6addb779226c0a103b2a8dc72c16b1.Gravatar Lukacs Berki2017-03-14
| | | | | | | | This became necessary because extra actions for C++ compile actions require .h files, but the compiler only returns the .pcm files in the .d file for headers that it reads from the .pcm file. This is not a problem for correctness because the .pcm files depend on the headers, but that doesn't help the extra actions that would then only get the .pcm files. -- PiperOrigin-RevId: 150052839 MOS_MIGRATED_REVID=150052839
* Remove all the action resource estimation codeGravatar Ulf Adams2017-03-06
| | | | | | -- PiperOrigin-RevId: 149110466 MOS_MIGRATED_REVID=149110466
* Fixes issue with ObjcCompileAction where extra action funcitonality is unableGravatar Googler2017-02-27
| | | | | | | | to generate extra action proto file. -- PiperOrigin-RevId: 148479293 MOS_MIGRATED_REVID=148479293
* Introduce CppCompileActionTemplate, which expands into a list of ↵Gravatar Rumou Duan2017-02-10
| | | | | | | | CppCompileActions that to be executed at execution time. -- PiperOrigin-RevId: 147163077 MOS_MIGRATED_REVID=147163077
* Fix action key computation for ParameterFileWriteAction.Gravatar Tobias Werth2017-02-06
| | | | | | | | It did not take the type (shell_quoted vs unquoted) into account and thus did not redo the action if only the type has changed. -- PiperOrigin-RevId: 146670962 MOS_MIGRATED_REVID=146670962
* proto_library: saner descriptor setsGravatar Carmi Grushko2017-02-02
| | | | | | | | | | | | | 1. proto_library exposes a direct descriptor set (built from its 'srcs') and a nested set of transitive descriptor (from all of its dependencies). 2. Alias libraries (=no 'srcs') produce empty files as their descriptor sets. 3. The direct descriptor set depends on the transitive ones, ensuring that building a top-most proto validates all of its dependencies are also valid protos. 4. The wire format of protos allows to concatenate the outputs to get a valid serialized proto that contains all of the descriptor sets in the proto tree. RELNOTES: proto_library: alias libraries produce empty files for descriptor sets. -- PiperOrigin-RevId: 146300520 MOS_MIGRATED_REVID=146300520
* Simplify the Spawn interfaceGravatar Ulf Adams2017-02-01
| | | | | | | | | | | | | | | | | | | | | | | | Remove getSpawnInfo and asShellCommand, which are never really overridden in a useful way. asShellCommand moves to the Spawns class, and getSpawnInfo is only ever called by SpawnAction, and the implementation moves there. I'm considering using Spawn as the general lower-level abstraction for both local and remote execution. It sort of is that already, except it's not used consistently - we often pass a tuple of (args, env) plus possibly input and output files through parameter-heavy method call hierarchies instead of using this existing abstraction. However, I'm concerned about the amount of baggage it's carrying as well as the number of implementations for what is supposed to be a simple interface (or possibly even a simple value class), and this is an attempt to slim it down a bit. This should have no visible effects on builds. -- PiperOrigin-RevId: 146109838 MOS_MIGRATED_REVID=146109838
* Switch to RunfilesSuppliers for communicating runfilesGravatar Michajlo Matijkiw2017-01-30
| | | | | | | | | | | | | | | | | | | | | | | ActionSpawn/SpawnAction now deal exclusively in RunfilesSuppliers, manifests maps are no more. There is some lingering awkwardness, in particular: - Manifests still need to be tracked in some places, we can work out if this is still necessary on a case by case basis. - Skylark makes actions' runfiles available via 'resolve_command' where they are consumed by 'action'. I've updated the documentation, though the name isn't entirely accurate anymore. That being said these interfaces _are_ marked as experimental, so we _should_ be able to be flexible here. Overall, I think the benefits consolidating runfiles into suppliers, from both code cleanliness and performance perspectives (no longer needing to parse manifests), outweights the awkwardnesses. RELNOTES: resolve_command/action's input_manifest return/parameter is now list -- PiperOrigin-RevId: 145817429 MOS_MIGRATED_REVID=145817429
* Minimize SpawnAction constructor exposureGravatar Michajlo Matijkiw2017-01-23
| | | | | | | | One's unused, the other is ok as protected. -- PiperOrigin-RevId: 145291062 MOS_MIGRATED_REVID=145291062
* Change SpawnAction members back to privateGravatar Googler2017-01-20
| | | | | | | | | | | As pointed out in the new review comments on commit df726eae7b6ef11df3b962d720df36f63d5cd3a3, the SpawnAction members did not need to be changed from private to protected, they just needed to be accessed via accessor methods in the derived LTOBackendAction class. -- PiperOrigin-RevId: 144989490 MOS_MIGRATED_REVID=144989490
* Move ExecutionInfoSpecifier to lib.actionsGravatar Ulf Adams2017-01-09
| | | | | | | | | We were previously jumping through hoops to avoid cyclic dependencies. It's unclear why the class was here in the first place rather than in lib.actions. -- PiperOrigin-RevId: 143948959 MOS_MIGRATED_REVID=143948959
* Update call sites to FileWriteAction to use the ↵Gravatar Jon Brandvein2016-12-20
| | | | | | | | | | --experimental_transparent_compression flag Also add test to ensure lazy strings aren't forced. -- PiperOrigin-RevId: 142496520 MOS_MIGRATED_REVID=142496520
* Cleanup FileWriteAction and add a flag that will guard transparent compressionGravatar Jon Brandvein2016-12-20
| | | | | | | | This clarifies documentation, renames or rearranges constructors, and defines a BuildConfiguration option that will be made to control transparent compression in a follow-up CL. The follow-up updates call sites to use the new create() factory method. -- PiperOrigin-RevId: 142491333 MOS_MIGRATED_REVID=142491333
* Transparently compress any FileWriteAction strings of > 256 length.Gravatar Googler2016-12-08
| | | | | | | | This should save on heap space for actions with long strings. -- PiperOrigin-RevId: 141440705 MOS_MIGRATED_REVID=141440705
* Minor fix to SpawnAction.BuilderGravatar Jon Brandvein2016-11-29
| | | | | | | useDefaultShellEnvironment is exclusive with clientEnvironmentVariables. -- MOS_MIGRATED_REVID=140366745
* Move some actions to language-specific packages, where they belong.Gravatar Lukacs Berki2016-11-23
| | | | | -- MOS_MIGRATED_REVID=140024976
* ObjcCompileAction does not signal to skyframe that it discovers inputs.Gravatar Cal Peyser2016-11-17
| | | | | | | | | | | Instead, it skips discovery (include scanning), but provides all headers to action execution to allow for re-adding pruned sources in a sandbox. This means that mis-capitalization errors will only break a build if --objc_use_dotd_pruning is one. -- MOS_MIGRATED_REVID=139456194
* Description redacted.Gravatar Cal Peyser2016-11-16
| | | | | -- MOS_MIGRATED_REVID=139219934
* ObjcCompileAction provides all headers to sandboxed execution. This allowsGravatar Cal Peyser2016-11-11
| | | | | | | headers pruned by .d pruning to be re-added if they are changed. -- MOS_MIGRATED_REVID=138866385
* For SpawnActions, also honor the dynamic environmentGravatar Klaus Aehlig2016-11-07
| | | | | | | | | | | | | For SpawnActions, depending on the value of use_default_shell_env, the specified environment is taken. The shell environment, however, consists of two parts: a static mapping of variables to values, and a set of variables where the value is to be taken from the client environment. Make sure, both parts are set correctly. Fixes #2035. -- Change-Id: I32253e9bf651b18ca25107edc5fc839813905726 Reviewed-on: https://bazel-review.googlesource.com/#/c/7211 MOS_MIGRATED_REVID=138376914
* Rollback, breaks dependent code.Gravatar Jon Brandvein2016-11-02
| | | | | -- MOS_MIGRATED_REVID=137864618
* ObjcCompileAction provides all headers to sandboxed execution. This allowsGravatar Cal Peyser2016-10-31
| | | | | | | headers pruned by .d pruning to be re-added if they are changed. -- MOS_MIGRATED_REVID=137697323
* [Roll-forward] Rollback of commit dd299dbc61be51112534a4698f7cf2deee43053b.Gravatar Jon Brandvein2016-10-12
| | | | | | | | | | | | | | | | | | | | | | | *** Reason for rollback *** Fixed underlying broken CL that was depended on *** Original change description *** Automated [] rollback of commit e025939e71b179ae0f6bd09ef3af474f49b853a2. *** Reason for rollback *** Depends on commit 9c25afe750a937b2152c21a93effc8b9ba82c27b, which needs to be rolled back. *** Original change description *** Add API for individual actions This exposes action inputs, outputs, argv, content, and substitutions (if applicable). -- MOS_MIGRATED_REVID=135821603
* Rollback of commit e025939e71b179ae0f6bd09ef3af474f49b853a2.Gravatar Ulf Adams2016-10-11
| | | | | | | | | | | | | | | *** Reason for rollback *** Depends on commit 9c25afe750a937b2152c21a93effc8b9ba82c27b, which needs to be rolled back. *** Original change description *** Add API for individual actions This exposes action inputs, outputs, argv, content, and substitutions (if applicable). -- MOS_MIGRATED_REVID=135783964
* Add API for individual actionsGravatar Jon Brandvein2016-10-05
| | | | | | | This exposes action inputs, outputs, argv, content, and substitutions (if applicable). -- MOS_MIGRATED_REVID=135226123
* cc_inc_library deletes its output directory before execution.Gravatar Janak Ramakrishnan2016-10-04
| | | | | | | | | | | | This ensures that stale outputs from prior builds do not remain to confuse the compiler. Fixes #1778. -- Change-Id: I31b5c3e7e5970cf45c3ff10144ddfc73540ef9af Reviewed-on: https://bazel-review.googlesource.com/6250 MOS_MIGRATED_REVID=134780501
* Implement input pruning using .d files in objc behind a flag that defaults toGravatar Cal Peyser2016-09-28
| | | | | | | false. -- MOS_MIGRATED_REVID=134452391
* Rollback of commit 4946ab9d5b5d78862c043e35342107a1b9b2f398.Gravatar Cal Peyser2016-09-23
| | | | | | | | | | | | | *** Reason for rollback *** We *still* have case discrepancies in objc code, which appears to be a hard blocker to .d pruning. This change will not work until we've found some way to enforce case-consistency. *** Original change description *** Implement input pruning using .d files in objc. -- MOS_MIGRATED_REVID=134069949
* Implement input pruning using .d files in objc.Gravatar Cal Peyser2016-09-22
| | | | | -- MOS_MIGRATED_REVID=133944059
* Replace BuildConfiguration.Fragment#collectExecutables() with a ↵Gravatar Lukacs Berki2016-09-22
| | | | | | | | | #getShellExecutable() method. That's all it was used for anyway. -- MOS_MIGRATED_REVID=133824769
* Add flag --nosandbox/--no_sandbox/--no-sandbox to disable sandbox.Gravatar Yue Gan2016-09-21
| | | | | -- MOS_MIGRATED_REVID=133697962
* Rollback of commit a85bf4b19c680a6db11f21758847dc88ec0aa658.Gravatar Cal Peyser2016-09-16
| | | | | | | | | | | | | *** Reason for rollback *** Breaks Bigtop incremental build *** Original change description *** Implement input pruning using .d files in objc. -- MOS_MIGRATED_REVID=133271059
* Store contents of FileWriteActions as UTF-8 bytes rather than java.lang.String.Gravatar Googler2016-09-15
| | | | | -- MOS_MIGRATED_REVID=133253857
* Make sure to always use a parameter file when building Java deploy jars with ↵Gravatar Philipp Wollermann2016-09-09
| | | | | | | | | | | SingleJar. Otherwise the WorkerSpawnStrategy (which requires the action to use a parameter file) will fail to execute JavaDeployJar Spawn actions when its CommandLine decides not to use a parameter file, because the arguments are short enough. Also adds a convenience method SpawnAction#getArgumentsFromParamFile() for use in tests, because I needed it here to fix up the deploy jar tests. -- MOS_MIGRATED_REVID=132557693
* Implement input pruning using .d files in objc.Gravatar Cal Peyser2016-09-09
| | | | | -- MOS_MIGRATED_REVID=132550233
* Rollback of commit 4689c5d1d2faf902846b100b8d858d172a0ceb3d.Gravatar Cal Peyser2016-09-06
| | | | | | | | | | | | | *** Reason for rollback *** Prunes .modulemap files incorrectly. See []. *** Original change description *** Implement input pruning using .d files in objc. -- MOS_MIGRATED_REVID=132246906
* Implement input pruning using .d files in objc.Gravatar Cal Peyser2016-09-06
| | | | | -- MOS_MIGRATED_REVID=132061988
* Description redacted.Gravatar Cal Peyser2016-09-02
| | | | | -- MOS_MIGRATED_REVID=131990160
* Implement input pruning using .d files in objc.Gravatar Cal Peyser2016-09-02
| | | | | -- MOS_MIGRATED_REVID=131951535
* Make SpawnActions honor the client environmentGravatar Klaus Aehlig2016-08-26
| | | | | | | | | | | | | | | ...for the variables that supposed to be inherited from it. Note That with this patch, we take the correct variables, but do not yet track the dependency on changes to the client environment; this will happen in a follow up patches. Also add a test that demonstrates that the client environment rather than that at startup is taken. -- Change-Id: I4d33efa8eaf4f8b689c9b7f2130f71309f3343f0 Reviewed-on: https://bazel-review.googlesource.com/#/c/5392 MOS_MIGRATED_REVID=131406356
* Action#discoverInputs returns an Iterable<Artifact> instead of aGravatar Cal Peyser2016-08-25
| | | | | | | Collection<Artifact> -- MOS_MIGRATED_REVID=131285541