aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/rules/cpp
Commit message (Collapse)AuthorAge
* bazel: handle proto_src_root when dealing with proto includes, generated ↵Gravatar Googler2018-08-13
| | | | | | | | | | files and C++ headers This change completes the handling of proto_src_root when it comes to inclusion of protos, generating the proto files in the right place and adding the generated headers to the include paths. WANT_LGTM=elenairina RELNOTES: None. PiperOrigin-RevId: 208457740
* ActionAnalysisMetadata exposes whether loose headers are present. ↵Gravatar shahan2018-08-12
| | | | | | TransitiveVersionTable uses futures. PiperOrigin-RevId: 208402465
* Use NestedSets to store topLevelModules and discoveredModules. Also improveGravatar Googler2018-08-11
| | | | | | | | computeTransitivelyUsedModules to return early on missing values instead of starting to create datastructures. RELNOTES: None. PiperOrigin-RevId: 208351193
* Only remember discovered modules for modules. For all other compiles, we won'tGravatar Googler2018-08-11
| | | | | | | need them later. RELNOTES: None. PiperOrigin-RevId: 208345603
* Adds a flag --experimental_includes_attribute_subpackage_traversal to toggle ↵Gravatar shahan2018-08-10
| | | | | | wildcarding on the presence of an includes attribute. PiperOrigin-RevId: 208225306
* Stop generating .d files when they won't be looked at later.Gravatar Googler2018-08-09
| | | | | | | | While at it remove CppCompilationActionBuilder.setAllowUsingHeaderModules, which isn't used anymore and would make the logic here (even) more complicated. RELNOTES: None. PiperOrigin-RevId: 208077525
* Stop allowing targets with loose headers checking that reference srcs/hdrs ↵Gravatar shahan2018-08-09
| | | | | | in other package to also treat those package as loose. PiperOrigin-RevId: 208051086
* Automated rollback of commit 09bf7cc5865f7edd9a3eeabb42792e8de3ad862f.Gravatar tomlu2018-08-08
| | | | | | | | | | | | | | | | *** Reason for rollback *** Causes crashes in fake_cc_binary in combination with --experimental_nodotd_scanning_with_modules. *** Original change description *** Stop generating .d files when they won't be looked at later. While at it remove CppCompilationActionBuilder.setAllowUsingHeaderModules, which isn't used anymore and would make the logic here (even) more complicated. RELNOTES: None. PiperOrigin-RevId: 207932548
* Expose methods returning bare C++ options in SkylarkGravatar hlopko2018-08-08
| | | | | | | | | | | | | This cl exposes getters for flags passed by --copt, --cxxopt, --conlyopt, and --linkopt Bazel options. Fixes #5602. While at it, I deprecated existing methods that are either migrated to the C++ toolchain, or to cc_common. RELNOTES: None. PiperOrigin-RevId: 207854692
* Delete the now unused ExtractInclusionAction.Gravatar Googler2018-08-07
| | | | | RELNOTES: None. PiperOrigin-RevId: 207724147
* Improve implementation of filterDiscoveredHeaders. Instead of creating a hugeGravatar Googler2018-08-07
| | | | | | | | | | set of all declared headers, iterate over them and remove them from a (often much smaller) set. This should improve runtime as well as amount of garbage produced. RELNOTES: None. PiperOrigin-RevId: 207710867
* Pass cc_toolchain location to FeatureConfigurationGravatar rosica2018-08-07
| | | | | | | Paths to tools in CROSSTOOL are either absolute or relative to the CROSSTOOL location (which is the same as cc_toolchain location). As in the future CROSSTOOL will be gone, and the new skylark rule that will replace CROSSTOOL will not have to be in the same location as cc_toolchain, we need to pass information to FeatureConfiguration about the location of the cc_toolchain in use, so we can calculate the workspace relative paths to the tools. RELNOTES: None. PiperOrigin-RevId: 207695703
* Remove is_cc_test_link_action and is_not_cc_test_link_action build variablesGravatar hlopko2018-08-07
| | | | | | | All users have been migrated, so it's not used anymore. RELNOTES: None. PiperOrigin-RevId: 207688604
* C++: Removes CcLinkParamsStore from Skylark APIGravatar plf2018-08-07
| | | | | | | This class is deprecated and should not be exposed. RELNOTES:none PiperOrigin-RevId: 207685607
* C++: Stops passing workspace to whitelist check of providersGravatar plf2018-08-07
| | | | | | | The workspace changes from user to user and it shouldn't be taken into account. RELNOTES:none PiperOrigin-RevId: 207679881
* C++: Removes calls to setCcLinkparamsStore of CcLinkingInfo.BuilderGravatar plf2018-08-06
| | | | | | | | | | This is in preparation for deleting CcLinkParamsStore. All remaining calls to the setCcLinkparamsStore method of the CcLinkingInfo builder have been removed. See b/111781390 for details of rollback. RELNOTES:none PiperOrigin-RevId: 207525881
* C++: Removes calls to setCcLinkparamsStore of CcLinkingInfo.BuilderGravatar plf2018-08-06
| | | | | | | | This is in preparation for deleting CcLinkParamsStore. Not all calls to setCcLinkparamsStore have been removed in this CL. RELNOTES:none PiperOrigin-RevId: 207516944
* Remove the functionality to do ahead-of-time #include extraction as a separateGravatar Googler2018-08-06
| | | | | | | action. RELNOTES: None. PiperOrigin-RevId: 207516074
* Polish archiver_flags feature to behave better with the toolchain apiGravatar hlopko2018-08-03
| | | | | | | With this fix we can get archiver flags from the Skylark API to the C++ toolchain even when we don't pass output_file RELNOTES: None. PiperOrigin-RevId: 207248839
* C++: Change Skylark API whitelisting to be part of flag.Gravatar plf2018-08-03
| | | | | | | | This uses SkylarkSemantics now instead of the C++ configuration. The flag is: --experimental_cc_skylark_api_enabled_packages RELNOTES:none PiperOrigin-RevId: 207235431
* Add builtin include directories to action key for CppCompileActionGravatar hlopko2018-08-01
| | | | | | | | Since builtin include directories affect validation, they have to be part of the action key. RELNOTES: None. PiperOrigin-RevId: 206960988
* Remove the need for discoverInputsStage2(). Much like every other SkyframeGravatar Googler2018-08-01
| | | | | | | | function, discoverInputs() can be implemented to return null upon encountering missing ActionExecutionValues. RELNOTES: None. PiperOrigin-RevId: 206913969
* There is no need to do input discovery or .d file analysis for modular codegen.Gravatar Googler2018-08-01
| | | | | | | | Modular codegen simply transforms a .pcm file to a .o file containing the code of inline functions of the module's headers. RELNOTES: None PiperOrigin-RevId: 206902693
* Stop generating .d files when they won't be looked at later.Gravatar Googler2018-07-31
| | | | | | | | While at it remove CppCompilationActionBuilder.setAllowUsingHeaderModules, which isn't used anymore and would make the logic here (even) more complicated. RELNOTES: None. PiperOrigin-RevId: 206752281
* Only call filterDiscoveredHeaders() if include scanning is in effect.Gravatar lberki2018-07-31
| | | | | | | | | | | | This is a step towards making CppCompileAction work without input discovery. This works because: - filterDiscoveredHeaders() is not necessary if we don't discover any - shouldPruneModules is always false if `shouldScanIncludes` is false (see CppCompileActionBuilder#shouldPruneModules()) RELNOTES: None. PiperOrigin-RevId: 206721143
* Disable include scanning for C++ linkstamp compile actions, which are ↵Gravatar lberki2018-07-31
| | | | | | | | | supposed to be shared. Note that CppCompileAction#discoversInputs() will still almost always return true because it's still set to true when .d file pruning is enabled. RELNOTES: None. PiperOrigin-RevId: 206716704
* Internal changeGravatar ruperts2018-07-30
| | | | PiperOrigin-RevId: 206642715
* Automated rollback of commit 71479d3ef1627a30b9ec75ca50e6a90cf7db6377.Gravatar ruperts2018-07-27
| | | | | | | | | | | | | | | | | | | | | *** Reason for rollback *** http://https://github.com/bazelbuild/bazel/commit/71479d3ef1627a30b9ec75ca50e6a90cf7db6377 broke thousands of targets in the nightly, notably: //abuse/ares/rulesystem/generator/python/rule_set:main (x1754) //net/encapdecap/common/templates:gen_dr_scopes (x903) //testing/cloud/vex/public:vex_main_internal (x782) //wireless/android/play/playlog/server:playlog_server (x401) *** Original change description *** C++: Removes calls to setCcLinkparamsStore of CcLinkingInfo.Builder This is in preparation for deleting CcLinkParamsStore. All remaining calls to the setCcLinkparamsStore method of the CcLinkingInfo builder have been removed. RELNOTES:none PiperOrigin-RevId: 206361808
* C++: Removes calls to setCcLinkparamsStore of CcLinkingInfo.BuilderGravatar plf2018-07-26
| | | | | | | | This is in preparation for deleting CcLinkParamsStore. All remaining calls to the setCcLinkparamsStore method of the CcLinkingInfo builder have been removed. RELNOTES:none PiperOrigin-RevId: 206128439
* C++: Removes calls to setCcLinkparamsStore of CcLinkingInfo.BuilderGravatar plf2018-07-26
| | | | | | | | | | This is in preparation for deleting CcLinkParamsStore. Not all calls to setCcLinkparamsStore have been removed in this CL. Roll forward with bzl change in separate CL (unknown commit) and giving a proper error in Skylark instead of a crash when CcLinkingInfo is not built correctly. RELNOTES:none PiperOrigin-RevId: 206122870
* Automated rollback of commit 16dde0de06a3a4157a13e7e7264afeb6a50b2dde.Gravatar janakr2018-07-25
| | | | | | | | *** Reason for rollback *** Crash (see linked bug). PiperOrigin-RevId: 206060905
* C++: Removes calls to setCcLinkparamsStore of CcLinkingInfo.BuilderGravatar plf2018-07-25
| | | | | | | | This is in preparation for deleting CcLinkParamsStore. Not all calls to setCcLinkparamsStore have been removed in this CL. RELNOTES:none PiperOrigin-RevId: 205998687
* C++: Remove AbstractCcLinkParamsStore from providers.Gravatar plf2018-07-25
| | | | | | | | | | | | | 3 providers had AbstractCcLinkParamsStore as a class field, now they wrap CcLinkingInfo instead. This is being rolled forward, first try caused a NullPointerException in go_wrap_cc rules that had the attribute use_default_import set to False. GoWrapCcConfiguredTargetTest now has a go_wrap_cc rule that has this attribute set to false and fails with the previous version of this CL. RELNOTES:none PiperOrigin-RevId: 205959266
* Prevent unnecessary file stats when looking at whether an include is in one ofGravatar Googler2018-07-25
| | | | | | | | | the declared directories. Especially when doing validation during input discovery, the discovery's over-approximation can lead to isDeclaredIn walking the full path to the root without finding a declared include directory. RELNOTES: None. PiperOrigin-RevId: 205958078
* Automated rollback of commit 6f1915114ec7af104a2649a454cc1519ce7806bf.Gravatar laurentlb2018-07-24
| | | | | | | | | | | | | | | | *** Reason for rollback *** Crash with NullPointerException *** Original change description *** C++: Remove AbstractCcLinkParamsStore from providers. 3 providers had AbstractCcLinkParamsStore as a class field, now they wrap CcLinkingInfo instead. RELNOTES:none PiperOrigin-RevId: 205885939
* Automated rollback of commit f309ad3be36363070e87eef0ee04b12f4956d601.Gravatar janakr2018-07-24
| | | | | | | | | | *** Reason for rollback *** Fixed duplicate derived inputs bug. Test is in diffbase. RELNOTES[INC]: If the same artifact is generated by two distinct but identical actions, and a downstream action has both those actions' outputs in its inputs, the artifact will now appear twice in the downstream action's inputs. If this causes problems in Skylark actions, you can use the uniquify=True argument in Args.add_args. PiperOrigin-RevId: 205863806
* C++: Remove AbstractCcLinkParamsStore from providers.Gravatar plf2018-07-24
| | | | | | | | 3 providers had AbstractCcLinkParamsStore as a class field, now they wrap CcLinkingInfo instead. RELNOTES:none PiperOrigin-RevId: 205821081
* Only expand dynamic_library_linker_tool feature when ↵Gravatar hlopko2018-07-23
| | | | | | | | | generate_interface_library is available This way users of the Skylark API don't see this feature expanded. RELNOTES: None. PiperOrigin-RevId: 205704719
* Remove "warn" setting for hdrs_check. This has not proven useful.Gravatar Googler2018-07-23
| | | | | | | For now, implicitly convert "warn" to "loose". RELNOTES: None. PiperOrigin-RevId: 205652060
* Add --experimental_enable_cc_toolchain_label_from_crosstool_proto flag for ↵Gravatar rosica2018-07-23
| | | | | | | | | disabling relying on CROSSTOOL file in order to select the cc_toolchain label CROSSTOOL file should not have any influence over selection of the cc_toolchain label. Ultimately the information that CROSSTOOL offers will be rerouted through an attribute of cc_toolchain. RELNOTES: None. PiperOrigin-RevId: 205651369
* Remove special casing for --incremental-changed and --incremental-unchanged.Gravatar lberki2018-07-23
| | | | | RELNOTES: None. PiperOrigin-RevId: 205646506
* C++: Refactors every provider wrapping CcLinkParamsStoreGravatar plf2018-07-23
| | | | | | | | Providers that were wrapping CcLinkParamsStore now wrap CcLinkingInfo instead. CcLinkParamsStore will be deleted in a future CL. RELNOTES:none PiperOrigin-RevId: 205629924
* Implement a way to do include validation as a part of input discovery. ThisGravatar Googler2018-07-23
| | | | | | | | | | | | | | | | | makes it possible to disable .d file scanning when input discovery is used without allowing the usage of undeclared headers. The way this is implemented relies on having a sand-boxed or remote execution environment and simply removes undeclared files from discovered inputs. As a result, the compiler cannot see them and can diagnose missing headers. The input discovery itself cannot (usually) diagnose undeclared headers as it is often implemented to be an over-approximation. It needs to find all used headers, but it is allowed to find more. Diagnosing these additional headers would not be useful. RELNOTES: None. PiperOrigin-RevId: 205628312
* Tweak GUID for WriteBuildInfoHeaderAction to force it to be rebuiltGravatar Googler2018-07-20
| | | | | | | for this upgrade. RELNOTES=None. PiperOrigin-RevId: 205437116
* Do not check if features named include_paths or preprocessor_definesGravatar Googler2018-07-20
| | | | | | | | are enabled before setting the corresponding build variables for the crosstool. Such a conditional is unnecessary. RELNOTES: None. PiperOrigin-RevId: 205397072
* Open source SwigIncludeScanningContextGravatar ulfjack2018-07-20
| | | | | | This is in preparation for open sourcing our include scanning implementation. PiperOrigin-RevId: 205386312
* C++: Removes logic for linkopts expansion.Gravatar plf2018-07-20
| | | | | | | RELNOTES[INC]:Labels in C++ rules' linkopts attribute are not expanded anymore unless they are wrapped, e.g: $(location //foo:bar) PiperOrigin-RevId: 205385711
* Open source IncludeScanning glue codeGravatar ulfjack2018-07-20
| | | | | | One tiny step after the other. PiperOrigin-RevId: 205378056
* C++: Cleans up C++ Skylark APIGravatar plf2018-07-20
| | | | | | | | Feature configuration and toolchain are now mandatory arguments. Rule context is no longer a positional argument. RELNOTES:none PiperOrigin-RevId: 205367825
* C++: Implements Skylark cc_common.compile()/link().Gravatar plf2018-07-19
| | | | | | | Working towards #4570. RELNOTES:none PiperOrigin-RevId: 205274676