aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/rules/cpp/CcCompilationContext.java
Commit message (Collapse)AuthorAge
* Pull out a class to hold the data that is transferred from a compilation actionGravatar Googler2018-07-17
| | | | | | | to the include scanner and slightly reshuffle code. RELNOTES: None. PiperOrigin-RevId: 204906167
* C++: New functionality exposed to Skylark for external libs.Gravatar plf2018-07-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - CcLinkingInfo has a getter for CcLinkParams. - Artifacts and linkopts of CcLinkParams are accessible. - CcCompilationInfo constructor now accepts defines and include dirs. - CcCompilation now has getters for headers, defines and include dirs. CcCompiilationInfo( headers=depset([Artifacts]), defines=depset([Strings]), include_dirs=depet([Strings]) CcCompilationInfo.headers CcCompilationInfo.defines CcCompilationInfo.include_dirs -- cc_common.merge([CcLinkingInfos]) returns CcLinkingInfo -- CcLinkingInfo.static_shared_params CcLinkingInfo.static_no_shared_params CcLinkingInfo.no_static_shared_params CcLinkingInfo.no_static_no_shared_params -- CcLinkParams.libraries CcLinkParams.linkopts CcLinkParams.dynamic_libraries_for_runtime RELNOTES:none PiperOrigin-RevId: 204700779
* Simplify (hopefully) usage of modules during input discovery. Goals:Gravatar Googler2018-07-12
| | | | | | | | | | | - Don't duplicate usedModules into additionalInputs (this shouldn't be necessary). - Use ImmutableLists instead of ImmutableSets where possible to reduce memory consumption. - Use set operations to make the code more readable. RELNOTES: None. PiperOrigin-RevId: 204268489
* Track additionallyPrunableIncludes separately from declaredIncludeSrcs (don'tGravatar Googler2018-07-10
| | | | | | | | | | | | | | | | | | compose a nested set encompassing both). The current prunableHeaders were used in various places, at least two of which let to a duplicate iteration through the comparatively large declaredIncludeSrcs: CppCompileAction.computeKey() and CppCompileAction.getAllowedDerivedInputs(). Also do some other minor optimizations: - CcCompileActionBuilder.buildAllInputs() now just returns a NestedSet with the same order as its parameter. As inputsForValidation is almost always empty, this makes this NestedSet pass the underlying one through. - CcCompilationContext.directModuleMaps is just a list of the module maps of direct dependencies. As such, there is no use for keeping them in a NestedSet. RELNOTES: None. PiperOrigin-RevId: 203938011
* Restructure the NestedSet usage in CcCompilationContext. Goals:Gravatar Googler2018-07-10
| | | | | | | | | | | | | | | | | | - Don't use NestedSets of NestedSets. Not sure whether this is a performance improvement or has serialization benefits, but it does make understanding the structure a lot easier. - Use the same large NestedSet for all header information (whether or not they are modular and what pregrepped headers might exist). This speeds up the include scanner calls getLegalGeneratedScannerFileMap and getModularHeaders because they now iterate over just a single NestedSet and the second evaluation of a NestedSet is much cheaper. In a subsequent change, we can likely fold all three iterations over this NestedSet into one (in getLegalGeneratedScannerFileMap, getModularHeaders and getUsedModules). Measurements show a small reduction in heap usage. RELNOTES: None. PiperOrigin-RevId: 203909308
* Delete some more LIPO crumbs.Gravatar Benjamin Peterson2018-06-28
| | | | | | | Closes #5478. Change-Id: I3ac44605ef16a7c2e6bdc63d26fdf968bef651aa PiperOrigin-RevId: 202482493
* C++: Makes Skylark CcCompilationInfo accept headersGravatar plf2018-06-27
| | | | | | | | | The Skylark constructor of CcCompilationInfo now accepts headers. This may be the last piece needed to get a working prototype of foreign C++ libraries. Next step would be open sourcing the sandwich. RELNOTES:none PiperOrigin-RevId: 202306252
* Remove LIPO supportGravatar hlopko2018-06-15
| | | | | RELNOTES: Support for LIPO has been fully removed. PiperOrigin-RevId: 200724578
* Remove CcCompilationContext.TransitiveModuleHeaders#getTransitiveModules. ↵Gravatar cpeyser2018-06-15
| | | | | | This information is persisted for testing only, and considerably slows NestedSet serialization. PiperOrigin-RevId: 200710549
* Add an option --experimental_prune_cpp_input_discovery to stop C++ inputGravatar Googler2018-05-28
| | | | | | | | discovery at the boundary of modular headers. C++ modules generally should be self-contained and a using a C++ module doesn't require any of it's transitive source files to be present. PiperOrigin-RevId: 198299936
* Migrate several compilation-related cpp definitions to skylarkbuildapiGravatar cparsons2018-05-15
| | | | | RELNOTES: None. PiperOrigin-RevId: 196722758
* C++: Renames CcCompilationContextInfo to CcCompilationContextGravatar plf2018-05-14
Since it's not a provider, it doesn't need the Info suffix anymore. RELNOTES:none PiperOrigin-RevId: 196498526