Chromium Code Reviews| Index: runtime/BUILD.gn |
| diff --git a/runtime/BUILD.gn b/runtime/BUILD.gn |
| index 2713c7c6ec8528adb7050ede86c754fd2d24ea5d..21d8d2c63c5025d4d3f68cff57eb8f0f9bfc6507 100644 |
| --- a/runtime/BUILD.gn |
| +++ b/runtime/BUILD.gn |
| @@ -72,27 +72,10 @@ config("dart_no_snapshot_config") { |
| defines += [ "DART_NO_SNAPSHOT" ] |
| } |
| -config("dart_config") { |
| +# TODO: Fold back into dart_config when Fuchsia has a checked-in SDK. |
|
zra
2017/06/12 18:12:18
Add you or me. Maybe change to "If Fuchsia has a c
rmacnak
2017/06/12 21:10:50
Done.
|
| +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 +105,28 @@ config("dart_config") { |
| assert(false) |
| } |
| } |
| +} |
| + |
| +config("dart_config") { |
| + defines = [] |
| + |
|
zra
2017/06/12 18:12:18
What happens if TARGET_ARCH_ isn't set to anything
rmacnak
2017/06/12 21:10:50
We use the architecture the C++ compiler is target
|
| + 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 +228,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 +236,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 +250,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 +258,23 @@ libdart_library("libdart_nosnapshot_with_precompiler") { |
| ] |
| } |
| +# TODO: Remove when Fuchsia has a checked-in SDK. |
|
zra
2017/06/12 18:12:18
ditto
rmacnak
2017/06/12 21:10:50
Done.
|
| +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", |