| Commit message (Collapse) | Author | Age |
|
|
|
|
|
|
| |
can also be called by getInputFilesForExtraAction rather than duplicating the logic.
RELNOTES: None
PiperOrigin-RevId: 185757663
|
|
|
|
| |
PiperOrigin-RevId: 185733313
|
|
|
|
|
|
| |
based on feature configuration
PiperOrigin-RevId: 185600940
|
|
|
|
|
|
| |
(Des|S)erializationContext.
PiperOrigin-RevId: 185547740
|
|
|
|
|
|
| |
Previously, RuleContext was referenced via the objc implementation of CppSemantics. Objects of that class are no longer held by CppCompileAction post-analysis.
PiperOrigin-RevId: 185446320
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Prior to this cl CompileCommandLine would (almost) unconditionally emit -c and
-o flags. This cl removes this logic and relies on crosstool to emit these
flags. This is another small step towards platform independent C++ rules.
Memory use is not affected, since the build variables used by this cl are already
exposed, this cl just forces crosstools to use it.
Encore of https://github.com/bazelbuild/bazel/commit/f26e8694ae78599b3e2004e3360eaf3443fa53a6.
RELNOTES: None.
PiperOrigin-RevId: 184981106
|
|
|
|
|
|
| |
Rename IncludeScanningContext to CppIncludeExtractionContext, which more closely matches its semantics.
PiperOrigin-RevId: 184974810
|
|
|
|
|
|
|
|
| |
CcToolchainFeatures.Variables.
We rephrase the nocopts filter from a Predicate<String> to a custom class, since AutoCodec cannot serialize a Predicate.
PiperOrigin-RevId: 184902162
|
|
|
|
|
|
|
|
| |
required in order to serialize CppCompileAction.
Rephrase CppCompilationContext's pregreppedHeaders field as its own value class instead of Pair<Artifact, Artifact>. We do this because NestedSet support in AutoCodec cannot serialize a NestedSet of a generic type.
PiperOrigin-RevId: 184740075
|
|
|
|
|
|
| |
CppCompileAction smaller improves serialization.
PiperOrigin-RevId: 183871454
|
|
|
|
|
|
| |
It always set to the same value.
PiperOrigin-RevId: 183843518
|
|
|
|
|
|
|
|
|
|
|
| |
TBD: finish pulling out CLIF logic from the C++ rules implementation. This involves refactoring ArtifactCategory and CppSource.Type.
CLIF does PIC compilation now. This detail should be irrelevant to users since CLIF only cares about the matched protobuf output file.
SKIP_KOKORO=flakes
RELNOTES:none
PiperOrigin-RevId: 183396902
|
|
|
|
|
|
| |
If actions are executed locally, silently fall back to reading the on-disk .d file.
PiperOrigin-RevId: 183376432
|
|
|
|
|
|
|
|
| |
This interface makes it clearer in the type system exactly how items that go into a CustomCommandLine are turned into strings.
It is a preparatory change to allow command line fingerprints to be more cheaply calculated, but it is valuable in itself from a code quality standpoint.
PiperOrigin-RevId: 183274022
|
|
|
|
|
|
|
| |
An upcoming replacement to PathFragment will not have efficient segment semantics, causing code to become unnecessarily inefficient.
RELNOTES: None
PiperOrigin-RevId: 182553098
|
|
|
|
|
|
|
|
|
|
|
| |
This class represents a root (such as a package path or an output root) used for file lookups and artifacts. It is meant to be as opaque as possible in order to hide the user's environment from sky keys and sky functions.
Roots are used by RootedPaths and ArtifactRoots.
This CL attempts to make the minimum number of modifications necessary to change RootedPath and ArtifactRoot to use these fields. Deprecated methods and invasive accessors are permitted to minimise the risk of any observable changes.
RELNOTES: None
PiperOrigin-RevId: 182271759
|
|
|
|
|
|
|
| |
can be attached to C++ compile actions without tickling the bug that makes Blaze crash when extra actions are attached to shared actions that do input discovery.
RELNOTES: None.
PiperOrigin-RevId: 182044169
|
|
|
|
|
|
| |
removing the layer of indirection of getting SkyKey out of ActionLookupKey, which uses more memory for no reason.
PiperOrigin-RevId: 181658615
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Change FileType to no longer assume it operates on just the base name (it can now be given a full path).
* Move the responsibility to specific classes (Artifact, Path, PathFragment) to decide how they want to offer up a string that includes the file name.
* Flip the order in which users are expected to check Artifact type, from FileType#matches(Artifact) to Artifact#isFileType(FileType). This looks natural and should encourage developers to use efficient file type checking methods.
* Change CppCompileAction to use the new API.
RELNOTES: None
PiperOrigin-RevId: 179903239
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
*** Reason for rollback ***
Rollforward of https://github.com/bazelbuild/bazel/commit/c861c0afd9a4df283936218b9e5b33c452b07c95 after fixing fake link actions.
*** Original change description ***
Rollback of 178106899.
RELNOTES: Linkstamping is now a separate and full-blown CppCompileAction, it's
no longer a part of linking command.
PiperOrigin-RevId: 178760072
|
|
|
|
| |
PiperOrigin-RevId: 178384991
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This cl replaces entire hardcoded linkstamping command line generation with a
separate action. Instead of generating bash command
to compile linkstamp and prepending it to the standard link command line, this
cl creates a special action that link action depends on.
I kept linkstamp action registration in the CppLinkActionBuilder (and
GoCompilationHelper internally) to keep the cl shorter and change more
localized. I also didn't remove linkstamps and buildInfoHeaderArtifacts from
CppLinkAction to stay compatible with extra actions api. Both issues and
corresponding cleanups will be addressed in separate cls.
RELNOTES: Linkstamping is now a separate and full-blown CppCompileAction, it's
no longer a part of linking command.
PiperOrigin-RevId: 178106899
|
|
|
|
|
|
|
| |
This key context can be used by actions to share partial key computations, for instance when computing MD5s for nested sets.
RELNOTES: None
PiperOrigin-RevId: 177359607
|
|
|
|
|
| |
RELNOTES: None.
PiperOrigin-RevId: 177326265
|
|
|
|
|
|
|
|
|
| |
Currently we don't care about the list order of SpawnResults. However, we may care about the list order later. Also, if the equals() method for SpawnResults is ever changed then it may be problematic to return SpawnResults in a Set.
Aside: ActionResults use SpawnResults to calculate cumulative execution times for Actions, and may provide other metrics in future.
RELNOTES: None.
PiperOrigin-RevId: 176579460
|
|
|
|
|
|
|
|
| |
Blaze had its own class to avoid GC from varargs array creation for the precondition happy path. Guava now (mostly) implements these, making it unnecessary to maintain our own.
This change was almost entirely automated by search-and-replace. A few BUILD files needed fixing up since I removed an export of preconditions from lib:util, which was all done by add_deps. There was one incorrect usage of Preconditions that was caught by error prone (which checks Guava's version of Preconditions) that I had to change manually.
PiperOrigin-RevId: 175033526
|
|
|
|
|
|
| |
This requires a fairly large amount of changes to fundamental objects like BlazeRuntime, Executor, and so on, as well as changing a lot of test code to thread the file system through. I expect future CLs to be much smaller.
PiperOrigin-RevId: 173678144
|
|
|
|
|
|
|
| |
(possibly empty) set of SpawnResults created during execution of the Action.
RELNOTES: None.
PiperOrigin-RevId: 172529328
|
|
|
|
|
|
| |
CppConfiguration#getLdExecutable to CcToolchainProvider.
PiperOrigin-RevId: 171818406
|
|
|
|
|
|
|
|
|
| |
ActionContexts, etc., so that SpawnResult metadata is returned upwards.
Note that the TODOs mostly refer to changes that will appear in a subsequent CL (a CL to return SpawnResults, contained in ActionResults, from Actions/AbstractActions). I split off the remaining SpawnResult-related changes into this CL and kept the ActionResult-related changes separate.
RELNOTES: None.
PiperOrigin-RevId: 171355611
|
|
|
|
|
|
|
|
|
| |
Before, linkstamping compile actions were hardcoded in bazel and assumed
gcc/clang and bash. This cl removes gcc/clang assumptions by using feature
configuration.
RELNOTES: None.
PiperOrigin-RevId: 169685949
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
*** Reason for rollback ***
Breaks clang_tidy.
*** Original change description ***
Introduce -c source_file -o output_file build variables
Prior to this cl CompileCommandLine would (almost) unconditionally emit -c and
-o flags. This cl removes this logic and relies on crosstool to emit these
flags. This is another small step towards platform independent C++ rules.
Memory use is not affected, since the build variables used by this cl are already
exposed, this cl just forces crosstools to use it.
RELNOTES: None.
PiperOrigin-RevId: 168834576
|
|
|
|
|
|
|
|
|
|
|
|
| |
Prior to this cl CompileCommandLine would (almost) unconditionally emit -c and
-o flags. This cl removes this logic and relies on crosstool to emit these
flags. This is another small step towards platform independent C++ rules.
Memory use is not affected, since the build variables used by this cl are already
exposed, this cl just forces crosstools to use it.
RELNOTES: None.
PiperOrigin-RevId: 168671507
|
|
|
|
|
|
|
|
|
| |
This cl removes hardcoded --sysroot flag generation from bazel when constructing
command line for C++ actions. The hardcoded flag is still exposed to Skylark (to
stay backwards compatible).
RELNOTES: None.
PiperOrigin-RevId: 168346711
|
|
|
|
|
|
|
|
|
| |
This cl adds flags from --per_file_copts option to 'user_compile_flags' build
variable. This changes the flag order, before they appeared after unfiltered
flags, now they appear before.
RELNOTES: None.
PiperOrigin-RevId: 168221663
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
*** Reason for rollback ***
Introduced a UI regression.
See #3534.
*** Original change description ***
Avoid relying on System.out/err going to the terminal
Use an appropriate EventHandler instead.
PiperOrigin-RevId: 168218216
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
user_compile_flags
Also add magic to a feature named 'unfiltered_compile_flags' so the flags
expanded from it are not subject to nocopt filtering.
This is encore of https://github.com/bazelbuild/bazel/commit/268c0bcbf79f9f3f72d95fa51af0f1b18c5ce29e that was rolled back because it regressed
memory.
RELNOTES: None.
PiperOrigin-RevId: 167989075
|
|
|
|
| |
PiperOrigin-RevId: 167751263
|
|
|
|
|
|
|
|
|
|
| |
user_compile_flags
Also add magic to a feature named 'unfiltered_compile_flags' so the flags
expanded from it are not subject to nocopt filtering.
RELNOTES: None.
PiperOrigin-RevId: 167587189
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This paves the way for Skylark-side compact command lines that can fail during expansion.
In general, expansion happens in these scenarios:
* Action execution expands the command line to execute it. This is fine since we are well equipped already to handle failing actions.
* In the analysis phase we expand command lines to investigate whether we need a params file. This could be moved to the execution phase, which would have the benefit of getting params files out of the action graph and saving memory.
* Key computation expands the command line. This could be fixed by allowing command lines to compute their own keys (which wouldn't try to expand the command line). This could have the benefit of being more efficient.
* Extra actions expand the command line to construct the extra action proto. This could maybe be deferred to the execution phase (writing the extra action), which would also be more memory efficient.
For failed key computations, we return a singleton "error" key. This means multiple actions that will fail will map to the same key. These actions will necessarily fail if executed, so we should not need to worry about these ending up in the action cache. If we do manage to make the command line compute its own keys then this will become moot in the future.
RELNOTES: None
PiperOrigin-RevId: 166266385
|
|
|
|
|
|
|
|
|
|
| |
This cl introduces new action_config named 'strip' for the strip action. While
at it, it fixes support for executionRequirements.
Fixed #209
RELNOTES: 'strip' action is now configured via feature configuration
PiperOrigin-RevId: 164110478
|
|
|
|
|
|
|
|
|
|
|
| |
This cl changes copts to be immutable (and changes addCopts methods into
setCopts, so it's simpler to reason about copts) and exposes copts as a build
variable. It also introduces CompileBuildVariablesTest, similar to
LinkBuildVariablesTest, to test that right build variables are exposed for right
actions.
RELNOTES: None.
PiperOrigin-RevId: 163876774
|
|
|
|
|
|
| |
Use an appropriate EventHandler instead.
PiperOrigin-RevId: 161189061
|
|
|
|
|
|
|
| |
Move everything to ActionExecutionContext, and drop Executor whereever possible.
This clarifies the API, makes it simpler to test, and simplifies the code.
PiperOrigin-RevId: 159414816
|
|
|
|
|
|
|
|
|
|
| |
On Windows, cl.exe generates include information to stdout.
But when using the cuda compiler(nvcc.exe) to invoke cl.exe,
it's redirected to stderr.
So we need to parse the output of stderr as well.
Change-Id: I9a763a6eefa531932bf1077ef4155f6bda934240
PiperOrigin-RevId: 158842448
|
|
|
|
|
| |
RELNOTES: NONE.
PiperOrigin-RevId: 158703123
|
|
|
|
|
|
|
|
|
| |
It was previously the odd-one out in lib.analysis.actions, due to other code
that wanted to depend on it without pulling in all of analysis. However, it's
needed to interpret Spawn instances, and Spawn lives in lib.actions, so it
makes more sense to move it there, and remove the special-casing.
PiperOrigin-RevId: 158116684
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This cl introduces new action_config type for Crosstool named 'generic'. This
can be used to set the value of CC_FLAGS make variable using much more
expressive mechanism (action_configs + features) than previous make_variable
Crosstool messages. This has been requested by the C++ LPT.
However, as FeatureConfiguration needs RuleContext, CC_FLAGS cannot be
computed using configuration only anymore. Also, FeatureConfiguration is C++
rules specific class, and Bazel build-base cannot depend on it. Therefore we
cannot use FeatureConfiguration for ExtraActions, for example. Because it cannot
be made perfect, this cl is not updating all the possible places that expand
make variables but limits the scope to:
* genrule (the only widely used rule that often expands make variables)
* *_test (CC_FLAGS is used by Tensorflow in the 'args' attribute)
* cc_rules (people sometimes set 'copts' to something like:
"-DCC_STRING=\\\"$(CC)\\\" -DCC_FLAGS_STRING=\"$(CC_FLAGS)\""
The long term plan is to use Skylark C++ API to get C++ command lines, so
CC_FLAGS together with this inconsistent solution will be removed.
RELNOTES: CC_FLAGS can be defined using 'generic' action_config in CROSSTOOL
PiperOrigin-RevId: 157202883
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
*** Reason for rollback ***
Fixes memory issue that caused this CL to be rolled back.
*** Original change description ***
Automated g4 rollback of commit cbbb423663b154d82e3dfa5e9a56839583987999.
*** Reason for rollback ***
Need to roll this back as part of http://b/38171368
*** Original change description ***
RELNOTES: Effectively remove sysroot from CppConfiguration and allow it to use select statements.
PiperOrigin-RevId: 155651879
|
|
|
|
|
|
|
|
|
|
|
| |
*** Reason for rollback ***
Need to roll this back as part of http://b/38171368
*** Original change description ***
RELNOTES: Effectively remove sysroot from CppConfiguration and allow it to use select statements.
PiperOrigin-RevId: 155547813
|