Index: runtime/BUILD.gn |
diff --git a/runtime/BUILD.gn b/runtime/BUILD.gn |
index 2713c7c6ec8528adb7050ede86c754fd2d24ea5d..caf6496fac155570cdad0e10e9541b9245e165e1 100644 |
--- a/runtime/BUILD.gn |
+++ b/runtime/BUILD.gn |
@@ -72,27 +72,11 @@ config("dart_no_snapshot_config") { |
defines += [ "DART_NO_SNAPSHOT" ] |
} |
-config("dart_config") { |
+# TODO(rmacnak): If Fuchsia adds a checked-in SDK, this should be folded back |
+# into dart_config |
+config("dart_use_target_arch_config") { |
defines = [] |
- if (target_os == "android") { |
- defines += [ "TARGET_OS_ANDROID" ] |
- } else if (target_os == "fuchsia") { |
- defines += [ "TARGET_OS_FUCHSIA" ] |
- } else if (target_os == "ios") { |
- defines += [ "TARGET_OS_MACOS" ] |
- defines += [ "TARGET_OS_MACOS_IOS" ] |
- } else if (target_os == "linux") { |
- defines += [ "TARGET_OS_LINUX" ] |
- } else if (target_os == "mac") { |
- defines += [ "TARGET_OS_MACOS" ] |
- } else if (target_os == "win") { |
- defines += [ "TARGET_OS_WINDOWS" ] |
- } else { |
- print("Unknown target_os: $target_os") |
- assert(false) |
- } |
- |
if (dart_target_arch != "") { |
if (dart_target_arch == "arm" || dart_target_arch == "simarm") { |
defines += [ "TARGET_ARCH_ARM" ] |
@@ -122,6 +106,28 @@ config("dart_config") { |
assert(false) |
} |
} |
+} |
+ |
+config("dart_config") { |
+ defines = [] |
+ |
+ if (target_os == "android") { |
+ defines += [ "TARGET_OS_ANDROID" ] |
+ } else if (target_os == "fuchsia") { |
+ defines += [ "TARGET_OS_FUCHSIA" ] |
+ } else if (target_os == "ios") { |
+ defines += [ "TARGET_OS_MACOS" ] |
+ defines += [ "TARGET_OS_MACOS_IOS" ] |
+ } else if (target_os == "linux") { |
+ defines += [ "TARGET_OS_LINUX" ] |
+ } else if (target_os == "mac") { |
+ defines += [ "TARGET_OS_MACOS" ] |
+ } else if (target_os == "win") { |
+ defines += [ "TARGET_OS_WINDOWS" ] |
+ } else { |
+ print("Unknown target_os: $target_os") |
+ assert(false) |
+ } |
if (dart_debug) { |
defines += [ "DEBUG" ] |
@@ -223,6 +229,7 @@ template("libdart_library") { |
} |
libdart_library("libdart_jit") { |
+ extra_configs = [ ":dart_use_target_arch_config" ] |
extra_deps = [ |
"vm:libdart_lib_jit", |
"vm:libdart_vm_jit", |
@@ -230,7 +237,10 @@ libdart_library("libdart_jit") { |
} |
libdart_library("libdart_precompiled_runtime") { |
- extra_configs = [ ":dart_precompiled_runtime_config" ] |
+ extra_configs = [ |
+ ":dart_precompiled_runtime_config", |
+ ":dart_use_target_arch_config", |
+ ] |
extra_deps = [ |
"vm:libdart_lib_precompiled_runtime", |
"vm:libdart_vm_precompiled_runtime", |
@@ -241,6 +251,7 @@ libdart_library("libdart_nosnapshot_with_precompiler") { |
extra_configs = [ |
":dart_no_snapshot_config", |
":dart_precompiler_config", |
+ ":dart_use_target_arch_config", |
] |
extra_deps = [ |
"vm:libdart_lib_nosnapshot_with_precompiler", |
@@ -248,8 +259,23 @@ libdart_library("libdart_nosnapshot_with_precompiler") { |
] |
} |
+# TODO(rmacnak): Remove if Fuchsia adds a checked-in SDK. |
+libdart_library("libdart_nosnapshot_with_precompiler_host_arch") { |
+ extra_configs = [ |
+ ":dart_no_snapshot_config", |
+ ":dart_precompiler_config", |
+ ] |
+ extra_deps = [ |
+ "vm:libdart_lib_nosnapshot_with_precompiler_host_arch", |
+ "vm:libdart_vm_nosnapshot_with_precompiler_host_arch", |
+ ] |
+} |
+ |
libdart_library("libdart_with_precompiler") { |
- extra_configs = [ ":dart_precompiler_config" ] |
+ extra_configs = [ |
+ ":dart_precompiler_config", |
+ ":dart_use_target_arch_config", |
+ ] |
extra_deps = [ |
"vm:libdart_lib_with_precompiler", |
"vm:libdart_vm_with_precompiler", |