| # Copyright 2021 The Fuchsia Authors. All rights reserved. |
| # Use of this source code is governed by a BSD-style license that can be |
| # found in the LICENSE file. |
| |
| # The `toolchain_environment` variable corresponds to the runtime environment that the |
| # binaries generated by the current toolchain will run in. |
| if (zircon_toolchain != false) { |
| toolchain_environment = zircon_toolchain.environment |
| } else if (is_fuchsia) { |
| toolchain_environment = "user" |
| } else if (is_host) { |
| toolchain_environment = "host" |
| } else { |
| toolchain_environment = "unknown" |
| } |
| |
| # Some environment definitions use a dotted suffix (e.g. kernel.phys32 and |
| # kernel.phys), the `toolchain_base_environment` returns the suffix-less |
| # environment value (e.g. "kernel"). |
| toolchain_base_environment = get_path_info(toolchain_environment, "name") |