| // Copyright 2015 The Chromium Authors. All rights reserved. |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| import 'base/utils.dart'; |
| /// The type of build - `debug`, `profile`, or `release`. |
| String getModeName(BuildMode mode) => getEnumName(mode); |
| // Returns true if the selected build mode uses ahead-of-time compilation. |
| bool isAotBuildMode(BuildMode mode) { |
| return mode == BuildMode.profile || mode == BuildMode.release; |
| String getNameForHostPlatform(HostPlatform platform) { |
| case HostPlatform.darwin_x64: |
| case HostPlatform.linux_x64: |
| String getNameForTargetPlatform(TargetPlatform platform) { |
| case TargetPlatform.android_arm: |
| case TargetPlatform.android_x64: |
| case TargetPlatform.android_x86: |
| case TargetPlatform.darwin_x64: |
| case TargetPlatform.linux_x64: |
| HostPlatform getCurrentHostPlatform() { |
| return HostPlatform.darwin_x64; |
| return HostPlatform.linux_x64; |
| printError('Unsupported host platform, defaulting to Linux'); |
| return HostPlatform.linux_x64; |