Commit Graph

577 Commits

Author SHA1 Message Date
lberki 21b2542b61 Mark the default_target_cpu field in CROSSTOOL deprecated.
It hasn't been used since a while.

RELNOTES: None.
PiperOrigin-RevId: 162215841
2019-01-09 08:53:26 +01:00
hlopko 94ad5f559a Make C++ archiving use action_configs instead of hardcoded flags
RELNOTES: Use action_config in crosstool for static library archiving, remove ar_flag.
PiperOrigin-RevId: 157685703
2019-01-09 08:53:14 +01:00
jfield e975b380fb Automated rollback of commit 6dbdb050cb.
*** Reason for rollback ***

b/37401971

*** Original change description ***

Make C++ archiving use action_configs instead of hardcoded flags

RELNOTES: Use action_config in crosstool for static library archiving, remove ar_flag.
PiperOrigin-RevId: 153344597
2019-01-09 08:53:04 +01:00
hlopko 6dbdb050cb Make C++ archiving use action_configs instead of hardcoded flags
RELNOTES: Use action_config in crosstool for static library archiving, remove ar_flag.
PiperOrigin-RevId: 153046587
2019-01-09 08:52:53 +01:00
Googler ad6e1ca6c5 Add a boolean flag to a Feature to specify whether it is enabled by default.
This enables us to configure default features for each toolchain without having
to hard-code anything in class such as CcCommon.

PiperOrigin-RevId: 146904287
2019-01-09 08:52:42 +01:00
Googler fe7d55ba32 RELNOTES: Allow CROSSTOOL files to have linker flags specific to static shared libraries.
PiperOrigin-RevId: 146655595
2019-01-09 08:52:30 +01:00
Googler 120d8ee3a6 Create "target_os" option to make selecting on platform possible.
This flag is not meant to be set on the commandline but to be readable from a Crosstool. This makes it so //tool/cc_target_os:android and friends don't require a hardcoded Crosstool top

PiperOrigin-RevId: 144983864
2019-01-09 08:52:19 +01:00
hlopko 2aabbef2f1 Introduce expand_if_none_available to crosstool
This feature allows us to expand a flag_group when a build variable is not
available. This is helpful when migrating crosstools in a backward compatible
way (that works with released bazel as well as with bazel at HEAD).

RELNOTES: NONE.
PiperOrigin-RevId: 143955333
2019-01-09 08:52:09 +01:00
hlopko 9cc6bd0f71 Add expand_if_equal crosstool.proto message
This will be used by LibrariesToLinkValue to switch on many different types of
libraries.

RELNOTES: NONE.
PiperOrigin-RevId: 143438434
2019-01-09 08:51:57 +01:00
hlopko 460dbed363 Introduce FlagGroup.expandIfTrue, expandIfFalse
This cl adds support for expand_if_true and expand_if_false messages
to the flag_group, allowing more elegant design of build variables.
This cl also adds IntegerValue VariableValue subclass.

RELNOTES: NONE.
PiperOrigin-RevId: 140849578
2019-01-09 08:51:46 +01:00
hlopko e355a0b91c Introduce support for 'expand_if_all_available' for flag_groups in CROSSTOOL
With the recent addition of structured variables to CROSSTOOL we now need a way
how to conditionally expand various flag_groups depending on the presence of
particular build variable or its fields. This cl adds this support to flag
groups.

RELNOTES: NONE.
PiperOrigin-RevId: 139466070
2019-01-09 08:51:35 +01:00
hlopko b987fd2ae5 Introduce structured build variables in Crosstool
This cl adds a 3rd type of build variable - structs. Structs have fields, which
can hold any build variable type (including structs). In the CROSSTOOl, the
fields are accessed by the dot-notation, e.g.:

    flag_group {
      iterate_over: "libraries_to_link
      flag_group {
        iterate_over: "libraries_to_link.libraries"
        flag: "-L%{libraries_to_link.libraries.directory}"
      }
    }

As a memory optimization, we also add StructureSequences. These save us from
the overhead of individual StructureValue objects.

RELNOTES: NONE
PiperOrigin-RevId: 138851774
2019-01-09 08:51:24 +01:00
hlopko 63defbb3ed Introduce explicit iterate_over field for flag_group in Crosstool
Now flag_group can be marked with iterate_over field, that denotes for which
sequence variable the flag_group will be expanded repeatedly. This cl does that
in backwards compatible way as before, the iteration happened implicitly when the
used variable was found to be sequence at runtime. Because of that it adds some
extra code that will be removed once all the crosstools are migrated to the
explicit iteration.

RELNOTES: NONE
PiperOrigin-RevId: 138501033
2019-01-09 08:51:13 +01:00
cpeyser acfc773682 cxx_flags are not applied to objc compiles.
PiperOrigin-RevId: 134651940
2019-01-09 08:51:02 +01:00
lberki 497b184bfb Remove support for thin archives.
RELNOTES: None.
PiperOrigin-RevId: 130938527
2019-01-09 08:50:51 +01:00
cpeyser bff90cc138 Linker outputs can optionally be configured from the CROSSTOOL. Introduces infrastructure to allow other artifact categories (such as debug symbols or compiler outputs) to be defined in other changes.
PiperOrigin-RevId: 128495797
2019-01-09 08:50:40 +01:00
dmishe 5e3e5c8d64 Remove breakpad support from bazel
PiperOrigin-RevId: 125385321
2019-01-09 08:50:29 +01:00
cpeyser c3f9f8d68f Introduces action_config. Does this by:
1) Introducing the action_config message in the crosstool protobuf definition.  The only part of that definition that are implemented in this CL is the "tool" section, other parts will be implemented in future CLs.  The proto fields are here now to avoid being delayed by release cycles at each step of the implementation.

2) Refactoring the implementation of the "feature algebra" that computes the enabled features for a given toolchain.  An interface called "CrosstoolActivatable" is used to represent any participant int the feature algebra, and can be either a feature or an action_config.

PiperOrigin-RevId: 118943663
2019-01-09 08:50:19 +01:00
cpeyser 7444ecdf28 Changes to crosstool_config.proto to support dsym debug symbol and breakpad file generation.
PiperOrigin-RevId: 115376419
2019-01-09 08:50:08 +01:00
cparsons a4f5b61df4 Extend crosstool configuration to allow features to specify (expandable) environment variables to pass to actions
PiperOrigin-RevId: 111608329
2019-01-09 08:49:57 +01:00
dmarting 04d798b0d8 Rationalize copyright headers
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.

PiperOrigin-RevId: 103938715
2019-01-09 08:49:44 +01:00
klimek 8b16e7c25e Feature configuration: add a field required_variables on flag_sets.
This allows to prevent expansion of flag sets based on whether build variables
are available. If required_variables is not set, and a variable that is
referenced in the flag_set's flags is not available, the build will fail.

We need the new behavior when some input files (for example profile data in
FDO enabled builds) are only available for a subset of the translation units of
a given target.

RELNOTES: None.
PiperOrigin-RevId: 100028996
2019-01-09 08:49:33 +01:00
klimek 7918071584 Allow the feature configuration to support structured build variables of nested
list type.

RELNOTES: None.
PiperOrigin-RevId: 100024899
2019-01-09 08:49:22 +01:00
dmarting 8ac56c2bb2 Enable external contribution on protobufs.
PiperOrigin-RevId: 94079912
2019-01-09 08:49:11 +01:00
dmarting 761d3ab5f4 Automated rollback of commit 50b8a4c4d8.
*** Reason for rollback ***

PiperOrigin-RevId: 92923350
2019-01-09 08:49:00 +01:00
dmarting 50b8a4c4d8 Enable external contribution on protobufs.
PiperOrigin-RevId: 92921722
2019-01-09 08:48:49 +01:00
Florian Weikert 8034bede55 Initial empty repository 2018-12-18 12:36:22 +00:00