mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
This was only necessary when the Engine had to build in multiple buildroots where the sources where checked out at different paths relative to the buildroot. This is no longer the case and there are already cases GN rules have been written that mix and match variable usage with the direct specification of the path to the Flutter sources relative to the sole buildroot.
33 lines
1022 B
Plaintext
33 lines
1022 B
Plaintext
# Copyright 2013 The Flutter Authors. All rights reserved.
|
|
# Use of this source code is governed by a BSD-style license that can be
|
|
# found in the LICENSE file.
|
|
|
|
declare_args() {
|
|
# The default clang toolchain provided by the prebuilt. This variable is
|
|
# additionally consumed by the Go toolchain.
|
|
clang_base = rebase_path("//fuchsia/toolchain/$host_os/lib")
|
|
}
|
|
|
|
if (current_cpu == "arm64") {
|
|
clang_cpu = "aarch64"
|
|
} else if (current_cpu == "x64") {
|
|
clang_cpu = "x86_64"
|
|
} else {
|
|
assert(false, "CPU not supported")
|
|
}
|
|
|
|
if (is_fuchsia) {
|
|
clang_target = "${clang_cpu}-fuchsia"
|
|
} else if (is_linux) {
|
|
clang_target = "${clang_cpu}-linux-gnu"
|
|
} else if (is_mac) {
|
|
clang_target = "${clang_cpu}-apple-darwin"
|
|
} else {
|
|
assert(false, "OS not supported")
|
|
}
|
|
|
|
clang_manifest = rebase_path("$clang_base/${clang_target}.manifest")
|
|
clang_manifest_json = exec_script("//flutter/tools/fuchsia/parse_manifest.py",
|
|
[ "--input=${clang_manifest}" ],
|
|
"json")
|