Reland: [GN] Don't set dart_host_toolchain (flutter/engine#4314)

This commit is contained in:
Zachary Anderson
2017-11-02 10:04:06 -07:00
committed by GitHub
parent 3cf03194e8
commit 9365d7465e
3 changed files with 4 additions and 16 deletions

View File

@@ -91,7 +91,7 @@ action("generate_snapshot_bin") {
deps = [
":generate_dart_ui",
"//third_party/dart/runtime/bin:gen_snapshot($dart_host_toolchain)",
"//third_party/dart/runtime/bin:gen_snapshot($host_toolchain)",
]
depfile = "$target_gen_dir/core_snapshot.d"
@@ -119,7 +119,7 @@ action("generate_snapshot_bin") {
rebased_dart_ui_path = rebase_path(dart_ui_path)
gen_snapshot_dir =
get_label_info("//third_party/dart/runtime/bin:gen_snapshot($dart_host_toolchain)",
get_label_info("//third_party/dart/runtime/bin:gen_snapshot($host_toolchain)",
"root_out_dir")
script = "//third_party/dart/runtime/tools/create_snapshot_bin.py"

View File

@@ -135,19 +135,7 @@ def to_gn_args(args):
# Modify host_toolchain into dart_host_toolchain so it matches word size of target_cpu
target_is_32_bit = gn_args['target_cpu'] == 'arm' or gn_args['target_cpu'] == 'x86'
if target_is_32_bit:
if sys.platform.startswith('linux'):
gn_args['dart_host_toolchain'] = "//build/toolchain/linux:clang_x86"
elif sys.platform.startswith('darwin'):
gn_args['dart_host_toolchain'] = "//build/toolchain/mac:clang_i386"
elif sys.platform.startswith('win'):
gn_args['dart_host_toolchain'] = "//build/toolchain/win:x86"
else:
if sys.platform.startswith('linux'):
gn_args['dart_host_toolchain'] = "//build/toolchain/linux:clang_x64"
elif sys.platform.startswith('darwin'):
gn_args['dart_host_toolchain'] = "//build/toolchain/mac:clang_x64"
elif sys.platform.startswith('win'):
gn_args['dart_host_toolchain'] = "//build/toolchain/win:x64"
gn_args["host_cpu"] = "x86"
gn_args['flutter_runtime_mode'] = args.runtime_mode
gn_args['flutter_aot'] = aot