Jason Simmons b478563ea6 Support ahead-of-time compilation on Android in the engine (#2614)
This include build system changes for selecting Dart's precompiler mode
plus a way to locate and load the precompiled snapshot library from an
Android application
2016-04-25 10:45:23 -07:00

74 lines
1.8 KiB
Plaintext

# Copyright 2014 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("//build/config/ui.gni")
if (is_android) {
import("//build/config/android/config.gni")
}
if (target_cpu == "arm" || target_cpu == "arm64") {
import("//build/config/arm.gni")
} else {
# TODO(brettw) remove this once && early-out is checked in.
arm_version = 0
}
declare_args() {
# Enable asserts, even in release builds.
sky_asserts_always_on = false
# Experimental support for the Dart VM.
sky_use_dart = false
# Default to strict mode in debug builds.
if (is_debug) {
sky_dart_strict_mode = true
} else {
sky_dart_strict_mode = false
}
# Enable ahead-of-time compilation on platforms where AOT is optional.
flutter_aot = false
# Set if the Dart runtime is being built in product mode, which excludes
# development features such as the debugger.
flutter_product_mode = false
}
# feature_defines_list ---------------------------------------------------------
feature_defines_list = []
if (is_debug) {
# TODO(GYP) this should also be set when release_valgrind_build is set,
# but we don't have that flag in the GN build yet.
feature_defines_list += [ "WTF_USE_DYNAMIC_ANNOTATIONS=1" ]
}
if (!is_mac) {
# Mac OS X has not implemented support for ENABLE(OPENTYPE_VERTICAL) yet.
feature_defines_list += [ "ENABLE_OPENTYPE_VERTICAL=1" ]
}
if (sky_asserts_always_on) {
feature_defines_list += [ "ENABLE_ASSERT=1" ]
}
if (sky_dart_strict_mode) {
feature_defines_list += [ "ENABLE_DART_STRICT=1" ]
}
if (sky_use_dart) {
feature_defines_list += [ "WTF_USE_DART=1" ]
}
if (flutter_aot) {
feature_defines_list += [ "FLUTTER_AOT=1" ]
}
if (flutter_product_mode) {
feature_defines_list += [ "FLUTTER_PRODUCT_MODE=1" ]
}