• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright 2013 The Flutter Authors. All rights reserved.
2# Use of this source code is governed by a BSD-style license that can be
3# found in the LICENSE file.
4
5declare_args() {
6  # The default clang toolchain provided by the prebuilt. This variable is
7  # additionally consumed by the Go toolchain.
8  clang_base = rebase_path("//fuchsia/toolchain/$host_os/lib")
9}
10
11if (current_cpu == "arm64") {
12  clang_cpu = "aarch64"
13} else if (current_cpu == "x64") {
14  clang_cpu = "x86_64"
15} else {
16  assert(false, "CPU not supported")
17}
18
19if (is_fuchsia) {
20  clang_target = "${clang_cpu}-fuchsia"
21} else if (is_linux) {
22  clang_target = "${clang_cpu}-linux-gnu"
23} else if (is_mac) {
24  clang_target = "${clang_cpu}-apple-darwin"
25} else {
26  assert(false, "OS not supported")
27}
28
29clang_manifest = rebase_path("$clang_base/${clang_target}.manifest")
30clang_manifest_json =
31    exec_script("$flutter_root/tools/fuchsia/parse_manifest.py",
32                [ "--input=${clang_manifest}" ],
33                "json")
34