Commit Graph

8 Commits

Author SHA1 Message Date
区长
c44791c89d
Fix LLDB can't work with --build-id (#336) 2020-02-04 13:57:40 -08:00
Dan Field
8d73ea7887
enable LTO builds for Fuchsia (#309) 2019-09-04 16:17:44 -07:00
Dan Field
781bda8eb2
enable LTO builds for Fuchsia (#308) 2019-09-04 16:03:56 -07:00
Chinmay Garde
5a33d6ab06
Track toolchain headers to detect toolchain updates instead of macro. (#302)
To detect and rebuild all TUs on toolchain updates, we inherited a rule from
Chromium whereby the Git SHA of the //buildtools repo would be used to insert a
preprocessor define in each TUs build invocation. But we don't use a
//buildtools as a repo anymore. Instead buildtools comes from CIPD. So the
script now picks the //buildroot revision instead. But we don't specify the
toolchain revision in that repo either though. It is instead specified in the
engine. So if the engine updates the toolchain, only the next (unrelated)
//buildroot rev will ensure all old TUs are rebuilt unless the `out` directory
is cleared on each invocation.

This patch replaces the old buggy technique with one where the system headers
(that include headers in buildtools) are tracked in addition to user headers.
When the toolchain updates, these "system" header timestamps will be invalidated
and the old artifacts invalidate.

The simple change of just tracking the //flutter (where the toolchain SHA is
present) would make it so that each engine change (frequent) would rebuild all
TUs instead of just each buildtools change (rarer). Also, this technique would
leave us susceptible to the kind of issue that led us in this situation in the
first place.

I also just searched and replaced all calls to track user dependencies with ones
to track system + user dependencies. Not all toolchain are actually being used.
We should clean these up in a separate patch.
2019-08-16 13:01:07 -07:00
Kaushik Iska
b38202eea5
[fuchsia] aarch64 and arm64 are different (#284) 2019-07-29 18:29:35 -07:00
Kaushik Iska
b5f4eabbaf
[fuchsia] Add support for arm64 architectures (#282) 2019-07-29 15:52:31 -07:00
Chinmay Garde
d7b8d34745
Match conventions used by Fuchsia buildroot for SDK builds. (#246)
The following changes have been made:

* In //build/fuchsia/sdk.gni: fuchsia_sdk has been renamed to fuchsia_sdk_root.
* //build/fuchsia/sdk.gni is no longer implicitly imported and must be imported by GN files explicitly once the is_fuchsia check is done.
* Since SDK part names are not guaranteed to be unique, the sysroot, fidl and CC parts are each put in their own directories.
2019-05-03 16:15:15 -07:00
Chinmay Garde
7907498ca2
Prepare buildroot for working with Fuchsia SDK defined targets. (#239)
This prepares the buildroot to stamp GN targets for Fuchsia SDK defined targets.

GN templates have been created in //build/fuchsia/fuchsia.gni that
can read the JSON metadata that describes the vended SDK.

GN targets that describe all known SDK parts (as described in the SDK
manifest) can be instantiated in one shot by defining a top level fuchsia_sdk
target. This stamping needs to happen once and can be done anywhere (currenly
in //build/fuchsia/BUILD.gn). Once stamped, targets that depend on
specific Fuchsia SDK parts need to explicitly depend on them by using the
name of that part. For example, depending on the :fuchsia.images part of the
SDK will generate headers for all fidl files in that part, compile any source
libraries and link the required dynamic libraries into the executable. Unlike regular
targets, this target does not exist in a GN file. The name must be looked up
from JSON manifest. This scheme seems to work well but is not resilient
to part name collision.

So that SDK and non-SDK Fuchsia builds may co-exist till the migration is done,
the is_fuchsia_sdk GN variable and FUCHSIA_SDK preprocessor defines are
set in all Fuchsia SDK builds. This allows code to target both variants. It is
the hope that the non SDK variant will be turned down and the Flutter team
assumes ownership of this component.
2019-04-30 14:36:43 -07:00