aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/rules/cpp/CompileCommandLine.java
Commit message (Collapse)AuthorAge
* Introduce -c source_file -o output_file build variablesGravatar hlopko2018-02-08
| | | | | | | | | | | | | | Prior to this cl CompileCommandLine would (almost) unconditionally emit -c and -o flags. This cl removes this logic and relies on crosstool to emit these flags. This is another small step towards platform independent C++ rules. Memory use is not affected, since the build variables used by this cl are already exposed, this cl just forces crosstools to use it. Encore of https://github.com/bazelbuild/bazel/commit/f26e8694ae78599b3e2004e3360eaf3443fa53a6. RELNOTES: None. PiperOrigin-RevId: 184981106
* Add a CODEC for some dependencies of CppCompileAction: CompileCommandLine andGravatar cpeyser2018-02-07
| | | | | | | | CcToolchainFeatures.Variables. We rephrase the nocopts filter from a Predicate<String> to a custom class, since AutoCodec cannot serialize a Predicate. PiperOrigin-RevId: 184902162
* Remove the CppConfiguration field from CppCompileAction. MakingGravatar cpeyser2018-01-30
| | | | | | CppCompileAction smaller improves serialization. PiperOrigin-RevId: 183871454
* Automated rollback of commit 367f704e71f352b404df38161f4c367b9ff506c9.Gravatar hlopko2017-12-12
| | | | | | | | | | | | | | *** Reason for rollback *** Rollforward of https://github.com/bazelbuild/bazel/commit/c861c0afd9a4df283936218b9e5b33c452b07c95 after fixing fake link actions. *** Original change description *** Rollback of 178106899. RELNOTES: Linkstamping is now a separate and full-blown CppCompileAction, it's no longer a part of linking command. PiperOrigin-RevId: 178760072
* Rollback of 178106899.Gravatar cpeyser2017-12-08
| | | | PiperOrigin-RevId: 178384991
* Register separate linkstamp compile actionGravatar hlopko2017-12-06
| | | | | | | | | | | | | | | | | This cl replaces entire hardcoded linkstamping command line generation with a separate action. Instead of generating bash command to compile linkstamp and prepending it to the standard link command line, this cl creates a special action that link action depends on. I kept linkstamp action registration in the CppLinkActionBuilder (and GoCompilationHelper internally) to keep the cl shorter and change more localized. I also didn't remove linkstamps and buildInfoHeaderArtifacts from CppLinkAction to stay compatible with extra actions api. Both issues and corresponding cleanups will be addressed in separate cls. RELNOTES: Linkstamping is now a separate and full-blown CppCompileAction, it's no longer a part of linking command. PiperOrigin-RevId: 178106899
* Replace all usages of Blaze's Preconditions class with guava.Gravatar tomlu2017-11-09
| | | | | | | | Blaze had its own class to avoid GC from varargs array creation for the precondition happy path. Guava now (mostly) implements these, making it unnecessary to maintain our own. This change was almost entirely automated by search-and-replace. A few BUILD files needed fixing up since I removed an export of preconditions from lib:util, which was all done by add_deps. There was one incorrect usage of Preconditions that was caught by error prone (which checks Guava's version of Preconditions) that I had to change manually. PiperOrigin-RevId: 175033526
* Use FeatureConfiguration to compute linkstamping compile command lineGravatar hlopko2017-09-25
| | | | | | | | | Before, linkstamping compile actions were hardcoded in bazel and assumed gcc/clang and bash. This cl removes gcc/clang assumptions by using feature configuration. RELNOTES: None. PiperOrigin-RevId: 169685949
* Do not duplicate build variables, reuse variables from cc toolchainGravatar hlopko2017-09-19
| | | | | | | | | | | Before this cl each linking and compilation action would contain a full copy of all build variables. However, some build variables can be reused, for the memory consumption benefit. With this cl, we contruct a Variables instance in the CcToolchain, and make it a parent of all per-linking and per-compilation variables. RELNOTES: None. PiperOrigin-RevId: 169233756
* Automated rollback of commit f26e8694ae78599b3e2004e3360eaf3443fa53a6.Gravatar hlopko2017-09-18
| | | | | | | | | | | | | | | | | | | | *** Reason for rollback *** Breaks clang_tidy. *** Original change description *** Introduce -c source_file -o output_file build variables Prior to this cl CompileCommandLine would (almost) unconditionally emit -c and -o flags. This cl removes this logic and relies on crosstool to emit these flags. This is another small step towards platform independent C++ rules. Memory use is not affected, since the build variables used by this cl are already exposed, this cl just forces crosstools to use it. RELNOTES: None. PiperOrigin-RevId: 168834576
* Introduce -c source_file -o output_file build variablesGravatar hlopko2017-09-14
| | | | | | | | | | | | Prior to this cl CompileCommandLine would (almost) unconditionally emit -c and -o flags. This cl removes this logic and relies on crosstool to emit these flags. This is another small step towards platform independent C++ rules. Memory use is not affected, since the build variables used by this cl are already exposed, this cl just forces crosstools to use it. RELNOTES: None. PiperOrigin-RevId: 168671507
* Expose sysroot as a build variableGravatar hlopko2017-09-12
| | | | | | | | | This cl removes hardcoded --sysroot flag generation from bazel when constructing command line for C++ actions. The hardcoded flag is still exposed to Skylark (to stay backwards compatible). RELNOTES: None. PiperOrigin-RevId: 168346711
* Make per-file-copts part of the user_compile_flagsGravatar hlopko2017-09-12
| | | | | | | | | This cl adds flags from --per_file_copts option to 'user_compile_flags' build variable. This changes the flag order, before they appeared after unfiltered flags, now they appear before. RELNOTES: None. PiperOrigin-RevId: 168221663
* Introduce unfiltered_compile_flags build variable, rename copts variable to ↵Gravatar hlopko2017-09-11
| | | | | | | | | | | | | user_compile_flags Also add magic to a feature named 'unfiltered_compile_flags' so the flags expanded from it are not subject to nocopt filtering. This is encore of https://github.com/bazelbuild/bazel/commit/268c0bcbf79f9f3f72d95fa51af0f1b18c5ce29e that was rolled back because it regressed memory. RELNOTES: None. PiperOrigin-RevId: 167989075
* Internal changeGravatar kush2017-09-07
| | | | PiperOrigin-RevId: 167751263
* Introduce unfiltered_compile_flags build variable, rename copts variable to ↵Gravatar hlopko2017-09-06
| | | | | | | | | | user_compile_flags Also add magic to a feature named 'unfiltered_compile_flags' so the flags expanded from it are not subject to nocopt filtering. RELNOTES: None. PiperOrigin-RevId: 167587189
* Simplify copts handling and expose them as a build variableGravatar hlopko2017-08-02
| | | | | | | | | | | This cl changes copts to be immutable (and changes addCopts methods into setCopts, so it's simpler to reason about copts) and exposes copts as a build variable. It also introduces CompileBuildVariablesTest, similar to LinkBuildVariablesTest, to test that right build variables are exposed for right actions. RELNOTES: None. PiperOrigin-RevId: 163876774
* Let nocopts also filter coptsGravatar hlopko2017-07-24
| | | | | RELNOTES: nocopts now also filter copts PiperOrigin-RevId: 162944771
* Automated conversion to Java 8Gravatar laurentlb2017-06-30
| | | | | | | With a few manual fixes for readability. RELNOTES: None. PiperOrigin-RevId: 160582556
* Add back --sysroot argument for objc compile actions when grte_top is specified.Gravatar rduan2017-06-22
| | | | | RELNOTES: None. PiperOrigin-RevId: 159740106
* Init absent action configs for CppCompile actionsGravatar hlopko2017-06-12
| | | | | | | | | | So far only link actions were initialized in CppLinkActionConfigs. This cl changes this class to also initialize CppCompile actions. This is needed for our ongoing work removing hard-coded flags from Bazel and moving them into Crosstool. RELNOTES: None. PiperOrigin-RevId: 158715986
* Introduce CompileCommandLineBuilder and CompileCommandLineTestGravatar hlopko2017-06-12
| | | | | RELNOTES: NONE. PiperOrigin-RevId: 158703123
* Automated g4 rollback of commit 6879d7ceff0e118fdecb0cabe5134979030b7cb8.Gravatar Googler2017-05-11
| | | | | | | | | | | | | | | | | | | *** Reason for rollback *** Fixes memory issue that caused this CL to be rolled back. *** Original change description *** Automated g4 rollback of commit cbbb423663b154d82e3dfa5e9a56839583987999. *** Reason for rollback *** Need to roll this back as part of http://b/38171368 *** Original change description *** RELNOTES: Effectively remove sysroot from CppConfiguration and allow it to use select statements. PiperOrigin-RevId: 155651879
* Automated g4 rollback of commit cbbb423663b154d82e3dfa5e9a56839583987999.Gravatar Googler2017-05-10
| | | | | | | | | | | *** Reason for rollback *** Need to roll this back as part of http://b/38171368 *** Original change description *** RELNOTES: Effectively remove sysroot from CppConfiguration and allow it to use select statements. PiperOrigin-RevId: 155547813
* RELNOTES: Effectively remove sysroot from CppConfiguration and allow it to ↵Gravatar Googler2017-05-09
| | | | | | use select statements. PiperOrigin-RevId: 155480011
* Automated g4 rollback of commit d5217515002d468a3095243975e21e89eccc46b7.Gravatar ajmichael2017-05-02
| | | | | | | | | *** Reason for rollback *** Relies on a CL that is being rolled back due to breaking some LIPO builds. RELNOTES: None PiperOrigin-RevId: 154776370
* Rename CppCompileCommandLine to CompileCommandLine and move it out from ↵Gravatar hlopko2017-04-28
CppCompileAction Mostly to maintain symmetry between CppCompileAction and CppLinkAction. RELNOTES: None. PiperOrigin-RevId: 154531984