Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(132)

Unified Diff: runtime/BUILD.gn

Issue 1738503002: Add libdart_precompiled_runtime target to runtime/BUILD.gn (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: fix after merge Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | runtime/vm/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/BUILD.gn
diff --git a/runtime/BUILD.gn b/runtime/BUILD.gn
index 6932f9326b82a24d548d327609896a910a580d22..62b69fb6ecd5808a393b7daad78835fac8ae8cbe 100644
--- a/runtime/BUILD.gn
+++ b/runtime/BUILD.gn
@@ -87,6 +87,65 @@ config("dart_config") {
}
}
+config("dart_config_no_precompiler") {
+ defines = []
+
+ if (dart_target_arch != "") {
+ if (dart_target_arch == "arm") {
+ defines += [ "TARGET_ARCH_ARM" ]
+ } else if (dart_target_arch == "arm64") {
+ defines += [ "TARGET_ARCH_ARM64" ]
+ } else if (dart_target_arch == "mips") {
+ defines += [ "TARGET_ARCH_MIPS" ]
+ } else if (dart_target_arch == "x64") {
+ defines += [ "TARGET_ARCH_X64" ]
+ } else if (dart_target_arch == "ia32") {
+ defines += [ "TARGET_ARCH_IA32" ]
+ } else {
+ print("Invalid |dart_target_arch|")
+ assert(false)
+ }
+ }
+
+ if (dart_debug) {
+ defines += ["DEBUG"]
+ } else {
+ defines += ["NDEBUG"]
+ }
+
+ cflags = [
+ "-Werror",
+ "-Wall",
+ "-Wextra", # Also known as -W.
+ "-Wno-unused-parameter",
+ "-Wnon-virtual-dtor",
+ "-Wvla",
+ "-Wno-conversion-null",
+ "-Woverloaded-virtual",
+ "-g3",
+ "-ggdb3",
+ "-fno-rtti",
+ "-fno-exceptions",
+ ]
+
+ if (dart_debug) {
+ cflags += [
+ "-O1",
+ ]
+ } else {
+ cflags += [
+ "-O3",
+ ]
+ }
+
+ if (is_asan) {
+ ldflags = [
+ "-Wl,-u_sanitizer_options_link_helper",
+ "-fsanitize=address",
+ ]
+ }
+}
+
static_library("libdart") {
configs += [":dart_config"]
@@ -119,6 +178,38 @@ static_library("libdart") {
}
+static_library("libdart_precompiled_runtime") {
+ configs += [":dart_config_no_precompiler"]
+ deps = [
+ "vm:libdart_lib_precompiled_runtime",
+ "vm:libdart_vm_precompiled_runtime",
+ "third_party/double-conversion/src:libdouble_conversion",
+ ":generate_version_cc_file",
+ ]
+ include_dirs = [
+ ".",
+ ]
+ public_configs = [":dart_public_config"]
+ sources = [
+ "include/dart_api.h",
+ "include/dart_mirrors_api.h",
+ "include/dart_native_api.h",
+ "include/dart_tools_api.h",
+ "vm/dart_api_impl.cc",
+ "vm/debugger_api_impl.cc",
+ "vm/mirrors_api_impl.cc",
+ "vm/native_api_impl.cc",
+ "vm/version.h",
+ "$target_gen_dir/version.cc",
+ ]
+ defines = [
+ # Using DART_SHARED_LIB to export the Dart API entries.
+ "DART_SHARED_LIB",
+ "DART_PRECOMPILED_RUNTIME",
+ ]
+}
+
+
action("generate_version_cc_file") {
deps = [
":libdart_dependency_helper",
« no previous file with comments | « no previous file | runtime/vm/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698