Index: runtime/vm/BUILD.gn |
diff --git a/runtime/vm/BUILD.gn b/runtime/vm/BUILD.gn |
index d7edae646170d4cf3176eb580da4ab14c809fbe4..7536fd7c92403f67a76b98a10cf2fd3731650aca 100644 |
--- a/runtime/vm/BUILD.gn |
+++ b/runtime/vm/BUILD.gn |
@@ -4,9 +4,7 @@ |
config("libdart_vm_config") { |
if (defined(is_fuchsia) && is_fuchsia) { |
- libs = [ |
- "magenta", |
- ] |
+ libs = [ "magenta" ] |
} else if (is_win) { |
libs = [ |
"advapi32.lib", |
@@ -16,7 +14,7 @@ config("libdart_vm_config") { |
} else { |
libs = [ "dl" ] |
if (!is_android) { |
- libs += [ "pthread"] |
+ libs += [ "pthread" ] |
} |
if (is_linux) { |
libs += [ "rt" ] |
@@ -24,123 +22,132 @@ config("libdart_vm_config") { |
} |
} |
- |
static_library("libdart_platform") { |
- configs += ["..:dart_config", |
- "..:dart_maybe_product_config"] |
- public_configs = [":libdart_vm_config"] |
+ configs += [ |
+ "..:dart_config", |
+ "..:dart_maybe_product_config", |
+ ] |
+ public_configs = [ ":libdart_vm_config" ] |
platform_headers_gypi = |
exec_script("../../tools/gypi_to_gn.py", |
- [rebase_path("../platform/platform_headers.gypi")], |
+ [ rebase_path("../platform/platform_headers.gypi") ], |
"scope", |
- ["../platform/platform_headers.gypi"]) |
+ [ "../platform/platform_headers.gypi" ]) |
platform_headers = |
rebase_path(platform_headers_gypi.sources, ".", "../platform") |
platform_sources_gypi = |
exec_script("../../tools/gypi_to_gn.py", |
- [rebase_path("../platform/platform_sources.gypi")], |
+ [ rebase_path("../platform/platform_sources.gypi") ], |
"scope", |
- ["../platform/platform_sources.gypi"]) |
+ [ "../platform/platform_sources.gypi" ]) |
platform_sources = |
rebase_path(platform_sources_gypi.sources, ".", "../platform") |
sources = platform_headers + platform_sources |
- include_dirs = [ |
- "..", |
- ] |
+ include_dirs = [ ".." ] |
} |
- |
vm_sources_list = exec_script("../../tools/gypi_to_gn.py", |
- [rebase_path("vm_sources.gypi")], |
+ [ rebase_path("vm_sources.gypi") ], |
"scope", |
- ["vm_sources.gypi"]) |
- |
+ [ "vm_sources.gypi" ]) |
static_library("libdart_vm") { |
- configs += ["..:dart_config", |
- "..:dart_maybe_product_config", |
- "..:dart_maybe_precompiled_runtime_config"] |
- public_configs = [":libdart_vm_config"] |
- set_sources_assignment_filter(["*_test.cc", "*_test.h"]) |
- sources = vm_sources_list.sources |
- include_dirs = [ |
- "..", |
+ configs += [ |
+ "..:dart_config", |
+ "..:dart_maybe_product_config", |
+ "..:dart_maybe_precompiled_runtime_config", |
] |
+ public_configs = [ ":libdart_vm_config" ] |
+ set_sources_assignment_filter([ |
+ "*_test.cc", |
+ "*_test.h", |
+ ]) |
+ sources = vm_sources_list.sources |
+ include_dirs = [ ".." ] |
} |
- |
static_library("libdart_vm_noopt") { |
- configs += ["..:dart_config", |
- "..:dart_maybe_product_config", |
- "..:dart_precompiler_config", |
- "..:dart_maybe_precompiled_runtime_config"] |
- public_configs = [":libdart_vm_config"] |
- set_sources_assignment_filter(["*_test.cc", "*_test.h"]) |
- sources = vm_sources_list.sources |
- include_dirs = [ |
- "..", |
+ configs += [ |
+ "..:dart_config", |
+ "..:dart_maybe_product_config", |
+ "..:dart_precompiler_config", |
+ "..:dart_maybe_precompiled_runtime_config", |
] |
+ public_configs = [ ":libdart_vm_config" ] |
+ set_sources_assignment_filter([ |
+ "*_test.cc", |
+ "*_test.h", |
+ ]) |
+ sources = vm_sources_list.sources |
+ include_dirs = [ ".." ] |
} |
- |
static_library("libdart_vm_precompiled_runtime") { |
- configs += ["..:dart_config", |
- "..:dart_maybe_product_config", |
- "..:dart_precompiled_runtime_config"] |
- public_configs = [":libdart_vm_config"] |
- set_sources_assignment_filter(["*_test.cc", "*_test.h"]) |
- sources = vm_sources_list.sources |
- include_dirs = [ |
- "..", |
+ configs += [ |
+ "..:dart_config", |
+ "..:dart_maybe_product_config", |
+ "..:dart_precompiled_runtime_config", |
] |
+ public_configs = [ ":libdart_vm_config" ] |
+ set_sources_assignment_filter([ |
+ "*_test.cc", |
+ "*_test.h", |
+ ]) |
+ sources = vm_sources_list.sources |
+ include_dirs = [ ".." ] |
} |
- |
static_library("libdart_vm_nosnapshot") { |
- configs += ["..:dart_config", |
- "..:dart_maybe_product_config", |
- "..:dart_maybe_precompiled_runtime_config", |
- "..:dart_no_snapshot_config",] |
- public_configs = [":libdart_vm_config"] |
- set_sources_assignment_filter(["*_test.cc", "*_test.h"]) |
- sources = vm_sources_list.sources |
- include_dirs = [ |
- "..", |
+ configs += [ |
+ "..:dart_config", |
+ "..:dart_maybe_product_config", |
+ "..:dart_maybe_precompiled_runtime_config", |
+ "..:dart_no_snapshot_config", |
] |
+ public_configs = [ ":libdart_vm_config" ] |
+ set_sources_assignment_filter([ |
+ "*_test.cc", |
+ "*_test.h", |
+ ]) |
+ sources = vm_sources_list.sources |
+ include_dirs = [ ".." ] |
} |
- |
static_library("libdart_vm_nosnapshot_precompiled_runtime") { |
- configs += ["..:dart_config", |
- "..:dart_maybe_product_config", |
- "..:dart_precompiled_runtime_config", |
- "..:dart_no_snapshot_config",] |
- public_configs = [":libdart_vm_config"] |
- set_sources_assignment_filter(["*_test.cc", "*_test.h"]) |
- sources = vm_sources_list.sources |
- include_dirs = [ |
- "..", |
+ configs += [ |
+ "..:dart_config", |
+ "..:dart_maybe_product_config", |
+ "..:dart_precompiled_runtime_config", |
+ "..:dart_no_snapshot_config", |
] |
+ public_configs = [ ":libdart_vm_config" ] |
+ set_sources_assignment_filter([ |
+ "*_test.cc", |
+ "*_test.h", |
+ ]) |
+ sources = vm_sources_list.sources |
+ include_dirs = [ ".." ] |
} |
- |
static_library("libdart_vm_nosnapshot_with_precompiler") { |
- configs += ["..:dart_config", |
- "..:dart_maybe_product_config", |
- "..:dart_precompiler_config", |
- "..:dart_no_snapshot_config",] |
- public_configs = [":libdart_vm_config"] |
- set_sources_assignment_filter(["*_test.cc", "*_test.h"]) |
- sources = vm_sources_list.sources |
- include_dirs = [ |
- "..", |
+ configs += [ |
+ "..:dart_config", |
+ "..:dart_maybe_product_config", |
+ "..:dart_precompiler_config", |
+ "..:dart_no_snapshot_config", |
] |
+ public_configs = [ ":libdart_vm_config" ] |
+ set_sources_assignment_filter([ |
+ "*_test.cc", |
+ "*_test.h", |
+ ]) |
+ sources = vm_sources_list.sources |
+ include_dirs = [ ".." ] |
} |
- |
template("generate_library_source") { |
assert(defined(invoker.libname), "Need libname in $target_name") |
assert(defined(invoker.filename), "Need a filename in $target_name") |
@@ -156,11 +163,10 @@ template("generate_library_source") { |
lib_sources_gypi = |
exec_script("../../tools/gypi_to_gn.py", |
- [rebase_path("${path}/${filename}_sources.gypi")], |
+ [ rebase_path("${path}/${filename}_sources.gypi") ], |
"scope", |
- ["${path}/${filename}_sources.gypi"]) |
- lib_sources = |
- rebase_path(lib_sources_gypi.sources, ".", path) |
+ [ "${path}/${filename}_sources.gypi" ]) |
+ lib_sources = rebase_path(lib_sources_gypi.sources, ".", path) |
script = "../tools/gen_library_src_paths.py" |
inputs = [ |
@@ -168,18 +174,24 @@ template("generate_library_source") { |
"../lib/libgen_in.cc", |
] |
inputs += lib_sources |
- outputs = [ invoker.output, ] |
+ outputs = [ |
+ invoker.output, |
+ ] |
args = [ |
- "--output", rebase_path(invoker.output, root_build_dir), |
- "--input_cc", rebase_path("../lib/libgen_in.cc", root_build_dir), |
- "--include", "vm/bootstrap.h", |
- "--var_name", "dart::Bootstrap::${libname}_${kind}_paths_", |
- "--library_name", "dart:${libname}",] + |
- rebase_path(lib_sources, root_build_dir) |
+ "--output", |
+ rebase_path(invoker.output, root_build_dir), |
+ "--input_cc", |
+ rebase_path("../lib/libgen_in.cc", root_build_dir), |
+ "--include", |
+ "vm/bootstrap.h", |
+ "--var_name", |
+ "dart::Bootstrap::${libname}_${kind}_paths_", |
+ "--library_name", |
+ "dart:${libname}", |
+ ] + rebase_path(lib_sources, root_build_dir) |
} |
} |
- |
# This templates expects invoker.sources to be a list of pairs of strings. |
# The pairs of strings mean the following. |
# library name, file name |
@@ -217,85 +229,155 @@ template("generate_core_libraries") { |
output = "$target_gen_dir/${filename}_patch_gen.cc" |
} |
} |
- lib_sources_gypi = {} |
+ lib_sources_gypi = { |
+ } |
lib_sources_gypi = |
exec_script("../../tools/gypi_to_gn.py", |
- [rebase_path("../lib/${filename}_sources.gypi")], |
+ [ rebase_path("../lib/${filename}_sources.gypi") ], |
"scope", |
- ["../lib/${filename}_sources.gypi"]) |
+ [ "../lib/${filename}_sources.gypi" ]) |
libsources += rebase_path(lib_sources_gypi.sources, ".", "../lib") |
- liboutputs += ["$target_gen_dir/${filename}_gen.cc"] |
- libdeps += [":generate_${filename}_cc_file"] |
+ liboutputs += [ "$target_gen_dir/${filename}_gen.cc" ] |
+ libdeps += [ ":generate_${filename}_cc_file" ] |
if (do_patch) { |
- liboutputs += ["$target_gen_dir/${filename}_patch_gen.cc"] |
- libdeps += [":generate_${filename}_patch_cc_file"] |
+ liboutputs += [ "$target_gen_dir/${filename}_patch_gen.cc" ] |
+ libdeps += [ ":generate_${filename}_patch_cc_file" ] |
} |
} |
static_library("libdart_lib_nosnapshot") { |
- configs += ["..:dart_config", |
- "..:dart_maybe_product_config", |
- "..:dart_maybe_precompiled_runtime_config"] |
- deps = libdeps |
- sources = libsources + ["bootstrap.cc"] + liboutputs |
- include_dirs = [ |
- "..", |
+ configs += [ |
+ "..:dart_config", |
+ "..:dart_maybe_product_config", |
+ "..:dart_maybe_precompiled_runtime_config", |
] |
+ deps = libdeps |
+ sources = libsources + [ "bootstrap.cc" ] + liboutputs |
+ include_dirs = [ ".." ] |
} |
static_library("libdart_lib_nosnapshot_precompiled_runtime") { |
- configs += ["..:dart_config", |
- "..:dart_maybe_product_config", |
- "..:dart_precompiled_runtime_config"] |
- deps = libdeps |
- sources = libsources + ["bootstrap.cc"] + liboutputs |
- include_dirs = [ |
- "..", |
+ configs += [ |
+ "..:dart_config", |
+ "..:dart_maybe_product_config", |
+ "..:dart_precompiled_runtime_config", |
] |
+ deps = libdeps |
+ sources = libsources + [ "bootstrap.cc" ] + liboutputs |
+ include_dirs = [ ".." ] |
} |
static_library("libdart_lib_nosnapshot_with_precompiler") { |
- configs += ["..:dart_config", |
- "..:dart_maybe_product_config", |
- "..:dart_precompiler_config" ] |
- deps = libdeps |
- sources = libsources + [ "bootstrap.cc"] + liboutputs |
- include_dirs = [ |
- "..", |
+ configs += [ |
+ "..:dart_config", |
+ "..:dart_maybe_product_config", |
+ "..:dart_precompiler_config", |
] |
+ deps = libdeps |
+ sources = libsources + [ "bootstrap.cc" ] + liboutputs |
+ include_dirs = [ ".." ] |
} |
static_library("libdart_lib") { |
- configs += ["..:dart_config", |
- "..:dart_maybe_product_config", |
- "..:dart_maybe_precompiled_runtime_config"] |
- sources = libsources + [ "bootstrap_nocore.cc"] |
- include_dirs = [ |
- "..", |
+ configs += [ |
+ "..:dart_config", |
+ "..:dart_maybe_product_config", |
+ "..:dart_maybe_precompiled_runtime_config", |
] |
+ sources = libsources + [ "bootstrap_nocore.cc" ] |
+ include_dirs = [ ".." ] |
} |
static_library("libdart_lib_precompiled_runtime") { |
- configs += ["..:dart_config", |
- "..:dart_maybe_product_config", |
- "..:dart_precompiled_runtime_config"] |
- sources = libsources + [ "bootstrap_nocore.cc"] |
- include_dirs = [ |
- "..", |
+ configs += [ |
+ "..:dart_config", |
+ "..:dart_maybe_product_config", |
+ "..:dart_precompiled_runtime_config", |
] |
+ sources = libsources + [ "bootstrap_nocore.cc" ] |
+ include_dirs = [ ".." ] |
} |
} |
- |
generate_core_libraries("core_libraries") { |
sources = [ |
- ["async", "async", true, "../../sdk/lib/async", "../lib"], |
- ["core", "core", true, "../../sdk/lib/core", "../lib"], |
- ["collection", "collection", true, "../../sdk/lib/collection", "../lib"], |
- ["convert", "convert", true, "../../sdk/lib/convert", "../lib"], |
- ["developer", "developer", true, "../../sdk/lib/developer", "../lib"], |
- ["_internal", "internal", true, "../../sdk/lib/internal", "../lib"], |
- ["isolate", "isolate", true, "../../sdk/lib/isolate", "../lib"], |
- ["math", "math", true, "../../sdk/lib/math", "../lib"], |
- ["mirrors", "mirrors", true, "../../sdk/lib/mirrors", "../lib"], |
- ["profiler", "profiler", false, "../../sdk/lib/profiler"], |
- ["typed_data", "typed_data", false, "../lib"], |
- ["_vmservice", "vmservice", true, "../../sdk/lib/vmservice", "../lib"], |
+ [ |
+ "async", |
+ "async", |
+ true, |
+ "../../sdk/lib/async", |
+ "../lib", |
+ ], |
+ [ |
+ "core", |
+ "core", |
+ true, |
+ "../../sdk/lib/core", |
+ "../lib", |
+ ], |
+ [ |
+ "collection", |
+ "collection", |
+ true, |
+ "../../sdk/lib/collection", |
+ "../lib", |
+ ], |
+ [ |
+ "convert", |
+ "convert", |
+ true, |
+ "../../sdk/lib/convert", |
+ "../lib", |
+ ], |
+ [ |
+ "developer", |
+ "developer", |
+ true, |
+ "../../sdk/lib/developer", |
+ "../lib", |
+ ], |
+ [ |
+ "_internal", |
+ "internal", |
+ true, |
+ "../../sdk/lib/internal", |
+ "../lib", |
+ ], |
+ [ |
+ "isolate", |
+ "isolate", |
+ true, |
+ "../../sdk/lib/isolate", |
+ "../lib", |
+ ], |
+ [ |
+ "math", |
+ "math", |
+ true, |
+ "../../sdk/lib/math", |
+ "../lib", |
+ ], |
+ [ |
+ "mirrors", |
+ "mirrors", |
+ true, |
+ "../../sdk/lib/mirrors", |
+ "../lib", |
+ ], |
+ [ |
+ "profiler", |
+ "profiler", |
+ false, |
+ "../../sdk/lib/profiler", |
+ ], |
+ [ |
+ "typed_data", |
+ "typed_data", |
+ false, |
+ "../lib", |
+ ], |
+ [ |
+ "_vmservice", |
+ "vmservice", |
+ true, |
+ "../../sdk/lib/vmservice", |
+ "../lib", |
+ ], |
] |
} |