aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/rules/cpp/CppConfiguration.java
Commit message (Collapse)AuthorAge
* Include .dwp file in the runfiles for cc_test when building with Fission.Gravatar Googler2016-02-03
| | | | | -- MOS_MIGRATED_REVID=113660258
* Rollback of commit 4fdd66db55d36c923b1e9fa30a158e1596408670.Gravatar Michajlo Matijkiw2016-02-02
| | | | | | | | | *** Reason for rollback *** The change this relies on is to be rolled back. -- MOS_MIGRATED_REVID=113564031
* Contractually document BuildConfiguration.Fragment as immutable and strengthenGravatar Greg Estren2016-02-01
| | | | | | | | | | | | | | | the immutability interfaces of existing implementations. Eventually we want all implementations to comply, but right now CppConfiguration is a glaring exception due to FDO/LIPO support. We don't want more exceptions to arise. This is prep work for pre-trimming ConfigurationFragment.key's BuildOptions input to just the options needed by the fragment. That implies fragments can be shared across configurations, so that needs to be safe. -- MOS_MIGRATED_REVID=113408041
* Rollback of commit e379f28f464faacc4db21f4fed3a48fa6d4d23f0.Gravatar Googler2016-01-29
| | | | | | | | | | | | | *** Reason for rollback *** The new test apparently breaks some targets. Rolling back to fix the build. *** Original change description *** Include .dwp file in the runfiles for cc_test when building with Fission. -- MOS_MIGRATED_REVID=113310353
* Include .dwp file in the runfiles for cc_test when building with Fission.Gravatar Googler2016-01-29
| | | | | -- MOS_MIGRATED_REVID=113295790
* Allow switching on header processing (parse_headers or preprocess_headers)Gravatar Manuel Klimek2016-01-22
| | | | | | | | | | | | | | | | | for targets in the transitive closure of a target that is built. Previously, this would only happen if a link action for the library containing the headers was also built; this specifically means it did not trigger if a library didn't contain source files, as there is no link action for such libraries. That led to no header-only libraries would get their headers parsed, which includes all cc_public_library rules. Adding a flag to introduce this under so we can switch it on independently from the blaze release. Once it is switched on, we can remove the edges in the action graph from the link actions to the header processing actions. -- MOS_MIGRATED_REVID=112782219
* Remove Constants.ALLOW_CC_INCLUDE_SCANNING and handle the logic in ↵Gravatar Philipp Wollermann2016-01-07
| | | | | | | CppSemantics instead. -- MOS_MIGRATED_REVID=111406721
* Move annotation classes used for referencing framework Java classes from ↵Gravatar John Field2015-12-16
| | | | | | | | | | | | | | Skylark into their own package. This allows, e.g., classes in the syntax package to access classes in the cmdline package without creating circular dependencies. While we're here: - Removed a couple of unused BUILD deps flagged in []. - Updated SkylarkRuleImplementationFunctionsTest to remove non-ASCII characters and clarify the intent of the test. -- MOS_MIGRATED_REVID=110360763
* Clean up the configuration-related code paths a bit.Gravatar Ulf Adams2015-12-11
| | | | | | | | | - If we have a class object available, we can use .cast(Object) - Only store the required options objects in CppConfigurationParameters rather than keeping the entire BuildOptions -- MOS_MIGRATED_REVID=109981236
* Use Bazel Preconditions variant which avoids varargs array creationGravatar Mark Schaller2015-12-10
| | | | | | | Reduces garbage. -- MOS_MIGRATED_REVID=109914243
* Allow %package(@foo//bar)%/path for cxx builtin include dirs.Gravatar Brian Silverman2015-11-18
| | | | | | | | | | | | | This allows using compilers downloaded in *_repository rules without ugly hacks like symlinks to bazel-out/../../external. I manually tested all of the %prefix%s which this refactors the implementations of. -- Change-Id: Ie9931dfbed646b8b5c9cd7fba5e6df5cf0baa1f2 Reviewed-on: https://bazel-review.googlesource.com/#/c/2200 MOS_MIGRATED_REVID=108139097
* When getting package roots for exec paths, don't start with the file, which ↵Gravatar Janak Ramakrishnan2015-11-13
| | | | | | | is guaranteed not to be a package. Instead, start with its parent. This will be faster and take less memory. -- MOS_MIGRATED_REVID=107725767
* Make C++ builds work on OS X.Gravatar Lukacs Berki2015-10-30
| | | | | | | Fixes #538. -- MOS_MIGRATED_REVID=106674650
* Force hdrs_check to "strict", remove "hdrs_check" attribute from cc_* rules.Gravatar Philipp Wollermann2015-10-27
| | | | | | | RELNOTES: Bazel does strict validation of include files now to ensure correct incremental builds. If you see compilation errors when building C++ code, please make sure that you explicitly declare all header files in the srcs or hdrs attribute of your cc_* targets and that your cc_* targets have correct "deps" on cc_library's that they use. -- MOS_MIGRATED_REVID=106410969
* Refactor include scanning / .d file parsing in the C++ rules so that ↵Gravatar Philipp Wollermann2015-10-27
| | | | | | | validating includes and updating action inputs is clearly separated and easier to understand now. -- MOS_MIGRATED_REVID=106298050
* Have @SkylarkCallable methods accept Iterable instead of CollectionGravatar Francois-Rene Rideau2015-10-22
| | | | | | | This makes it possible to call these methods with lists from Skylark, which are internally Iterable<>'s but not Collection<>'s. -- MOS_MIGRATED_REVID=106003065
* Add %crosstool_top% metasyntax for builtin cxx include directories.Gravatar Googler2015-10-20
| | | | | | | | | | | | Instead of two metasyntactic variables and one random bit of magic which changes relative paths to be children of crosstool, we now have three consistent pieces of metasyntax; except that since we can't actually remove the old syntax, we have either way for the time being. RELNOTES[NEW]: accept %crosstool_top% in cxx_builtin_include_directory -- MOS_MIGRATED_REVID=105854779
* Allow relative CxxBuiltinDirectories not just under crosstool or sysroot.Gravatar Googler2015-10-20
| | | | | | | | | | cxx_builtin_include directories which start with "%workspace%/" are taken to be relative to the build workspace, and not relative to crosstool-top. RELNOTES[NEW]: cpxx_builtin_include_directory specifications allow more flexibility. -- MOS_MIGRATED_REVID=105789270
* Expose link flags to SkylarkGravatar Googler2015-10-19
| | | | | -- MOS_MIGRATED_REVID=105624527
* 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
* Make sure disabled FDO features are filtered out.Gravatar Googler2015-09-21
| | | | | | | Without this, the FDO features enabled under --fdo* blaze options are not removed when BUILD files contain "features = ['-fdo_instrument', '-fdo_optimize']". -- MOS_MIGRATED_REVID=103431508
* Parse the label syntax "@//a:b" so that eventually we can make that the ↵Gravatar Lukacs Berki2015-09-15
| | | | | | | | | syntax that means "refer to the main repository". There isn't an overarching plan for what we are going to do with the cmdline package, which seems to be separated from the .syntax one in all sorts of awkward ways. -- MOS_MIGRATED_REVID=103088960
* Resolve TODO now that the feature configuration supports conditional expansionGravatar Manuel Klimek2015-08-12
| | | | | | | of flag sets. -- MOS_MIGRATED_REVID=100400672
* Convert the coverage flags to use the feature configuration.Gravatar Manuel Klimek2015-08-11
| | | | | -- MOS_MIGRATED_REVID=100281959
* Removed BuildConfiguration.Fragment#getName() and #isSkylarkVisible().Gravatar Florian Weikert2015-08-05
| | | | | | | Instead, the SkylarkModule annotation is being used to identify fragments that are visible in Skylark. -- MOS_MIGRATED_REVID=99930512
* Hard disable C++ include scanning in Bazel (which wasn't supported anyway, ↵Gravatar Philipp Wollermann2015-08-05
| | | | | | | but due to the flag default value being true, some code behaved as if it was). -- MOS_MIGRATED_REVID=99913146
* Skylark: In addition to using ctx.configuration.fragment(CONF), the build ↵Gravatar Florian Weikert2015-07-30
| | | | | | | configuration can now be accessed via ctx.configuration.CONF where CONF is in {cpp, jvm, java}. -- MOS_MIGRATED_REVID=99470271
* Support coverage in experimental_ios_test.Gravatar Peter Schmitt2015-07-29
| | | | | | | | | | | Coverage depends on quite a few moving parts, several of which were changed for this test: - BuildConfiguration.getCoverageLabels() used to include gcov support, this is now replaced by the dedicated getGcovLabels() and a separate implicit attribute on TestBaseRule. This new attribute is then overridden in ExperimentalIosTest to use an xcode-compatible gcov. - Objc's TestSupport now correctly registers instrumented files and sets the necessary runfiles for collecting coverage. - ios_test's template exports gcda files for coverage computation after the test's execution. -- MOS_MIGRATED_REVID=99374435
* Rollforward of []: Blaze changes to support LLVM profile feedbackGravatar Googler2015-07-23
| | | | | | | Rollback of commit b961bb931400044ed91e6b0b596f94fe983f9f17. -- MOS_MIGRATED_REVID=98833728
* Rollback of commit 69d20b26b50360221849a4860265150f9c66ef25.Gravatar Lukacs Berki2015-07-17
| | | | | | | | | | | | | *** Reason for rollback *** Breaks LIPO, [] *** Original change description *** Blaze changes to support LLVM profile feedback. -- MOS_MIGRATED_REVID=98382087
* Get rid of legacy default features that are not needed any more.Gravatar Manuel Klimek2015-07-07
| | | | | -- MOS_MIGRATED_REVID=97675547
* Blaze changes to support LLVM profile feedback.Gravatar Googler2015-07-07
| | | | | -- MOS_MIGRATED_REVID=97610963
* Eliminate BuildConfiguration.getShortName().Gravatar Lukacs Berki2015-06-29
| | | | | | | This was only used in error reporting, and the interface of BuildConfiguration could use some more simplicity. The comment on BuildConfiguration.getShortName() was confusing: that field is *not* actually used to compute the output directory name, which took me a few minutes to realize. -- MOS_MIGRATED_REVID=97128287
* Remove BuildConfiguration.cacheKey() and replace .shortCacheKey() with a ↵Gravatar Lukacs Berki2015-06-29
| | | | | | | | | | | .checksum() method that is computed from the checksum of the build options. Also remove Fragment.cacheKey() and Fragment.getName(). The reasoning is that within a single build, if two BuildConfigurations share the same BuildOptions, they must be the same because BuildConfiguration can only be a function of BuildOptions, specific targets (which stay the same during a build) and BlazeDirectories (which stay the same during the lifetime of a server). Between different builds if the configurations are recreated, they will always be considered different because Java reference equality (==) is used for comparing BuildConfigurations. Also remove "Serializable" tags from configuration-related things. -- MOS_MIGRATED_REVID=97107881
* Setup FDO command-line options via feature configurations.Gravatar Googler2015-06-25
| | | | | -- MOS_MIGRATED_REVID=96835732
* Tag genrules as requiring darwin if they use a mac toolchain.Gravatar Peter Schmitt2015-06-17
| | | | | -- MOS_MIGRATED_REVID=96128887
* Expose libc string to SkylarkGravatar Googler2015-06-15
| | | | | -- MOS_MIGRATED_REVID=95859604
* Expose CppConfiguration tool paths to SkylarkGravatar Googler2015-06-12
| | | | | -- MOS_MIGRATED_REVID=95782228
* 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
* Add the --sysroot argument even if it is the default for the particular ↵Gravatar Lukacs Berki2015-06-01
| | | | | | | | | Crosstool. This makes integrating Bazel with an external Android NDK less complex, and removes a special-case from the behavior of Bazel, which is always good. -- MOS_MIGRATED_REVID=94893919
* Expose more CppConfiguration functions to Skylark.Gravatar Laurent Le Brun2015-05-22
| | | | | -- MOS_MIGRATED_REVID=94274156
* 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
* Add --compiler support for configurable attributes.Gravatar Greg Estren2015-05-15
| | | | | | | | | | Just like --cpu, the default needs to be pulled in from CROSSTOOL, not the flag default. Fixes #148 -- MOS_MIGRATED_REVID=93648261
* Remove make variable GNU_TARGET from blaze.Gravatar Han-Wen Nienhuys2015-04-14
| | | | | -- MOS_MIGRATED_REVID=90994015
* Remove unnecessary -B flag from linker command line.Gravatar Han-Wen Nienhuys2015-04-08
| | | | | | | | | | | Relative to the last try, add -B to Linux CROSSTOOL entry, and test the result on OSX and Linux. This should fix working with GCC cross compilers installed into /usr/bin/ next to the host ld. -- MOS_MIGRATED_REVID=90605463
* Fix build failure when using older crosstool that doesn't have stdc-predef.h.Gravatar Janak Ramakrishnan2015-04-08
| | | | | | | | | We used to unconditionally add this file, but that doesn't make sense for crosstools that don't have it. Long-term, we need to get the name of this file from the CROSSTOOL file. I was unable to test this because getting all of an older crosstool's dependencies into a test was too hard. But I manually verified that it works. -- MOS_MIGRATED_REVID=90533610
* Automated [] rollback of [].Gravatar Han-Wen Nienhuys2015-04-03
| | | | | | | | | | | | | | | | *** Reason for rollback *** Breaks bazel for /usr/bin/gcc. It needs -B to find ld, because we don't supply a $PATH. *** Original change description *** Remove unnecessary -B flag from linker command line. This should fix working with GCC cross compilers installed into /usr/bin/ next to the host ld. -- MOS_MIGRATED_REVID=90173200
* Remove unnecessary -B flag from linker command line.Gravatar Han-Wen Nienhuys2015-04-03
| | | | | | | | This should fix working with GCC cross compilers installed into /usr/bin/ next to the host ld. -- MOS_MIGRATED_REVID=90167821
* Unconditionally include gcc's stdc-predef.h if it is available.Gravatar Janak Ramakrishnan2015-03-31
| | | | | -- MOS_MIGRATED_REVID=89964638