| OLD | NEW |
| 1 # Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 # Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file |
| 2 # for details. All rights reserved. Use of this source code is governed by a | 2 # for details. All rights reserved. Use of this source code is governed by a |
| 3 # BSD-style license that can be found in the LICENSE file. | 3 # BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 import("runtime_args.gni") | 5 import("runtime_args.gni") |
| 6 | 6 |
| 7 declare_args() { | 7 declare_args() { |
| 8 # Instead of using is_debug, we introduce a different flag for specifying a | 8 # Instead of using is_debug, we introduce a different flag for specifying a |
| 9 # Debug build of Dart so that clients can still use a Release build of Dart | 9 # Debug build of Dart so that clients can still use a Release build of Dart |
| 10 # while themselves doing a Debug build. | 10 # while themselves doing a Debug build. |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 65 config("dart_precompiler_config") { | 65 config("dart_precompiler_config") { |
| 66 defines = [] | 66 defines = [] |
| 67 defines += [ "DART_PRECOMPILER" ] | 67 defines += [ "DART_PRECOMPILER" ] |
| 68 } | 68 } |
| 69 | 69 |
| 70 config("dart_no_snapshot_config") { | 70 config("dart_no_snapshot_config") { |
| 71 defines = [] | 71 defines = [] |
| 72 defines += [ "DART_NO_SNAPSHOT" ] | 72 defines += [ "DART_NO_SNAPSHOT" ] |
| 73 } | 73 } |
| 74 | 74 |
| 75 config("dart_config") { | 75 # TODO(rmacnak): If Fuchsia adds a checked-in SDK, this should be folded back |
| 76 # into dart_config |
| 77 config("dart_use_target_arch_config") { |
| 76 defines = [] | 78 defines = [] |
| 77 | 79 |
| 78 if (target_os == "android") { | |
| 79 defines += [ "TARGET_OS_ANDROID" ] | |
| 80 } else if (target_os == "fuchsia") { | |
| 81 defines += [ "TARGET_OS_FUCHSIA" ] | |
| 82 } else if (target_os == "ios") { | |
| 83 defines += [ "TARGET_OS_MACOS" ] | |
| 84 defines += [ "TARGET_OS_MACOS_IOS" ] | |
| 85 } else if (target_os == "linux") { | |
| 86 defines += [ "TARGET_OS_LINUX" ] | |
| 87 } else if (target_os == "mac") { | |
| 88 defines += [ "TARGET_OS_MACOS" ] | |
| 89 } else if (target_os == "win") { | |
| 90 defines += [ "TARGET_OS_WINDOWS" ] | |
| 91 } else { | |
| 92 print("Unknown target_os: $target_os") | |
| 93 assert(false) | |
| 94 } | |
| 95 | |
| 96 if (dart_target_arch != "") { | 80 if (dart_target_arch != "") { |
| 97 if (dart_target_arch == "arm" || dart_target_arch == "simarm") { | 81 if (dart_target_arch == "arm" || dart_target_arch == "simarm") { |
| 98 defines += [ "TARGET_ARCH_ARM" ] | 82 defines += [ "TARGET_ARCH_ARM" ] |
| 99 } else if (dart_target_arch == "armv6" || dart_target_arch == "simarmv6") { | 83 } else if (dart_target_arch == "armv6" || dart_target_arch == "simarmv6") { |
| 100 defines += [ "TARGET_ARCH_ARM" ] | 84 defines += [ "TARGET_ARCH_ARM" ] |
| 101 defines += [ "TARGET_ARCH_ARM_6" ] | 85 defines += [ "TARGET_ARCH_ARM_6" ] |
| 102 } else if (dart_target_arch == "armv5te" || | 86 } else if (dart_target_arch == "armv5te" || |
| 103 dart_target_arch == "simarmv5te") { | 87 dart_target_arch == "simarmv5te") { |
| 104 defines += [ "TARGET_ARCH_ARM" ] | 88 defines += [ "TARGET_ARCH_ARM" ] |
| 105 defines += [ "TARGET_ARCH_ARM_5TE" ] | 89 defines += [ "TARGET_ARCH_ARM_5TE" ] |
| 106 } else if (dart_target_arch == "arm64" || dart_target_arch == "simarm64") { | 90 } else if (dart_target_arch == "arm64" || dart_target_arch == "simarm64") { |
| 107 defines += [ "TARGET_ARCH_ARM64" ] | 91 defines += [ "TARGET_ARCH_ARM64" ] |
| 108 } else if (dart_target_arch == "mips" || dart_target_arch == "simmips") { | 92 } else if (dart_target_arch == "mips" || dart_target_arch == "simmips") { |
| 109 defines += [ "TARGET_ARCH_MIPS" ] | 93 defines += [ "TARGET_ARCH_MIPS" ] |
| 110 } else if (dart_target_arch == "x64") { | 94 } else if (dart_target_arch == "x64") { |
| 111 defines += [ "TARGET_ARCH_X64" ] | 95 defines += [ "TARGET_ARCH_X64" ] |
| 112 } else if (dart_target_arch == "ia32") { | 96 } else if (dart_target_arch == "ia32") { |
| 113 defines += [ "TARGET_ARCH_IA32" ] | 97 defines += [ "TARGET_ARCH_IA32" ] |
| 114 } else if (dart_target_arch == "dbc" || dart_target_arch == "simdbc" || | 98 } else if (dart_target_arch == "dbc" || dart_target_arch == "simdbc" || |
| 115 dart_target_arch == "simdbc64" || | 99 dart_target_arch == "simdbc64" || |
| 116 dart_target_arch == "armsimdbc" || | 100 dart_target_arch == "armsimdbc" || |
| 117 dart_target_arch == "armsimdbc64") { | 101 dart_target_arch == "armsimdbc64") { |
| 118 defines += [ "TARGET_ARCH_DBC" ] | 102 defines += [ "TARGET_ARCH_DBC" ] |
| 119 defines += [ "USING_SIMULATOR" ] | 103 defines += [ "USING_SIMULATOR" ] |
| 120 } else { | 104 } else { |
| 121 print("Invalid dart_target_arch: $dart_target_arch") | 105 print("Invalid dart_target_arch: $dart_target_arch") |
| 122 assert(false) | 106 assert(false) |
| 123 } | 107 } |
| 124 } | 108 } |
| 109 } |
| 110 |
| 111 config("dart_config") { |
| 112 defines = [] |
| 113 |
| 114 if (target_os == "android") { |
| 115 defines += [ "TARGET_OS_ANDROID" ] |
| 116 } else if (target_os == "fuchsia") { |
| 117 defines += [ "TARGET_OS_FUCHSIA" ] |
| 118 } else if (target_os == "ios") { |
| 119 defines += [ "TARGET_OS_MACOS" ] |
| 120 defines += [ "TARGET_OS_MACOS_IOS" ] |
| 121 } else if (target_os == "linux") { |
| 122 defines += [ "TARGET_OS_LINUX" ] |
| 123 } else if (target_os == "mac") { |
| 124 defines += [ "TARGET_OS_MACOS" ] |
| 125 } else if (target_os == "win") { |
| 126 defines += [ "TARGET_OS_WINDOWS" ] |
| 127 } else { |
| 128 print("Unknown target_os: $target_os") |
| 129 assert(false) |
| 130 } |
| 125 | 131 |
| 126 if (dart_debug) { | 132 if (dart_debug) { |
| 127 defines += [ "DEBUG" ] | 133 defines += [ "DEBUG" ] |
| 128 } else { | 134 } else { |
| 129 defines += [ "NDEBUG" ] | 135 defines += [ "NDEBUG" ] |
| 130 } | 136 } |
| 131 | 137 |
| 132 include_dirs = [] | 138 include_dirs = [] |
| 133 if (dart_use_tcmalloc) { | 139 if (dart_use_tcmalloc) { |
| 134 defines += [ "DART_USE_TCMALLOC" ] | 140 defines += [ "DART_USE_TCMALLOC" ] |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 216 "vm/debugger_api_impl.cc", | 222 "vm/debugger_api_impl.cc", |
| 217 "vm/mirrors_api_impl.cc", | 223 "vm/mirrors_api_impl.cc", |
| 218 "vm/native_api_impl.cc", | 224 "vm/native_api_impl.cc", |
| 219 "vm/version.h", | 225 "vm/version.h", |
| 220 ] | 226 ] |
| 221 defines = [ "DART_SHARED_LIB" ] | 227 defines = [ "DART_SHARED_LIB" ] |
| 222 } | 228 } |
| 223 } | 229 } |
| 224 | 230 |
| 225 libdart_library("libdart_jit") { | 231 libdart_library("libdart_jit") { |
| 232 extra_configs = [ ":dart_use_target_arch_config" ] |
| 226 extra_deps = [ | 233 extra_deps = [ |
| 227 "vm:libdart_lib_jit", | 234 "vm:libdart_lib_jit", |
| 228 "vm:libdart_vm_jit", | 235 "vm:libdart_vm_jit", |
| 229 ] | 236 ] |
| 230 } | 237 } |
| 231 | 238 |
| 232 libdart_library("libdart_precompiled_runtime") { | 239 libdart_library("libdart_precompiled_runtime") { |
| 233 extra_configs = [ ":dart_precompiled_runtime_config" ] | 240 extra_configs = [ |
| 241 ":dart_precompiled_runtime_config", |
| 242 ":dart_use_target_arch_config", |
| 243 ] |
| 234 extra_deps = [ | 244 extra_deps = [ |
| 235 "vm:libdart_lib_precompiled_runtime", | 245 "vm:libdart_lib_precompiled_runtime", |
| 236 "vm:libdart_vm_precompiled_runtime", | 246 "vm:libdart_vm_precompiled_runtime", |
| 237 ] | 247 ] |
| 238 } | 248 } |
| 239 | 249 |
| 240 libdart_library("libdart_nosnapshot_with_precompiler") { | 250 libdart_library("libdart_nosnapshot_with_precompiler") { |
| 241 extra_configs = [ | 251 extra_configs = [ |
| 242 ":dart_no_snapshot_config", | 252 ":dart_no_snapshot_config", |
| 243 ":dart_precompiler_config", | 253 ":dart_precompiler_config", |
| 254 ":dart_use_target_arch_config", |
| 244 ] | 255 ] |
| 245 extra_deps = [ | 256 extra_deps = [ |
| 246 "vm:libdart_lib_nosnapshot_with_precompiler", | 257 "vm:libdart_lib_nosnapshot_with_precompiler", |
| 247 "vm:libdart_vm_nosnapshot_with_precompiler", | 258 "vm:libdart_vm_nosnapshot_with_precompiler", |
| 248 ] | 259 ] |
| 249 } | 260 } |
| 250 | 261 |
| 262 # TODO(rmacnak): Remove if Fuchsia adds a checked-in SDK. |
| 263 libdart_library("libdart_nosnapshot_with_precompiler_host_arch") { |
| 264 extra_configs = [ |
| 265 ":dart_no_snapshot_config", |
| 266 ":dart_precompiler_config", |
| 267 ] |
| 268 extra_deps = [ |
| 269 "vm:libdart_lib_nosnapshot_with_precompiler_host_arch", |
| 270 "vm:libdart_vm_nosnapshot_with_precompiler_host_arch", |
| 271 ] |
| 272 } |
| 273 |
| 251 libdart_library("libdart_with_precompiler") { | 274 libdart_library("libdart_with_precompiler") { |
| 252 extra_configs = [ ":dart_precompiler_config" ] | 275 extra_configs = [ |
| 276 ":dart_precompiler_config", |
| 277 ":dart_use_target_arch_config", |
| 278 ] |
| 253 extra_deps = [ | 279 extra_deps = [ |
| 254 "vm:libdart_lib_with_precompiler", | 280 "vm:libdart_lib_with_precompiler", |
| 255 "vm:libdart_vm_with_precompiler", | 281 "vm:libdart_vm_with_precompiler", |
| 256 ] | 282 ] |
| 257 } | 283 } |
| 258 | 284 |
| 259 action("generate_version_cc_file") { | 285 action("generate_version_cc_file") { |
| 260 deps = [ | 286 deps = [ |
| 261 ":libdart_dependency_helper", | 287 ":libdart_dependency_helper", |
| 262 ] | 288 ] |
| (...skipping 27 matching lines...) Expand all Loading... |
| 290 "third_party/double-conversion/src:libdouble_conversion", | 316 "third_party/double-conversion/src:libdouble_conversion", |
| 291 "vm:libdart_lib_jit", | 317 "vm:libdart_lib_jit", |
| 292 "vm:libdart_lib_nosnapshot_with_precompiler", | 318 "vm:libdart_lib_nosnapshot_with_precompiler", |
| 293 "vm:libdart_vm_jit", | 319 "vm:libdart_vm_jit", |
| 294 "vm:libdart_vm_nosnapshot_with_precompiler", | 320 "vm:libdart_vm_nosnapshot_with_precompiler", |
| 295 ] | 321 ] |
| 296 sources = [ | 322 sources = [ |
| 297 "vm/libdart_dependency_helper.cc", | 323 "vm/libdart_dependency_helper.cc", |
| 298 ] | 324 ] |
| 299 } | 325 } |
| OLD | NEW |