Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

[Fuchsia] Remove the use of //build/ in fuchsia #51072

Merged
merged 54 commits into from
Mar 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
3b0a191
remove
zijiehe-google-com Feb 28, 2024
8c72cee
Merge branch 'main' into main
zijiehe-google-com Mar 6, 2024
354f603
Merge branch 'main' into main
zijiehe-google-com Mar 7, 2024
68c57b3
env
zijiehe-google-com Mar 6, 2024
2af6427
fuchsia_gn_sdk
zijiehe-google-com Mar 7, 2024
5fac7ca
deps
zijiehe-google-com Mar 7, 2024
3cf4cf2
Merge branch 'main' into main
zijiehe-google-com Mar 7, 2024
ce46f68
deps
zijiehe-google-com Mar 7, 2024
c815089
import
zijiehe-google-com Mar 7, 2024
8e8832c
fuchsia_sdk_root -> fuchsia_sdk
zijiehe-google-com Mar 7, 2024
140321e
using_fuchsia_sdk
zijiehe-google-com Mar 7, 2024
3dbf579
arch_root
zijiehe-google-com Mar 7, 2024
ec1d40e
fuchsia_sdk_path -> fuchsia_sdk
zijiehe-google-com Mar 7, 2024
d8a3f6f
pkg: -> pkg/ ; fidl: -> fidl/
zijiehe-google-com Mar 7, 2024
593da97
DEPS
zijiehe-google-com Mar 7, 2024
0e69cb1
format
zijiehe-google-com Mar 7, 2024
bf2c1ed
wrong location
zijiehe-google-com Mar 7, 2024
319497d
format
zijiehe-google-com Mar 7, 2024
49a33e1
wrong zircon location
zijiehe-google-com Mar 7, 2024
d45e590
Merge branch 'main' into main
zijiehe-google-com Mar 7, 2024
114b9b5
missing changes
zijiehe-google-com Mar 7, 2024
058a499
Merge branch 'main' into main
zijiehe-google-com Mar 7, 2024
42cb2f2
deps
zijiehe-google-com Mar 7, 2024
e847174
deps
zijiehe-google-com Mar 8, 2024
1c86d9b
remove unnecessary gn_configs
zijiehe-google-com Mar 8, 2024
85f6638
Merge branch 'main' into main
zijiehe-google-com Mar 8, 2024
52b314b
gn-sdk
zijiehe-google-com Mar 8, 2024
d867460
Merge branch 'main' into main
zijiehe-google-com Mar 11, 2024
e6216a5
compile
zijiehe-google-com Mar 11, 2024
cc9852c
Merge branch 'main' into main
zijiehe-google-com Mar 11, 2024
af06009
Merge branch 'main' into main
zijiehe-google-com Mar 11, 2024
69c6dd9
_cpp
zijiehe-google-com Mar 11, 2024
332fd6a
merge
zijiehe-google-com Mar 11, 2024
20cea5d
condition
zijiehe-google-com Mar 11, 2024
2ed3614
Merge branch 'main' into main
zijiehe-google-com Mar 11, 2024
b0de6a5
deps
zijiehe-google-com Mar 11, 2024
94d9b26
condition
zijiehe-google-com Mar 11, 2024
12e7625
Merge branch 'main' into main
zijiehe-google-com Mar 11, 2024
538e8a7
Merge remote-tracking branch 'upstream/main'
zijiehe-google-com Mar 11, 2024
76f3b73
Merge branch 'main' into main
zijiehe-google-com Mar 11, 2024
56f6fa2
update license
zijiehe-google-com Mar 12, 2024
2c21e92
condition
zijiehe-google-com Mar 12, 2024
91c3389
support os
zijiehe-google-com Mar 12, 2024
bb7801a
condition
zijiehe-google-com Mar 12, 2024
fe0df9c
gn
zijiehe-google-com Mar 12, 2024
e4d0b17
wrong location
zijiehe-google-com Mar 12, 2024
9e928f6
format
zijiehe-google-com Mar 12, 2024
7aa1ac1
download_fuchsia_deps
zijiehe-google-com Mar 13, 2024
d321a75
update dart
zijiehe-google-com Mar 15, 2024
c71c6a7
Merge remote-tracking branch 'upstream/main'
zijiehe-google-com Mar 15, 2024
a03541e
merge
zijiehe-google-com Mar 15, 2024
3b9d2a8
license
zijiehe-google-com Mar 15, 2024
f0ffbbc
licenses
zijiehe-google-com Mar 15, 2024
b733e37
unexpected change
zijiehe-google-com Mar 15, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 27 additions & 10 deletions DEPS
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ vars = {
# Dart is: https://github.com/dart-lang/sdk/blob/main/DEPS
# You can use //tools/dart/create_updated_flutter_deps.py to produce
# updated revision list of existing dependencies.
'dart_revision': '70ca2323a702b1326c9c55943186e4e2fc58c3c8',
'dart_revision': '406955fe69503eb11fb16a8405534a979f5eef60',

# WARNING: DO NOT EDIT MANUALLY
# The lines between blank lines above and below are generated by a script. See create_updated_flutter_deps.py
Expand Down Expand Up @@ -107,6 +107,12 @@ vars = {
# //flutter/tools/gn.
'mac_sdk_min': '10.14',

# Checkout Fuchsia dependencies only on Linux. This is the umbrella flag which
# controls the behavior of all fuchsia related flags. I.e. any fuchsia related
# logic or condition may not work if this flag is False.
# TODO(zijiehe): Make this condition more strict to only download fuchsia
# dependencies when necessary: b/40935282
'download_fuchsia_deps': 'host_os == "linux"',
# Downloads the fuchsia SDK as listed in fuchsia_sdk_path var. This variable
# is currently only used for the Fuchsia LSC process and is not intended for
# local development.
Expand Down Expand Up @@ -261,7 +267,7 @@ vars = {

# The version / instance id of the cipd:chromium/fuchsia/gn-sdk which will be
# used altogether with fuchsia-sdk to generate gn based build rules.
'fuchsia_gn_sdk_version': 'l8zShEOXGGjtLYRulEX5CjT2RemKvUPOT6L-uXy41tMC',
'fuchsia_gn_sdk_version': 'RgErspyYHapUO2SpcW-vo2p8yaRUMUrq0eWjRVPfQjoC',
}

gclient_gn_args_file = 'src/third_party/dart/build/config/gclient_args.gni'
Expand Down Expand Up @@ -359,7 +365,7 @@ deps = {
Var('dart_git') + '/args.git@7dc7fe0430709229ccc87c3eaae729aeffe10c56',

'src/third_party/dart/third_party/pkg/async':
Var('dart_git') + '/async.git@1556660ca5159d84bf28239825a25dca58f1fde3',
Var('dart_git') + '/async.git@6cdbc41631054870318ae28baea2c62cf2a91945',

'src/third_party/dart/third_party/pkg/bazel_worker':
Var('dart_git') + '/bazel_worker.git@8619b92baa9959e55b9fc49d2afcd6dda2ec1c10',
Expand Down Expand Up @@ -407,7 +413,7 @@ deps = {
Var('dart_git') + '/html.git@327e37a6a4dd46599737ee982f280d73a8f646f7',

'src/third_party/dart/third_party/pkg/http':
Var('dart_git') + '/http.git@8da6e0ea5d67a08f98a14137e0d2bdcb113ae4ba',
Var('dart_git') + '/http.git@8d3c64747f9a6d99b29558b6e612dee83db7cdbb',

'src/third_party/dart/third_party/pkg/http_multi_server':
Var('dart_git') + '/http_multi_server.git@ba9d07f3596b24718ddf45c9e071d40879cca565',
Expand All @@ -428,7 +434,7 @@ deps = {
Var('dart_git') + '/logging.git@7a7bd5e31ddfe23e34d37ded82d6d0cd5706862c',

'src/third_party/dart/third_party/pkg/markdown':
Var('dart_git') + '/markdown.git@9c6b1afc3721571af37eaaefe043a6ae7637bd09',
Var('dart_git') + '/markdown.git@1ca51664e7b1b7fe789f6be2668c909ce3aea342',

'src/third_party/dart/third_party/pkg/matcher':
Var('dart_git') + '/matcher.git@d954c8d979579b4b46427b0ea1d9c721117c191e',
Expand Down Expand Up @@ -491,7 +497,7 @@ deps = {
Var('dart_git') + '/term_glyph.git@85a4aa6bf25cd6ecaa5c56a1b259b2d95264a439',

'src/third_party/dart/third_party/pkg/test':
Var('dart_git') + '/test.git@ba64bbbaa26f09e139c26f9ad6409995806aac6e',
Var('dart_git') + '/test.git@7724aabe8cd40b376573330f5227a6ec0a47f28e',

'src/third_party/dart/third_party/pkg/test_reflective_loader':
Var('dart_git') + '/test_reflective_loader.git@9862703a3d14848376c8efde271c88022fba91eb',
Expand Down Expand Up @@ -1013,7 +1019,7 @@ deps = {
'version': 'da-siZ7wPDA0Z0wXJOEBxKat7HqQz9B3rXqV8wblgz8C'
}
],
'condition': 'host_os == "linux" and not download_fuchsia_sdk',
'condition': 'download_fuchsia_deps and not download_fuchsia_sdk',
'dep_type': 'cipd',
},

Expand All @@ -1024,7 +1030,7 @@ deps = {
'version': Var('fuchsia_test_scripts_version'),
}
],
'condition': 'run_fuchsia_emu',
'condition': 'download_fuchsia_deps',
'dep_type': 'cipd',
},

Expand All @@ -1035,6 +1041,7 @@ deps = {
'version': Var('fuchsia_gn_sdk_version'),
}
],
'condition': 'download_fuchsia_deps',
'dep_type': 'cipd',
},

Expand Down Expand Up @@ -1128,7 +1135,7 @@ hooks = [
{
'name': 'Download Fuchsia SDK',
'pattern': '.',
'condition': 'download_fuchsia_sdk',
'condition': 'download_fuchsia_deps and download_fuchsia_sdk',
'action': [
'python3',
'src/flutter/tools/download_fuchsia_sdk.py',
Expand Down Expand Up @@ -1239,5 +1246,15 @@ hooks = [
'--as-gclient-hook',
Var('mac_sdk_min')
]
}
},
{
'name': 'Generate Fuchsia GN build rules',
'pattern': '.',
'condition': 'download_fuchsia_deps',
'action': [
'python3',
'src/flutter/tools/fuchsia/with_envs.py',
'src/flutter/tools/fuchsia/test_scripts/gen_build_defs.py',
],
},
]
68 changes: 31 additions & 37 deletions build/config/fuchsia/gn_configs.gni
Original file line number Diff line number Diff line change
Expand Up @@ -2,49 +2,40 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

# TODO(richkadel): added this import and modified the fuchsia_sdk assignment.
# See below.
import("//build/fuchsia/sdk.gni")
declare_args() {
# Path to the fuchsia SDK. This is intended for use in other templates & rules
# to reference the contents of the fuchsia SDK.
fuchsia_sdk = "$fuchsia_sdk_path"

# TODO(richkadel): Since flutter needs build rules from the GN SDK, but also
# requires the Fuchsia _Core_ SDK (for dart libraries, in the core SDK, but
# excluded from the GN SDK), the Fuchsia SDK assumption that the build files
# are in the same SDK directory path as the APIs does not hold true. (And
# there are a couple of other minor tweaks that appear to be needed, at
# this time.) This use case will be discussed with the SDK team, to see if we
# can come up with a cleaner solution.
# This file is copied from
# https://crsrc.org/c/build/config/fuchsia/gn_configs.gni?q=gn_configs.gni
# with some local modifications to match the flutter setup.

# Build ID uniquely identifying the Fuchsia IDK. This is exposed as a property so
# it can be used to locate images and packages on GCS and as a marker to indicate the
# "version" of the IDK. If it is empty, then it is most likely that something is fatally wrong.
declare_args() {
# Path to the fuchsia SDK. This is intended for use in other templates &
# rules to reference the contents of the fuchsia SDK.
fuchsia_sdk = "//fuchsia/sdk/$host_os"

# ID uniquely identifying the Fuchsia IDK build. This is exposed as a
# property so it can be used to locate images and packages on GCS and
# as a marker to indicate the "version" of the IDK.
# Defaults to the id found in the manifest.json file of the SDK.
fuchsia_sdk_id = ""
}

declare_args() {
# The SDK manifest file. This is useful to include as a dependency
# for some targets in order to cause a rebuild when the version of the
# SDK is changed.
fuchsia_sdk_manifest_file = "$fuchsia_sdk/meta/manifest.json"
# TODO(zijiehe): Remove the override and move it into declare_args once the one
# in //build/config/sdk.gni being removed. - b/40935282

# fuchsia_tool_dir is use to specify the directory in the SDK to locate tools for the
# host cpu architecture. If the host_cpu is not recognized, then tool dir
# defaults to x64.
fuchsia_tool_dir = "$fuchsia_sdk/tools/x64"
if (host_cpu == "x64" || host_cpu == "arm64") {
fuchsia_tool_dir = "${fuchsia_sdk}/tools/${host_cpu}"
}
# The target API level for this repository. Embedders should override this
# value to specify the API level the packages produced from this repository
# should be targeting, e.g. in their top-level //.gn file. A value of -1
# means that no API level will be passed to the tools that consumes it.
fuchsia_target_api_level = 16

# fuchsia_auto_index_symbols when true adds the ids.txt file generated from a `fuchsia_package`
# to the Fuchsia symbol index used to symbolize logs and to find source when using zxdb.
# The default value is false, in order to be backwards compatibility with existing builds, and
# only makes sense to set to true when building as a developer that will need to symbolize logs
# or use the debugger with locally build code.
fuchsia_auto_index_symbols = false
}
# The SDK manifest file. This is useful to include as a dependency
# for some targets in order to cause a rebuild when the version of the
# SDK is changed.
fuchsia_sdk_manifest_file = "${fuchsia_sdk}/meta/manifest.json"

# fuchsia_tool_dir is used to specify the directory in the SDK to locate
# tools for the host cpu architecture. If the host_cpu is not recognized,
# then tool dir defaults to x64.
fuchsia_tool_dir = "${fuchsia_sdk}/tools/${host_cpu}"

if (fuchsia_sdk_id == "") {
# Note: If we need to expose more than just the id in the future,
Expand All @@ -64,3 +55,6 @@ declare_args() {
fuchsia_sdk_readelf_exec = ""
}
}

# third_party/googletest is still using this condition.
using_fuchsia_sdk = true
6 changes: 3 additions & 3 deletions build/secondary/flutter/third_party/googletest/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# found in the LICENSE file.

if (is_fuchsia) {
import("//build/fuchsia/sdk.gni")
import("//flutter/tools/fuchsia/gn-sdk/src/gn_configs.gni")
}

config("gtest_private_config") {
Expand Down Expand Up @@ -34,8 +34,8 @@ static_library("gtest") {
if (is_fuchsia) {
if (using_fuchsia_sdk) {
deps = [
"$fuchsia_sdk_root/pkg:fdio",
"$fuchsia_sdk_root/pkg:zx",
"${fuchsia_sdk}/pkg/fdio",
"${fuchsia_sdk}/pkg/zx",
]
} else {
deps = [
Expand Down
1 change: 0 additions & 1 deletion ci/licenses_golden/excluded_files
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,6 @@
../../../flutter/shell/platform/fuchsia/dart_runner/.gitignore
../../../flutter/shell/platform/fuchsia/dart_runner/README.md
../../../flutter/shell/platform/fuchsia/dart_runner/embedder/pubspec.yaml
../../../flutter/shell/platform/fuchsia/dart_runner/fidl/meta.json
../../../flutter/shell/platform/fuchsia/dart_runner/kernel/libraries.json
../../../flutter/shell/platform/fuchsia/dart_runner/kernel/libraries.yaml
../../../flutter/shell/platform/fuchsia/dart_runner/tests
Expand Down
4 changes: 2 additions & 2 deletions ci/licenses_golden/licenses_dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Signature: c01d057033e277986624c640f663a410
Signature: 6dada66d64680541f83bc84b71ddf2bb

====================================================================================================
LIBRARY: dart
Expand Down Expand Up @@ -4751,7 +4751,7 @@ Exhibit B - "Incompatible With Secondary Licenses" Notice
This Source Code Form is "Incompatible With Secondary Licenses", as
defined by the Mozilla Public License, v. 2.0.

You may obtain a copy of this library's Source Code Form from: https://dart.googlesource.com/sdk/+/d006b668dcb252171d743526e2a2f3ba34f0c48e
You may obtain a copy of this library's Source Code Form from: https://dart.googlesource.com/sdk/+/406955fe69503eb11fb16a8405534a979f5eef60
/third_party/fallback_root_certificates/

====================================================================================================
Expand Down
11 changes: 6 additions & 5 deletions display_list/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,14 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

import("//build/fuchsia/sdk.gni")
import("//flutter/common/config.gni")
import("//flutter/impeller/tools/impeller.gni")
import("//flutter/testing/testing.gni")

if (is_fuchsia) {
import("//flutter/tools/fuchsia/gn-sdk/src/gn_configs.gni")
}

config("display_list_config") {
defines = []

Expand Down Expand Up @@ -142,8 +145,7 @@ if (enable_unittests) {
# This is needed for //flutter/third_party/googletest for linking zircon
# symbols.
if (is_fuchsia) {
libs =
[ "${fuchsia_sdk_path}/arch/${target_cpu}/sysroot/lib/libzircon.so" ]
libs = [ "${fuchsia_arch_root}/sysroot/lib/libzircon.so" ]
}
}

Expand Down Expand Up @@ -174,8 +176,7 @@ if (enable_unittests) {
# This is needed for //flutter/third_party/googletest for linking zircon
# symbols.
if (is_fuchsia) {
libs =
[ "${fuchsia_sdk_path}/arch/${target_cpu}/sysroot/lib/libzircon.so" ]
libs = [ "${fuchsia_arch_root}/sysroot/lib/libzircon.so" ]
}
}

Expand Down
5 changes: 4 additions & 1 deletion flow/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,15 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

import("//build/fuchsia/sdk.gni")
import("//flutter/common/config.gni")
import("//flutter/impeller/tools/impeller.gni")
import("//flutter/shell/config.gni")
import("//flutter/testing/testing.gni")

if (is_fuchsia) {
import("//flutter/tools/fuchsia/gn-sdk/src/gn_configs.gni")
}

source_set("flow") {
sources = [
"compositor_context.cc",
Expand Down
32 changes: 17 additions & 15 deletions fml/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,13 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

import("//build/fuchsia/sdk.gni")
import("//flutter/common/config.gni")
import("//flutter/testing/testing.gni")

if (is_fuchsia) {
import("//flutter/tools/fuchsia/gn-sdk/src/gn_configs.gni")
}

source_set("fml") {
sources = [
"ascii_trie.cc",
Expand Down Expand Up @@ -227,16 +230,16 @@ source_set("fml") {
]

public_deps += [
"$fuchsia_sdk_root/fidl:fuchsia.diagnostics",
"$fuchsia_sdk_root/fidl:fuchsia.logger",
"$fuchsia_sdk_root/pkg:async-cpp",
"$fuchsia_sdk_root/pkg:async-loop-cpp",
"$fuchsia_sdk_root/pkg:async-loop-default",
"$fuchsia_sdk_root/pkg:component_incoming_cpp",
"$fuchsia_sdk_root/pkg:syslog_structured_backend",
"$fuchsia_sdk_root/pkg:trace",
"$fuchsia_sdk_root/pkg:trace-engine",
"$fuchsia_sdk_root/pkg:zx",
"${fuchsia_sdk}/fidl/fuchsia.diagnostics:fuchsia.diagnostics_cpp",
"${fuchsia_sdk}/fidl/fuchsia.logger:fuchsia.logger_cpp",
"${fuchsia_sdk}/pkg/async-cpp",
"${fuchsia_sdk}/pkg/async-loop-cpp",
"${fuchsia_sdk}/pkg/async-loop-default",
"${fuchsia_sdk}/pkg/component_incoming_cpp",
"${fuchsia_sdk}/pkg/syslog_structured_backend",
"${fuchsia_sdk}/pkg/trace",
"${fuchsia_sdk}/pkg/trace-engine",
"${fuchsia_sdk}/pkg/zx",
]
}

Expand Down Expand Up @@ -407,14 +410,13 @@ if (enable_unittests) {

if (is_fuchsia) {
deps += [
"$fuchsia_sdk_root/pkg:async-loop-testing",
"$fuchsia_sdk_root/pkg:sys_component_cpp_testing",
"${fuchsia_sdk}/pkg/async-loop-testing",
"${fuchsia_sdk}/pkg/sys_component_cpp_testing",
]

# This is needed for //flutter/third_party/googletest for linking zircon
# symbols.
libs =
[ "${fuchsia_sdk_path}/arch/${target_cpu}/sysroot/lib/libzircon.so" ]
libs = [ "${fuchsia_arch_root}/sysroot/lib/libzircon.so" ]
}
}

Expand Down
5 changes: 4 additions & 1 deletion lib/snapshot/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,16 @@
# found in the LICENSE file.

import("//build/compiled_action.gni")
import("//build/fuchsia/sdk.gni")
import("//flutter/build/bin_to_obj.gni")
import("//flutter/common/config.gni")
import("//flutter/impeller/tools/impeller.gni")
import("//flutter/lib/ui/dart_ui.gni")
import("$dart_src/utils/compile_platform.gni")

if (is_fuchsia) {
import("//flutter/tools/fuchsia/gn-sdk/src/gn_configs.gni")
}

# Generates the Dart/Flutter core platform files and tools.
#
# This target generates the platform-specific snapshots and snapshot-related
Expand Down
5 changes: 4 additions & 1 deletion lib/ui/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,15 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

import("//build/fuchsia/sdk.gni")
import("//flutter/common/config.gni")
import("//flutter/impeller/tools/impeller.gni")
import("//flutter/shell/config.gni")
import("//flutter/testing/testing.gni")

if (is_fuchsia) {
import("//flutter/tools/fuchsia/gn-sdk/src/gn_configs.gni")
}

source_set("ui") {
cflags = [
# Dart gives us doubles. Skia and Impeller work in floats.
Expand Down
Loading