aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/rules/cpp/CcBinary.java
Commit message (Collapse)AuthorAge
* Add the implicit output of unstripped binary for Launcher-enabled java_binary.Gravatar Googler2015-08-24
| | | | | | | Use stripped launcher when Fission is enabled. -- MOS_MIGRATED_REVID=101244628
* Set the workspace suffix for runfilesGravatar Kristina Chodorow2015-08-13
| | | | | | | This CL covers the "easy" cases. Followup CLs will take care of couple dozen remaining gnarly ones. -- MOS_MIGRATED_REVID=100479410
* Experimental support LLVM ThinLTO.Gravatar Han-Wen Nienhuys2015-08-11
| | | | | | | | | | | | | | | | | | | | | | ThinLTO is a Link Time Opimization strategy, where the inlining step operates on LLVM intermediate code, and is sharded across multiple compiler invocations, so they can be parallelized. For more information, see http://llvm.org/devmtg/2015-04/slides/ThinLTO_EuroLLVM2015.pdf Using this features requires an experimental LLVM toolchain, with the following stanza in CROSSTOOL feature { name: "thin_lto" flag_set { action: "c-compile" action: "c++-compile" flag_group { flag: "-Xclang-only=-Wno-inconsistent-missing-override" flag: "-flto" flag: "-O2" } } } -- MOS_MIGRATED_REVID=100269776
* Use pic mode for cc_fake_binary if pic actions are used for binaries.Gravatar Manuel Klimek2015-08-05
| | | | | | | | | | | | | | | | | | | | | To allow the commands in the cc_fake_binary to work with modules (which is a precondition to writing nocompile tests for modules), we need to create header modules in the same pic/nopic mode as the rest of the commandline indicates. There are two ways to resolve this problem: a) Make cc_fake_binary use the same pic mode as other binaries. b) Make sure fake compile actions get all their inputs in non-pic mode. This patch proposes solution a), as that makes sure cc_fake_binary is as close to the actual compilation going on as possible; for example, if we decide to always use pic in the future, this will simply work; additionally, we will currently get more test coverage through different compilation modes. RELNOTES: 'cc_fake_binary' uses the same pic/nopic mode as other binaries. -- MOS_MIGRATED_REVID=99902738
* Lazy evaluation of C & C++ sources in CcCommon.Gravatar Ulf Adams2015-08-04
| | | | | -- MOS_MIGRATED_REVID=99718820
* Refactor CcBinary / CcCommon a bit.Gravatar Ulf Adams2015-08-04
| | | | | | | | | | Don't compute the linkopts in CcCommon unconditionally, only on demand. In order to only do this once, I had to pull out all calls to getLinkopts and move them up in the call hierarchy. This in turn resulted in some simplification and dead code removal in CcBinary. -- MOS_MIGRATED_REVID=99716999
* Split CcCommon handling of srcs filtering into a new class.Gravatar Ulf Adams2015-08-04
| | | | | -- MOS_MIGRATED_REVID=99715964
* Remove all calls to AnalysisEnvironment.getDerivedArtifact() from the C++ ↵Gravatar Lukacs Berki2015-08-04
| | | | | | | | | | | | rules that can be removed. What is left: - The outputs of ExtractInclusionsAction. I think this action is shared between multiple rules that have the same generated file in srcs, so this call site is legitimate. - Creating the solib symlinks. This is not a shared action, but these need to be in the same directory so that the RPATH is not too long, so we must live with this for the time being. - FDO, which is beyond salvation. The artifacts under the FDO root don't really conform to the usual "only under the package directory" convention. -- MOS_MIGRATED_REVID=99551394
* Refactor Cc* some more.Gravatar Ulf Adams2015-07-30
| | | | | | | | | - Move getTemps to CcBinary (only caller). - Change getFilesToCompile to return a nested set. - Inline CcCommon.getHeader(), which was a one-liner. -- MOS_MIGRATED_REVID=99384327
* Remove some unnecessary code from CcBinary.Gravatar Ulf Adams2015-07-29
| | | | | | | | | The object files from sources are already merged into the cc compilation outputs by the CcLibraryHelper, and returned from getObjectFiles. There's no need to add them again later. -- MOS_MIGRATED_REVID=99379096
* Move a method from CcCommon to CcBinary that is only called from there.Gravatar Ulf Adams2015-07-29
| | | | | -- MOS_MIGRATED_REVID=99372555
* Move shared settings between CcBinary and CcLibrary toGravatar Han-Wen Nienhuys2015-07-29
| | | | | | | CcLibraryHelper#setCommon. -- MOS_MIGRATED_REVID=99370685
* Check that most output artifacts are under a directory determined by the ↵Gravatar Lukacs Berki2015-07-29
| | | | | | | | | repository and package of the rule being analyzed. Currently this directory is PACKAGE for rules in the main repository and external/REPOSITORY_NAME/PACKAGE for rules in other repositories. This is a plan to fix #293. Ideally, we would simply make it impossible to create artifacts not under that location, but in practice, we cannot do that because some rules do want to do this, mostly those that are already problematic due to shared actions. So the battle plan is to eliminate as many calls to AnalysisEnvironment.getDerivedArtifact() as I possibly can and audit the rest. -- MOS_MIGRATED_REVID=99351151
* Refactor C++ link action creation.Gravatar Ulf Adams2015-07-27
| | | | | | | | | Remove an unnecessary intermediate method in CcBinary and provide a helper method in CcLinkAction.Builder that simplifies several call sites that just want to add CcLinkParams to the link action. -- MOS_MIGRATED_REVID=99172303
* Implement multi-level intermediate dwp actions. These avoid OOMsGravatar Googler2015-06-29
| | | | | | | by reducing the size of the final dwp action. -- MOS_MIGRATED_REVID=97004508
* Create a Skylark API for C++ rules.Gravatar Laurent Le Brun2015-05-29
| | | | | | | | | | | | | | The API doesn't expose the internal detail of the C++ rules. The goal here is to provide a simplified and stable access to the data. Example of use: for target in ctx.attr.deps: print(target.cc.include_srcs) More functions should be added later. -- MOS_MIGRATED_REVID=94672588
* Added rule label to CppDebugPackageProvider to allow consumers to report ↵Gravatar Googler2015-04-08
| | | | | | | better errors. -- MOS_MIGRATED_REVID=90543663
* AttributeMap#has(String, Type) is added to check whether an attribute with a ↵Gravatar Googler2015-03-13
| | | | | | | | | given name is present. Rule implementations are cleaned up. -- MOS_MIGRATED_REVID=88430329
* Rename TopLevelArtifactProvider to OutputGroupProvider.Gravatar Lukacs Berki2015-03-05
| | | | | -- MOS_MIGRATED_REVID=87596401
* Use the crosstool feature configuration for all modules, layering and headerGravatar Manuel Klimek2015-02-22
| | | | | | | processing related flags. -- MOS_MIGRATED_REVID=86898123
* Decouple header-processing from the toolchain rule attribute.Gravatar Manuel Klimek2015-02-19
| | | | | | | This required pulling the feature configuration into the rule-specific code. -- MOS_MIGRATED_REVID=86685776
* Remove BaselineCoverageArtifactsProvider in favor of an output group.Gravatar Lukacs Berki2015-02-19
| | | | | | | The only slightly different thing here is that now, instead of using target.getConfiguration().isCodeCoverageEnabled() we use BuildRequest.Options.collectCodeCoverage, but the only place where this is not the same I can think of is InputFileCT, which does not have baseline coverage files anyway. -- MOS_MIGRATED_REVID=86682774
* Fix layering_check with cc_fake_binary / no-compile tests.Gravatar Manuel Klimek2015-02-18
| | | | | | | | | | A cc_fake_binary needs all additional artifacts referenced in the compile command line in its runfiles tree. RELNOTES: Fix layering_check with cc_fake_binary. -- MOS_MIGRATED_REVID=86596049
* Update from Google.Gravatar Han-Wen Nienhuys2015-02-25
-- MOE_MIGRATED_REVID=85702957