Skip to content

Commit 3f76120

Browse files
Move the Fuchsia SDK to //third_party/fuchsia-sdk (flutter#177118)
The //third_party/fuchsia-sdk path is expected by the build scripts for other packages in the Chromium tree such as Abseil.
1 parent 424e593 commit 3f76120

File tree

9 files changed

+16
-24
lines changed

9 files changed

+16
-24
lines changed

DEPS

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -529,7 +529,7 @@ deps = {
529529
Var('chromium_git') + '/external/github.com/GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator' + '@' + 'c788c52156f3ef7bc7ab769cb03c110a53ac8fcb',
530530

531531
'engine/src/flutter/third_party/abseil-cpp':
532-
Var('flutter_git') + '/third_party/abseil-cpp.git' + '@' + '3ff870f957d511627690f4d3601987ce40d0d97c',
532+
Var('flutter_git') + '/third_party/abseil-cpp.git' + '@' + '4cfd6e189be5108a2904c170fea64aa6eba6e9ff',
533533

534534
# Dart packages
535535
'engine/src/flutter/third_party/pkg/archive':
@@ -804,7 +804,7 @@ deps = {
804804

805805
# Get the SDK from https://chrome-infra-packages.appspot.com/p/fuchsia/sdk/core at the 'latest' tag
806806
# Get the toolchain from https://chrome-infra-packages.appspot.com/p/fuchsia/clang at the 'goma' tag
807-
'engine/src/fuchsia/sdk/linux': {
807+
'engine/src/third_party/fuchsia-sdk/sdk': {
808808
'packages': [
809809
{
810810
'package': 'fuchsia/sdk/core/linux-amd64',

engine/src/build/fuchsia/sdk.gni

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ declare_args() {
1717
using_fuchsia_gn_sdk = false
1818

1919
# The following variables are Flutter buildroot specific.
20-
fuchsia_sdk_path = "//fuchsia/sdk/$host_os"
20+
fuchsia_sdk_path = "//third_party/fuchsia-sdk/sdk"
2121
fuchsia_toolchain_path = "$buildtools_path/${host_os}-${host_cpu}/clang"
2222
}
2323

@@ -27,7 +27,7 @@ declare_args() {
2727
skia_using_fuchsia_sdk = using_fuchsia_sdk
2828
}
2929

30-
_fuchsia_sdk_path = "//fuchsia/sdk/$host_os"
30+
_fuchsia_sdk_path = fuchsia_sdk_path
3131
_fuchsia_tools_path = "${_fuchsia_sdk_path}/tools/${host_cpu}"
3232

3333
template("_fuchsia_sysroot") {

engine/src/build/toolchain/fuchsia/BUILD.gn

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ toolchain("fuchsia") {
2727
toolchain_bin =
2828
rebase_path("$buildtools_path/${host_os}-${host_cpu}/clang/bin",
2929
root_out_dir)
30-
fuchsia_sdk = rebase_path("//fuchsia/sdk/$host_os", root_out_dir)
30+
fuchsia_sdk = rebase_path("//third_party/fuchsia-sdk/sdk", root_out_dir)
3131

3232
# We can't do string interpolation ($ in strings) on things with dots in
3333
# them. To allow us to use $cc below, for example, we create copies of

engine/src/flutter/build/config/fuchsia/gn_configs.gni

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
# Path to the fuchsia SDK. This is intended for use in other templates &
1010
# rules to reference the contents of the fuchsia SDK.
11-
fuchsia_sdk = "//fuchsia/sdk/$host_os"
11+
fuchsia_sdk = "//third_party/fuchsia-sdk/sdk"
1212

1313
declare_args() {
1414
# Specify a readelf_exec path to use. If not specified, the host's system

engine/src/flutter/shell/platform/fuchsia/runtime/dart/utils/BUILD.gn

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ template("make_utils") {
6060
action("generate_build_info_cc_file") {
6161
inputs = [
6262
"build_info_in.cc",
63-
"//fuchsia/sdk/$host_os/meta/manifest.json",
63+
"//third_party/fuchsia-sdk/sdk/meta/manifest.json",
6464
"$dart_src/.git/logs/HEAD",
6565
]
6666
outputs = [ "$target_gen_dir/build_info.cc" ]

engine/src/flutter/tools/fuchsia/build_fuchsia_artifacts.py

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -50,17 +50,7 @@ def IsMac():
5050

5151

5252
def GetFuchsiaSDKPath():
53-
# host_os references the gn host_os
54-
# https://gn.googlesource.com/gn/+/main/docs/reference.md#var_host_os
55-
host_os = ''
56-
if IsLinux():
57-
host_os = 'linux'
58-
elif IsMac():
59-
host_os = 'mac'
60-
else:
61-
host_os = 'windows'
62-
63-
return os.path.join(_src_root_dir, 'fuchsia', 'sdk', host_os)
53+
return os.path.join(_src_root_dir, 'third_party', 'fuchsia-sdk', 'sdk')
6454

6555

6656
def RemoveDirectoryIfExists(path):

engine/src/flutter/tools/fuchsia/fuchsia_libs.gni

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
import("//flutter/tools/fuchsia/clang.gni")
66
import("//flutter/tools/fuchsia/gn-sdk/src/gn_configs.gni")
77

8+
fuchsia_sdk_path = "//third_party/fuchsia-sdk/sdk"
89
fuchsia_sdk_dist = "$fuchsia_arch_root/dist"
910
sysroot_lib = "$fuchsia_arch_root/sysroot/lib"
1011
sysroot_dist_lib = "$fuchsia_arch_root/sysroot/dist/lib"
@@ -85,7 +86,7 @@ if (is_asan) {
8586
]
8687
}
8788

88-
vulkan_dist = "//fuchsia/sdk/$host_os/arch/$target_cpu/dist"
89+
vulkan_dist = "$fuchsia_sdk_path/arch/$target_cpu/dist"
8990

9091
# Note that the other validation libraries in the Fuchsia SDK seem to have a bug right
9192
# now causing crashes, so it is only recommended that we use
@@ -98,7 +99,7 @@ vulkan_validation_libs = [
9899
]
99100

100101
vulkan_data_dir =
101-
"//fuchsia/sdk/$host_os/pkg/vulkan_layers/data/vulkan/explicit_layer.d"
102+
"$fuchsia_sdk_path/pkg/vulkan_layers/data/vulkan/explicit_layer.d"
102103

103104
vulkan_icds = [
104105
{

engine/src/flutter/tools/fuchsia/make_build_info.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,8 @@ def GetFlutterEngineGitRevision(buildroot):
3838

3939

4040
def GetFuchsiaSdkVersion(buildroot):
41-
with open(path.join(buildroot, 'fuchsia', 'sdk',
42-
'linux' if sys.platform.startswith('linux') else 'mac', 'meta',
43-
'manifest.json'), 'r') as fuchsia_sdk_manifest:
41+
with open(path.join(buildroot, 'third_party', 'fuchsia-sdk', 'sdk', 'meta', 'manifest.json'),
42+
'r') as fuchsia_sdk_manifest:
4443
return json.load(fuchsia_sdk_manifest)['id']
4544

4645

engine/src/flutter/tools/fuchsia/with_envs.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,9 @@ def Main():
2828
os.environ['FUCHSIA_IMAGES_ROOT'] = os.path.join(os.environ['SRC_ROOT'], 'fuchsia/images/')
2929

3030
assert platform.system() == 'Linux', 'Unsupported OS ' + platform.system()
31-
os.environ['FUCHSIA_SDK_ROOT'] = os.path.join(os.environ['SRC_ROOT'], 'fuchsia/sdk/linux/')
31+
os.environ['FUCHSIA_SDK_ROOT'] = os.path.join(
32+
os.environ['SRC_ROOT'], 'third_party/fuchsia-sdk/sdk/'
33+
)
3234
os.environ['FUCHSIA_GN_SDK_ROOT'] = os.path.join(
3335
os.environ['SRC_ROOT'], 'flutter/tools/fuchsia/gn-sdk/src'
3436
)

0 commit comments

Comments
 (0)