Skip to content

Commit 518c9e0

Browse files
authored
Remove checks for the always true using_fuchsia_sdk flag in all GN files. (flutter#17261)
1 parent 1eea062 commit 518c9e0

File tree

14 files changed

+48
-136
lines changed

14 files changed

+48
-136
lines changed

BUILD.gn

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ group("flutter") {
1919

2020
public_deps = []
2121

22-
if (!(is_fuchsia && using_fuchsia_sdk)) {
22+
if (!is_fuchsia) {
2323
public_deps += [
2424
"//flutter/lib/snapshot:generate_snapshot_bin",
2525
"//flutter/lib/snapshot:kernel_platform_files",
@@ -40,14 +40,14 @@ group("flutter") {
4040
public_deps += [ "//flutter/tools/const_finder" ]
4141
}
4242

43-
if (is_fuchsia && using_fuchsia_sdk) {
43+
if (is_fuchsia) {
4444
public_deps += [
4545
"//flutter/shell/platform/fuchsia",
4646
"//flutter/shell/testing($host_toolchain)",
4747
]
4848
}
4949

50-
if (!is_fuchsia && !is_fuchsia_host) {
50+
if (!is_fuchsia) {
5151
if (current_toolchain == host_toolchain) {
5252
public_deps += [
5353
"//flutter/flutter_frontend_server:frontend_server",

common/config.gni

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,8 @@ if (target_cpu == "arm" || target_cpu == "arm64") {
1212
import("//build/config/arm.gni")
1313
}
1414

15-
if (is_ios || is_mac) {
16-
if (using_fuchsia_sdk) {
17-
import("//build/toolchain/clang.gni")
18-
} else {
19-
import("//build/toolchain/clang_toolchain.gni")
20-
}
15+
if (is_fuchsia) {
16+
import("//build/toolchain/clang.gni")
2117
}
2218

2319
declare_args() {
@@ -64,7 +60,8 @@ if (flutter_runtime_mode == "debug") {
6460
feature_defines_list += [ "FLUTTER_RUNTIME_MODE=0" ]
6561
}
6662

67-
if (is_fuchsia && using_fuchsia_sdk) {
63+
if (is_fuchsia) {
64+
# TODO(chinmaygarde): This is always set. The macro may now be removed.
6865
feature_defines_list += [ "FUCHSIA_SDK=1" ]
6966
}
7067

common/fuchsia_config.gni

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

55
import("config.gni")
66

7-
if (is_fuchsia && using_fuchsia_sdk) {
7+
if (is_fuchsia) {
88
dart_tools_root = "//flutter/tools/fuchsia/dart"
99
fuchsia_base = "//flutter/shell/platform/fuchsia"
1010
flutter_runner_base = "$fuchsia_base/flutter/"

flow/BUILD.gn

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -86,20 +86,11 @@ source_set("flow") {
8686
"view_holder.h",
8787
]
8888

89-
if (using_fuchsia_sdk) {
90-
public_deps += [
91-
"$fuchsia_sdk_root/fidl:fuchsia.ui.app",
92-
"$fuchsia_sdk_root/fidl:fuchsia.ui.gfx",
93-
"$fuchsia_sdk_root/pkg:scenic_cpp",
94-
]
95-
} else {
96-
public_deps += [
97-
"//garnet/public/lib/ui/scenic/cpp",
98-
"//sdk/fidl/fuchsia.ui.scenic",
99-
"//topaz/public/dart-pkg/zircon",
100-
"//zircon/public/lib/zx",
101-
]
102-
}
89+
public_deps += [
90+
"$fuchsia_sdk_root/fidl:fuchsia.ui.app",
91+
"$fuchsia_sdk_root/fidl:fuchsia.ui.gfx",
92+
"$fuchsia_sdk_root/pkg:scenic_cpp",
93+
]
10394
}
10495
}
10596

fml/BUILD.gn

Lines changed: 9 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -180,25 +180,14 @@ source_set("fml") {
180180
"platform/fuchsia/paths_fuchsia.cc",
181181
]
182182

183-
if (using_fuchsia_sdk) {
184-
public_deps += [
185-
"$fuchsia_sdk_root/pkg:async-cpp",
186-
"$fuchsia_sdk_root/pkg:async-loop-cpp",
187-
"$fuchsia_sdk_root/pkg:async-loop-default",
188-
"$fuchsia_sdk_root/pkg:trace",
189-
"$fuchsia_sdk_root/pkg:trace-engine",
190-
"$fuchsia_sdk_root/pkg:zx",
191-
]
192-
} else {
193-
public_deps += [
194-
"//zircon/public/lib/async-cpp",
195-
"//zircon/public/lib/async-loop-cpp",
196-
"//zircon/public/lib/async-loop-default",
197-
"//zircon/public/lib/trace",
198-
"//zircon/public/lib/trace-engine",
199-
"//zircon/public/lib/zx",
200-
]
201-
}
183+
public_deps += [
184+
"$fuchsia_sdk_root/pkg:async-cpp",
185+
"$fuchsia_sdk_root/pkg:async-loop-cpp",
186+
"$fuchsia_sdk_root/pkg:async-loop-default",
187+
"$fuchsia_sdk_root/pkg:trace",
188+
"$fuchsia_sdk_root/pkg:trace-engine",
189+
"$fuchsia_sdk_root/pkg:zx",
190+
]
202191
}
203192

204193
if (is_win) {
@@ -278,7 +267,7 @@ executable("fml_unittests") {
278267
"//flutter/testing",
279268
]
280269

281-
if (is_fuchsia && using_fuchsia_sdk) {
270+
if (is_fuchsia) {
282271
libs = [ "${fuchsia_sdk_path}/arch/${target_cpu}/sysroot/lib/libzircon.so" ]
283272
}
284273
}

lib/snapshot/BUILD.gn

Lines changed: 6 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,7 @@ compiled_action("generate_snapshot_bin") {
3030
tool = "//third_party/dart/runtime/bin:gen_snapshot"
3131
}
3232

33-
if ((is_fuchsia || is_fuchsia_host) && !using_fuchsia_sdk) {
34-
platform_kernel =
35-
"$root_out_dir/flutter_runner_patched_sdk/platform_strong.dill"
36-
} else {
37-
platform_kernel = "$root_out_dir/flutter_patched_sdk/platform_strong.dill"
38-
}
33+
platform_kernel = "$root_out_dir/flutter_patched_sdk/platform_strong.dill"
3934

4035
inputs = [
4136
platform_kernel,
@@ -217,11 +212,7 @@ bin_to_linkable("platform_strong_dill_linkable") {
217212
deps = [
218213
":kernel_platform_files",
219214
]
220-
if ((is_fuchsia || is_fuchsia_host) && !using_fuchsia_sdk) {
221-
input = "$root_out_dir/flutter_runner_patched_sdk/platform_strong.dill"
222-
} else {
223-
input = "$root_out_dir/flutter_patched_sdk/platform_strong.dill"
224-
}
215+
input = "$root_out_dir/flutter_patched_sdk/platform_strong.dill"
225216
symbol = "kPlatformStrongDill"
226217
size_symbol = "kPlatformStrongDillSize"
227218
executable = false
@@ -283,16 +274,8 @@ compile_platform("strong_platform") {
283274
}
284275

285276
# Fuchsia's snapshot requires a different platform with extra dart: libraries.
286-
if ((is_fuchsia || is_fuchsia_host) && !using_fuchsia_sdk) {
287-
group("kernel_platform_files") {
288-
public_deps = [
289-
"//topaz/runtime/flutter_runner/kernel:kernel_platform_files",
290-
]
291-
}
292-
} else {
293-
group("kernel_platform_files") {
294-
public_deps = [
295-
":strong_platform",
296-
]
297-
}
277+
group("kernel_platform_files") {
278+
public_deps = [
279+
":strong_platform",
280+
]
298281
}

lib/ui/BUILD.gn

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -135,15 +135,11 @@ source_set("ui") {
135135
"compositing/scene_host.h",
136136
]
137137

138-
if (using_fuchsia_sdk) {
139-
deps += [
140-
"$fuchsia_sdk_root/pkg:async-cpp",
141-
"//flutter/shell/platform/fuchsia/dart-pkg/fuchsia",
142-
"//flutter/shell/platform/fuchsia/dart-pkg/zircon",
143-
]
144-
} else {
145-
deps += [ "//topaz/public/dart-pkg/zircon" ]
146-
}
138+
deps += [
139+
"$fuchsia_sdk_root/pkg:async-cpp",
140+
"//flutter/shell/platform/fuchsia/dart-pkg/fuchsia",
141+
"//flutter/shell/platform/fuchsia/dart-pkg/zircon",
142+
]
147143
}
148144
}
149145

shell/common/BUILD.gn

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,8 @@ if (is_fuchsia) {
1212
}
1313

1414
config("vulkan_config") {
15-
if (using_fuchsia_sdk) {
15+
if (is_fuchsia) {
1616
include_dirs = [ "$fuchsia_sdk_root/vulkan/include" ]
17-
} else if (is_fuchsia) {
18-
include_dirs =
19-
[ "//third_party/vulkan_loader_and_validation_layers/include" ]
2017
} else {
2118
include_dirs = [ "//third_party/vulkan/src" ]
2219
}

shell/platform/BUILD.gn

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,9 @@ group("platform") {
2727
"windows",
2828
]
2929
} else if (is_fuchsia) {
30-
if (using_fuchsia_sdk) {
31-
deps = [
32-
"fuchsia",
33-
]
34-
}
30+
deps = [
31+
"fuchsia",
32+
]
3533
} else {
3634
assert(false, "Unknown/Unsupported platform.")
3735
}

shell/platform/fuchsia/BUILD.gn

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import("//flutter/common/config.gni")
77
import("//flutter/tools/fuchsia/dart.gni")
88
import("//flutter/tools/fuchsia/fuchsia_host_bundle.gni")
99

10-
if (using_fuchsia_sdk) {
10+
if (is_fuchsia) {
1111
product_suffix = ""
1212
is_product = false
1313

0 commit comments

Comments
 (0)