| Commit message (Collapse) | Author | Age |
|
|
|
|
| |
RELNOTES: None.
PiperOrigin-RevId: 157450873
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
| |
And while at it cleanup all the calls of CppHelper.getToolchain and
CppHelper.getFdoSupport.
RELNOTES: None.
PiperOrigin-RevId: 156716291
|
|
|
|
|
|
| |
*** Reason for rollback ***
PiperOrigin-RevId: 154776438
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
*** 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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
| |
":cc_toolchain" in RuleContext, instead take the provider from users and pass it around to where it is used.
This gives J2ObjcAspect the ability to specify the C++ toolchain attribute under a different name to avoid attribute conflicts with attached rules that have already declared attribute ":cc_toolchain".
--
PiperOrigin-RevId: 147358325
MOS_MIGRATED_REVID=147358325
|
|
|
|
|
|
|
|
|
|
| |
":cc_toolchain" in RuleContext, instead take the provider from users and pass it around to where it is used.
This gives J2ObjcAspect the ability to specify the C++ toolchain attribute under a different name to avoid attribute conflicts with attached rules that have already declared attribute ":cc_toolchain".
--
PiperOrigin-RevId: 146920294
MOS_MIGRATED_REVID=146920294
|
|
|
|
|
|
|
|
|
| |
This enables us to configure default features for each toolchain without having
to hard-code anything in class such as CcCommon.
--
PiperOrigin-RevId: 146904287
MOS_MIGRATED_REVID=146904287
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
flag, the headers of a target are compiled into a C++ module instead of being
parsed as their own translation unit. The module otherwise remains unused.
This way, parse_headers can be used to get a codebase ready for C++ modules.
parse_headers currently already gets close, but there are still ways in which a
header can be modules-incompatible although it parses fine.
--
PiperOrigin-RevId: 145729231
MOS_MIGRATED_REVID=145729231
|
|
|
|
|
|
| |
--
PiperOrigin-RevId: 145091484
MOS_MIGRATED_REVID=145091484
|
|
|
|
|
|
|
|
|
|
|
|
| |
action. This removes flattening of nested sets (for the transitive/top-level
header modules) in the analysis phase making it about 10% faster. Also remove
the calculation of top-level modules entirely as it doesn't seem to be
necessary and doing it might actually lead to unexpected results when actions
are restored from cache and thus the module input flags are computed from the
actually used inputs (determined from .d files).
--
MOS_MIGRATED_REVID=140738461
|
|
|
|
|
| |
--
MOS_MIGRATED_REVID=140613176
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
*** 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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
| |
Chipping away at making the big CL for #1262 smaller. Only runfiles paths
are different right now, so this makes getPathUnderExecRoot and getSourceRoot
return the same thing. Also corrected a couple places where
Label.EXTERNAL_PATH_PREFIX and Label.EXTERNAL_PACKAGE_NAME were being used
incorrectly.
--
MOS_MIGRATED_REVID=132671081
|
|
|
|
|
|
|
|
|
|
|
| |
warning from Bazel.
This behavior doesn't really make sense except within Google.
Fixes #1286.
--
MOS_MIGRATED_REVID=131813322
|
|
|
|
|
|
|
| |
Basically, take the set of headers found by #include scanning and check what modules they are coming from. If a module provides at least one of the required headers, it is required as are all of its dependent modules (because of the way modules are implemented). Only use the actually required modules as compilation inputs and as flags handed in on the command line. Also move the logic to calculate top-level modules from the analysis phase into the execution phase. In the long run, we might be able to completely remove this logic now, but for now, we want to be able to quickly switch between the old and the new behavior. Thus, pruning of modules is now guarded on a feature prune_module_headers.
--
MOS_MIGRATED_REVID=131058820
|
|
|
|
|
|
|
| |
called at places where a CcToolchainProvider is near so that we can use information in it to infer how each input file is linked.
--
MOS_MIGRATED_REVID=129729628
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
execroot change
This is in prep for making the execution root path for external repositories
../repo_name (instead of external/repo_name). Right now, the getRunfilesPath() returns that path, so that is renamed getExecRoot() (since the runfiles are really just a reflection of the execRoot structure). getSourceRoot() replaces getPathFragment, which has always been a confusing name (it's not clear from the name
what the difference is between it and getPackageFragment()). It returns the relative path to source files for external repositories (external/repo_name).
Also renamed/moved to more sensible class a few static RepositoryName fields.
--
MOS_MIGRATED_REVID=128594419
|
|
|
|
|
|
|
| |
the transitive closure instead of having a global environment in the configuration.
--
MOS_MIGRATED_REVID=128559756
|
|
|
|
|
|
|
|
|
|
|
| |
ThinLTO isn't fully supported for host builds, in order to handle this add
support for enabling either a 'host' or 'target' feature in the configuration.
The thin_lto feature will require the new 'target' configuration.
Companion crosstool change: unknown commit.
--
MOS_MIGRATED_REVID=127350506
|
|
|
|
|
|
|
|
|
| |
Previously we used labels in each configuration fragment that then got added to every test action. Instead, we now have a filegroup under //tools/test for coverage files that truly need to be on the inputs of every test action and collect language-specific support files in InstrumentedFilesProvider.
This makes configuration creation simpler and makes it possible to turn --crosstool_top into something else other than a filegroup (previously, it was that filegroup that got added to every test action)
--
MOS_MIGRATED_REVID=126170241
|
|
|
|
|
| |
--
MOS_MIGRATED_REVID=125160288
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
| |
*** Reason for rollback ***
--
MOS_MIGRATED_REVID=124553522
|
|
|
|
|
|
|
| |
*** Reason for rollback ***
--
MOS_MIGRATED_REVID=124549894
|
|
|
|
|
| |
--
MOS_MIGRATED_REVID=124355936
|
|
|
|
|
|
|
|
|
| |
Also moved -S and -E options into the same action_config.
Since whoever consume CppCompileInfo add -c and -o options by themselves, to
keep compatible with this, the original code is still kept and used, until the corresponding flag sets are added into CROSSTOOL.
--
MOS_MIGRATED_REVID=124350905
|
|
|
|
|
|
|
| |
RELNOTES: The --ues_isystem_for_includes command line option is not supported anymore.
--
MOS_MIGRATED_REVID=123617061
|
|
|
|
|
|
|
|
|
| |
to it.
A side effect is that this made --save_temps (probably) work with --use_fission . Previously, the DWO file was also an output of the temps actions.
--
MOS_MIGRATED_REVID=123117200
|
|
|
|
|
|
|
|
|
| |
One more thing that doesn't work on Windows is gone.
As a drive-by fix, also remove usePic from CppCompileAction since it's not needed anymore.
--
MOS_MIGRATED_REVID=123099120
|
|
|
|
|
|
|
|
|
|
|
|
| |
This required a few assorted changes:
- The FDO build stamp is not special-cased anymore, it is treated as a preprocessor define like any other.
- When compiling a .pcm file, use interfaceContext instead of the regular context when setting up the build variables. This is a bit more consistent and would be a good cause for a future bug.
This is a retry of commit 7841a6ab100fc35a67600f1ce1a70d293c51350e, which made some bold changes to LIPO that didn't work out well.
--
MOS_MIGRATED_REVID=122829825
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
*** Reason for rollback ***
breaks []
*** Original change description ***
Move the command line arguments for C++ preprocessor defines to a feature.
This required a few assorted changes:
- The LIPO compilation context is not merged anymore. Include paths for auxiliary files are apparently taken from the profile files, so it is not necessary.
- The FDO build stamp is not special-cased anymore, it is treated as a preprocessor define like any other.
- When compiling a .pcm file, use interfaceContext instead of the regular context when setting up the build variables. Th...
***
--
MOS_MIGRATED_REVID=122823591
|
|
|
|
|
|
|
|
|
|
|
| |
This required a few assorted changes:
- The LIPO compilation context is not merged anymore. Include paths for auxiliary files are apparently taken from the profile files, so it is not necessary.
- The FDO build stamp is not special-cased anymore, it is treated as a preprocessor define like any other.
- When compiling a .pcm file, use interfaceContext instead of the regular context when setting up the build variables. This is a bit more consistent and would be a good cause for a future bug.
--
MOS_MIGRATED_REVID=122725179
|
|
|
|
|
|
|
| |
This is a resubmission of commit 45d48bf1fe7503acbbb0c095822b7f8f558881e8. It turns out that we also need -fPIC for *assembler* command line options, because some assembler sources are preprocessed and they can say "#ifdef __PIC__".
--
MOS_MIGRATED_REVID=122626234
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
*** Reason for rollback ***
Breaks //[]/go:all .
*** Original change description ***
Turn the addition of -fPIC to the command line of PIC actions into a feature.
--
MOS_MIGRATED_REVID=122526799
|
|
|
|
|
| |
--
MOS_MIGRATED_REVID=122498464
|
|
|
|
|
|
|
| |
default). Action configs can imply features.
--
MOS_MIGRATED_REVID=122032003
|
|
|
|
|
|
|
| |
Except in action execution logic (ActionExecutionFunction, SkyframeActionExecutor, etc.), switch Action interface references to either ActionAnalysisMetadata if possible or ActionExecutionMetadata.
--
MOS_MIGRATED_REVID=120723431
|
|
|
|
|
|
|
|
| |
The method will be removed in a subsequent change to facilitate reverting the
change in case it goes bad.
--
MOS_MIGRATED_REVID=120526894
|
|
|
|
|
|
|
|
|
| |
packages not in third_party. We don't need to police users' external repositories.
Fixes #1151
--
MOS_MIGRATED_REVID=120222222
|
|
|
|
|
|
|
|
|
| |
cc_* targets, CcLibraryHelper will not process objc source files, which may have been provided accidentally though a filegroup.
Note: This is note intended to prevent illegal sources for cc_* targets - that will be implemented in a different CL. This will involve making changes to filtering occuring in CcCommon, which for now will permit objc source.
--
MOS_MIGRATED_REVID=119897621
|
|
|
|
|
|
|
|
|
| |
third_party.
I'm confused that Bazel has the concept of third_party, but as long as it does, let's exploit it.
--
MOS_MIGRATED_REVID=119779306
|
|
|
|
|
|
|
| |
point to the workspace root.
--
MOS_MIGRATED_REVID=119558172
|
|
|
|
|
|
|
|
|
|
|
| |
SkyFunction.
This removes one of the two reasons for the existence of BuildConfiguration#prepareToBuild() which makes implementing dynamic configurations impossible and also makes FDO support halfway sane; now FDO is exactly as ugly as remote repositories, that is to say, reasonably okay.
Ideally, we'd implement the zip extraction as an Action and make it a TreeArtifact, but support for TreeArtifacts is not mature yet enough, so it's not possible at the moment.
--
MOS_MIGRATED_REVID=119150223
|
|
|
|
|
|
|
| |
action.
--
MOS_MIGRATED_REVID=117915931
|
|
|
|
|
|
|
| |
references that escape its package.
--
MOS_MIGRATED_REVID=117550535
|
|
|
|
|
| |
--
MOS_MIGRATED_REVID=116255991
|