| 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 # TODO(rmacnak): If Fuchsia adds a checked-in SDK, this should be folded back | 75 config("dart_config") { |
| 76 # into dart_config | |
| 77 config("dart_use_target_arch_config") { | |
| 78 defines = [] | 76 defines = [] |
| 79 | 77 |
| 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 |
| 80 if (dart_target_arch != "") { | 96 if (dart_target_arch != "") { |
| 81 if (dart_target_arch == "arm" || dart_target_arch == "simarm") { | 97 if (dart_target_arch == "arm" || dart_target_arch == "simarm") { |
| 82 defines += [ "TARGET_ARCH_ARM" ] | 98 defines += [ "TARGET_ARCH_ARM" ] |
| 83 } else if (dart_target_arch == "armv6" || dart_target_arch == "simarmv6") { | 99 } else if (dart_target_arch == "armv6" || dart_target_arch == "simarmv6") { |
| 84 defines += [ "TARGET_ARCH_ARM" ] | 100 defines += [ "TARGET_ARCH_ARM" ] |
| 85 defines += [ "TARGET_ARCH_ARM_6" ] | 101 defines += [ "TARGET_ARCH_ARM_6" ] |
| 86 } else if (dart_target_arch == "armv5te" || | 102 } else if (dart_target_arch == "armv5te" || |
| 87 dart_target_arch == "simarmv5te") { | 103 dart_target_arch == "simarmv5te") { |
| 88 defines += [ "TARGET_ARCH_ARM" ] | 104 defines += [ "TARGET_ARCH_ARM" ] |
| 89 defines += [ "TARGET_ARCH_ARM_5TE" ] | 105 defines += [ "TARGET_ARCH_ARM_5TE" ] |
| 90 } else if (dart_target_arch == "arm64" || dart_target_arch == "simarm64") { | 106 } else if (dart_target_arch == "arm64" || dart_target_arch == "simarm64") { |
| 91 defines += [ "TARGET_ARCH_ARM64" ] | 107 defines += [ "TARGET_ARCH_ARM64" ] |
| 92 } else if (dart_target_arch == "mips" || dart_target_arch == "simmips") { | 108 } else if (dart_target_arch == "mips" || dart_target_arch == "simmips") { |
| 93 defines += [ "TARGET_ARCH_MIPS" ] | 109 defines += [ "TARGET_ARCH_MIPS" ] |
| 94 } else if (dart_target_arch == "x64") { | 110 } else if (dart_target_arch == "x64") { |
| 95 defines += [ "TARGET_ARCH_X64" ] | 111 defines += [ "TARGET_ARCH_X64" ] |
| 96 } else if (dart_target_arch == "ia32") { | 112 } else if (dart_target_arch == "ia32") { |
| 97 defines += [ "TARGET_ARCH_IA32" ] | 113 defines += [ "TARGET_ARCH_IA32" ] |
| 98 } else if (dart_target_arch == "dbc" || dart_target_arch == "simdbc" || | 114 } else if (dart_target_arch == "dbc" || dart_target_arch == "simdbc" || |
| 99 dart_target_arch == "simdbc64" || | 115 dart_target_arch == "simdbc64" || |
| 100 dart_target_arch == "armsimdbc" || | 116 dart_target_arch == "armsimdbc" || |
| 101 dart_target_arch == "armsimdbc64") { | 117 dart_target_arch == "armsimdbc64") { |
| 102 defines += [ "TARGET_ARCH_DBC" ] | 118 defines += [ "TARGET_ARCH_DBC" ] |
| 103 defines += [ "USING_SIMULATOR" ] | 119 defines += [ "USING_SIMULATOR" ] |
| 104 } else { | 120 } else { |
| 105 print("Invalid dart_target_arch: $dart_target_arch") | 121 print("Invalid dart_target_arch: $dart_target_arch") |
| 106 assert(false) | 122 assert(false) |
| 107 } | 123 } |
| 108 } | 124 } |
| 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 } | |
| 131 | 125 |
| 132 if (dart_debug) { | 126 if (dart_debug) { |
| 133 defines += [ "DEBUG" ] | 127 defines += [ "DEBUG" ] |
| 134 } else { | 128 } else { |
| 135 defines += [ "NDEBUG" ] | 129 defines += [ "NDEBUG" ] |
| 136 } | 130 } |
| 137 | 131 |
| 138 include_dirs = [] | 132 include_dirs = [] |
| 139 if (dart_use_tcmalloc) { | 133 if (dart_use_tcmalloc) { |
| 140 defines += [ "DART_USE_TCMALLOC" ] | 134 defines += [ "DART_USE_TCMALLOC" ] |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 225 "vm/debugger_api_impl.cc", | 219 "vm/debugger_api_impl.cc", |
| 226 "vm/mirrors_api_impl.cc", | 220 "vm/mirrors_api_impl.cc", |
| 227 "vm/native_api_impl.cc", | 221 "vm/native_api_impl.cc", |
| 228 "vm/version.h", | 222 "vm/version.h", |
| 229 ] | 223 ] |
| 230 defines = [ "DART_SHARED_LIB" ] | 224 defines = [ "DART_SHARED_LIB" ] |
| 231 } | 225 } |
| 232 } | 226 } |
| 233 | 227 |
| 234 libdart_library("libdart_jit") { | 228 libdart_library("libdart_jit") { |
| 235 extra_configs = [ ":dart_use_target_arch_config" ] | |
| 236 extra_deps = [ | 229 extra_deps = [ |
| 237 "vm:libdart_lib_jit", | 230 "vm:libdart_lib_jit", |
| 238 "vm:libdart_vm_jit", | 231 "vm:libdart_vm_jit", |
| 239 ] | 232 ] |
| 240 } | 233 } |
| 241 | 234 |
| 242 libdart_library("libdart_precompiled_runtime") { | 235 libdart_library("libdart_precompiled_runtime") { |
| 243 extra_configs = [ | 236 extra_configs = [ ":dart_precompiled_runtime_config" ] |
| 244 ":dart_precompiled_runtime_config", | |
| 245 ":dart_use_target_arch_config", | |
| 246 ] | |
| 247 extra_deps = [ | 237 extra_deps = [ |
| 248 "vm:libdart_lib_precompiled_runtime", | 238 "vm:libdart_lib_precompiled_runtime", |
| 249 "vm:libdart_vm_precompiled_runtime", | 239 "vm:libdart_vm_precompiled_runtime", |
| 250 ] | 240 ] |
| 251 } | 241 } |
| 252 | 242 |
| 253 libdart_library("libdart_nosnapshot_with_precompiler") { | 243 libdart_library("libdart_nosnapshot_with_precompiler") { |
| 254 extra_configs = [ | 244 extra_configs = [ |
| 255 ":dart_no_snapshot_config", | 245 ":dart_no_snapshot_config", |
| 256 ":dart_precompiler_config", | 246 ":dart_precompiler_config", |
| 257 ":dart_use_target_arch_config", | |
| 258 ] | 247 ] |
| 259 extra_deps = [ | 248 extra_deps = [ |
| 260 "vm:libdart_lib_nosnapshot_with_precompiler", | 249 "vm:libdart_lib_nosnapshot_with_precompiler", |
| 261 "vm:libdart_vm_nosnapshot_with_precompiler", | 250 "vm:libdart_vm_nosnapshot_with_precompiler", |
| 262 ] | 251 ] |
| 263 } | 252 } |
| 264 | 253 |
| 265 # TODO(rmacnak): Remove if Fuchsia adds a checked-in SDK. | |
| 266 libdart_library("libdart_nosnapshot_with_precompiler_host_arch") { | |
| 267 extra_configs = [ | |
| 268 ":dart_no_snapshot_config", | |
| 269 ":dart_precompiler_config", | |
| 270 ] | |
| 271 extra_deps = [ | |
| 272 "vm:libdart_lib_nosnapshot_with_precompiler_host_arch", | |
| 273 "vm:libdart_vm_nosnapshot_with_precompiler_host_arch", | |
| 274 ] | |
| 275 } | |
| 276 | |
| 277 libdart_library("libdart_with_precompiler") { | 254 libdart_library("libdart_with_precompiler") { |
| 278 extra_configs = [ | 255 extra_configs = [ ":dart_precompiler_config" ] |
| 279 ":dart_precompiler_config", | |
| 280 ":dart_use_target_arch_config", | |
| 281 ] | |
| 282 extra_deps = [ | 256 extra_deps = [ |
| 283 "vm:libdart_lib_with_precompiler", | 257 "vm:libdart_lib_with_precompiler", |
| 284 "vm:libdart_vm_with_precompiler", | 258 "vm:libdart_vm_with_precompiler", |
| 285 ] | 259 ] |
| 286 } | 260 } |
| 287 | 261 |
| 288 action("generate_version_cc_file") { | 262 action("generate_version_cc_file") { |
| 289 deps = [ | 263 deps = [ |
| 290 ":libdart_dependency_helper", | 264 ":libdart_dependency_helper", |
| 291 ] | 265 ] |
| (...skipping 30 matching lines...) Expand all Loading... |
| 322 "third_party/double-conversion/src:libdouble_conversion", | 296 "third_party/double-conversion/src:libdouble_conversion", |
| 323 "vm:libdart_lib_jit", | 297 "vm:libdart_lib_jit", |
| 324 "vm:libdart_lib_nosnapshot_with_precompiler", | 298 "vm:libdart_lib_nosnapshot_with_precompiler", |
| 325 "vm:libdart_vm_jit", | 299 "vm:libdart_vm_jit", |
| 326 "vm:libdart_vm_nosnapshot_with_precompiler", | 300 "vm:libdart_vm_nosnapshot_with_precompiler", |
| 327 ] | 301 ] |
| 328 sources = [ | 302 sources = [ |
| 329 "vm/libdart_dependency_helper.cc", | 303 "vm/libdart_dependency_helper.cc", |
| 330 ] | 304 ] |
| 331 } | 305 } |
| OLD | NEW |