aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/rules/cpp/CppCompileAction.java
Commit message (Collapse)AuthorAge
...
* Disable include scanning for assembler-without-preprocessor source.Gravatar Googler2015-09-28
| | | | | | | | The scanner only looks for C preprocessor directives, but most assemblers allow '.include' assembly directives, and those aren't found by the scanner. So skip the include scanner for assembly files that don't want C preprocessing, because correctly declared inclusions are to be preferred anyway. -- MOS_MIGRATED_REVID=103944189
* 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
* Move Label from the lib.syntax to the lib.cmdline package so that:Gravatar Lukacs Berki2015-09-21
| | | | | | | | | | - Label parsing can be simplified - lib.syntax is only contains the code for Skylark and is reasonably independent from the problem domain of building things This change is mostly only changes to imports declarations. The rest is reversing the dependency between :cmdline and :syntax and moving a tiny amount of code between Printer and FilesetEntry and the addition of SkylarkPrintableValue that I couldn't be bothered to separate out into its own change. -- MOS_MIGRATED_REVID=103527877
* Teach Bazel to accept assembler-without-preprocessor source files.Gravatar Googler2015-09-16
| | | | | | | | | | | Adding the accepted file extensions was a minor issue. The bulk of this change was to weaken the assertion that all cxx compiler actions produce a '.d' file. RELNOTES[NEW]: a cc_binary rule may list '.s' and '.asm' files in the srcs -- MOS_MIGRATED_REVID=103196242
* Rollback of commit a708acd02baf3821c975801ae0e5cad6867a6735.Gravatar Mark Schaller2015-09-08
| | | | | | | *** Reason for rollback *** -- MOS_MIGRATED_REVID=102590114
* Teach Bazel to accept assembler-without-preprocessor source files.Gravatar Googler2015-09-04
| | | | | | | | | | | Adding the accepted file extensions was a minor issue. The bulk of this change was to weaken the assertion that all cxx compiler actions produce a '.d' file. RELNOTES[NEW]: a cc_binary rule may list '.s' and '.asm' files in the srcs -- MOS_MIGRATED_REVID=102346882
* Patch the PATH for linker on Windows, in the same way as for compiler.Gravatar Dmitry Lomov2015-08-12
| | | | | -- MOS_MIGRATED_REVID=100368051
* Convert the coverage flags to use the feature configuration.Gravatar Manuel Klimek2015-08-11
| | | | | -- MOS_MIGRATED_REVID=100281959
* Remove a misleading comment in CppCompileAction (the class is not actually ↵Gravatar Philipp Wollermann2015-07-27
| | | | | | | overriding getInputs()). -- MOS_MIGRATED_REVID=99173247
* Fix order of C++ compiler flags:Gravatar Manuel Klimek2015-07-03
| | | | | | | User-specific flags need to be before system include paths. -- MOS_MIGRATED_REVID=97425471
* Setup FDO command-line options via feature configurations.Gravatar Googler2015-06-25
| | | | | -- MOS_MIGRATED_REVID=96835732
* Handle exceptions encountered resolving packages during the execution phaseGravatar Michajlo Matijkiw2015-06-10
| | | | | | | | | | | | | | Currently we may do lookups of not-already-cached packages during the execution phase for actions that discover inputs. Exceptions encountered during this would go unhandled and result in a crash. Here we introduce PackageRootResolutionException which wraps these exceptions and triggers an ActionExecutionException which is cleanly handled in the exec phase. As part of this change SkyframeActionExecutor#getArtifactRoots(...) will fail properly on errors getting package roots. -- MOS_MIGRATED_REVID=95578891
* Allow absolute system includes if they're builtins.Gravatar Peter Schmitt2015-06-05
| | | | | -- MOS_MIGRATED_REVID=95108839
* Make sure that all system includes that are specified in the CROSSTOOL file ↵Gravatar Janak Ramakrishnan2015-06-03
| | | | | | | are present in CppCompileAction#getSystemIncludeDirs. -- MOS_MIGRATED_REVID=95014774
* Switch to a CROSSTOOL feature for include flags.Gravatar Brian Silverman2015-05-18
| | | | | | | | | | | | | | | | | | This allows supporting compilers which don't understand -iquote. It looks like support for -iquote was released in GCC 4.0 (https://gcc.gnu.org/gcc-4.0/changes.html). GCC 3.3.2 definitely does not have support. Here's what the error looks like when you try to use an older GCC without this change: cc1plus: error: unrecognized option `-iquote.' cc1plus: error: unrecognized option ` -iquotebazel-out/powerpc-603e-fastbuild/genfiles' -- Change-Id: Ibf3b74d058a741e23da51963b39ad7505c507d57 Reviewed-on: https://bazel-review.googlesource.com/#/c/1263/ MOS_MIGRATED_REVID=93888319
* Fix multiple issues with extra actions and input-discovering actions:Gravatar Janak Ramakrishnan2015-04-28
| | | | | | | | 1. Race condition where extra action updates action's inputs while action is updating its own inputs. 2. Action was being updated with all inputs, including the extra action's ones, on a cache hit. -- MOS_MIGRATED_REVID=92264706
* Use Artifacts instead of Paths in the pregrepped files map.Gravatar Janak Ramakrishnan2015-04-14
| | | | | | | We already have them as artifacts, so it's less work, and this facilitates Skyframe-native include scanning. -- MOS_MIGRATED_REVID=91020322
* Use injected action context when include scanning, not hard-coded ↵Gravatar Janak Ramakrishnan2015-04-09
| | | | | | | CppCompilationActionContext, which can be overridden by some modules. -- MOS_MIGRATED_REVID=90716346
* Clean up some FakeCppCompileAction code. In particular FakeCppCompileAction ↵Gravatar Janak Ramakrishnan2015-04-09
| | | | | | | was ignoring the actionContext, which it shouldn't have been. -- MOS_MIGRATED_REVID=90714138
* Unconditionally include gcc's stdc-predef.h if it is available.Gravatar Janak Ramakrishnan2015-03-31
| | | | | -- MOS_MIGRATED_REVID=89964638
* Rolling forward rolled back change that did declared dependencies on ↵Gravatar Janak Ramakrishnan2015-03-23
| | | | | | | discovered inputs before execution, since the underlying cause has been fixed and a test has been added. -- MOS_MIGRATED_REVID=89134131
* Make rules referencing paths outside of the execution root an error.Gravatar Manuel Klimek2015-03-23
| | | | | | | RELNOTES: Referencing a path outside the execution root is now an error. -- MOS_MIGRATED_REVID=89129910
* Delay updating inputs of an action when processing the action cache until it ↵Gravatar Janak Ramakrishnan2015-03-20
| | | | | | | | | | | is known that the action is a cache hit. This adds momentary memory overhead when checking the action cache, but should prevent a host of potential errors. Note that this cl assumes that an action that discovers its inputs does *not* take the names of its inputs into account when calculating its key, which is already stated as part of the javadoc of Action#getKey. -- MOS_MIGRATED_REVID=88971626
* Make include scanning faster when a target has many include scannables.Gravatar Manuel Klimek2015-03-20
| | | | | | | | | | | | | | | | | Instead of repeatedly scanning all transitively required include scannables, do one pass from all include scannables; this prevents us revisiting the common transitive closure of the include scannables. Additionally, only scan command line includes relatively to a main source file, not relatively to all source files. This is better than what we had before, but it's still not exactly right - we should actually scan the command line includes relatively to the module map file ([] Brings include scanning times for large TUs with modules down from ~60 seconds to < 2 seconds. -- MOS_MIGRATED_REVID=88963159
* Automated [] rollback of [].Gravatar Ulf Adams2015-03-16
| | | | | | | | | | | | | | | | | *** Reason for rollback *** Broke one of our integration tests. *** Original change description *** Declare dependencies on discovered inputs before execution instead of after. As a side effect, we no longer restart ActionExecutionFunction after the action has executed unless the action ran locally (and therefore didn't discover its inputs beforehand). This also means that we no longer need to store an out-of-Skyframe cache for discovered includes except when checking the action cache. Since my suspicion is that the out-of-Skyframe cache will have a minimal performance impact once it is just... *** -- MOS_MIGRATED_REVID=88724988
* Declare dependencies on discovered inputs before execution instead of after.Gravatar Janak Ramakrishnan2015-03-13
| | | | | | | | | | | As a side effect, we no longer restart ActionExecutionFunction after the action has executed unless the action ran locally (and therefore didn't discover its inputs beforehand). This also means that we no longer need to store an out-of-Skyframe cache for discovered includes except when checking the action cache. Since my suspicion is that the out-of-Skyframe cache will have a minimal performance impact once it is just being used for the action cache, I may delete it in a follow-up cl. After this change, we will overapproximate the set of includes because we depend on all includes, rather than just the ones that the action was found to depend on after execution. This is a prerequisite for Skyframe-native include scanning in that Skyframe-native include scanning will need to add at least as many Skyframe nodes and edges. If we end up punting on it, then we may want to revert this change. But for now I think it's worth having. I'll run some more numbers to see what the actual performance impact is. -- MOS_MIGRATED_REVID=88492955
* Return the set of files found when discovering inputs. Skyframe will ↵Gravatar Janak Ramakrishnan2015-03-11
| | | | | | | | | probably want to store these and may declare dependencies in advance so all metadata is present in the graph. Long-term, we may be able to use the returned set to make input-discovering actions immutable, which would be nice. -- MOS_MIGRATED_REVID=88348068
* Use the crosstool feature configuration for all modules, layering and headerGravatar Manuel Klimek2015-02-22
| | | | | | | processing related flags. -- MOS_MIGRATED_REVID=86898123
* Convert ResourceSet ctor calls to factory methodGravatar Mark Schaller2015-02-20
| | | | | | | | | | Most current invocations of the ResourceSet constructor shouldn't care about any new dimensions we add to restrict test execution. This change allows us to make those changes, keep the ResourceSet ctor symmetrical, and avoid contaminating those ctor call sites with noise. -- MOS_MIGRATED_REVID=86826112
* Correctly add .pcm files to the command line of parsed headers when theirGravatar Manuel Klimek2015-02-19
| | | | | | | dependencies just generate pic or non-pic header modules. -- MOS_MIGRATED_REVID=86686907
* Port all module map and header parsing related flags to the new crosstoolGravatar Manuel Klimek2015-02-19
| | | | | | | | | | | | | | | | | | | | | | | | | | | configuration. Together with [] (change to the crosstool configuration), the resulting blaze is able to build header modules (minus clang bugs). Detailed changes: 1. Adapt CppCompileAction to only insert the arguments itself if the crosstool does not specify a feature. 2. Make CppCompileAction provide the build variables to the flag expansion. 3. Pass package features through to the new feature selection / crosstool configuration; allow rules to always request features and mark features as unsupported. 4. Add feature "header_module_includes_dependencies" that controls whether we can only provide top-level header modules in the ${module_files} build variable; the currently integrated clang does not fully support that yet. 5. Add feature "use_header_modules", which allows targets to use compiled header modules without being compilable as module themselves. 6. Convert tests to use the feature configuration where it makes sense; we will be able to delete a lot of unit tests once the control via the feature configuration is rolled out to the stable crosstool, and implement them as crosstool integration tests. -- MOS_MIGRATED_REVID=86680884
* Replace some calls to ArtifactFactory.resolveSourceArtifact(PathFragment ↵Gravatar Marian Lobur2015-02-11
| | | | | | | execPath), with a skyframe native implementation ArtifactFactory.resolveSourceArtifact(Iterable<PathFragment> execPaths, PackageRootResolver resolver). -- MOS_MIGRATED_REVID=86062289
* Description redacted.Gravatar Manuel Klimek2015-02-10
| | | | | -- MOS_MIGRATED_REVID=85970303
* Allow empty lists for variables of sequence type in the crosstoolGravatar Manuel Klimek2015-02-06
| | | | | | | configuration. -- MOS_MIGRATED_REVID=85710366
* Update from Google.Gravatar Han-Wen Nienhuys2015-02-25
-- MOE_MIGRATED_REVID=85702957