Chromium Code Reviews| 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: 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.
| |
| 76 config("dart_use_target_arch_config") { | |
| 76 defines = [] | 77 defines = [] |
| 77 | 78 |
| 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 != "") { | 79 if (dart_target_arch != "") { |
| 97 if (dart_target_arch == "arm" || dart_target_arch == "simarm") { | 80 if (dart_target_arch == "arm" || dart_target_arch == "simarm") { |
| 98 defines += [ "TARGET_ARCH_ARM" ] | 81 defines += [ "TARGET_ARCH_ARM" ] |
| 99 } else if (dart_target_arch == "armv6" || dart_target_arch == "simarmv6") { | 82 } else if (dart_target_arch == "armv6" || dart_target_arch == "simarmv6") { |
| 100 defines += [ "TARGET_ARCH_ARM" ] | 83 defines += [ "TARGET_ARCH_ARM" ] |
| 101 defines += [ "TARGET_ARCH_ARM_6" ] | 84 defines += [ "TARGET_ARCH_ARM_6" ] |
| 102 } else if (dart_target_arch == "armv5te" || | 85 } else if (dart_target_arch == "armv5te" || |
| 103 dart_target_arch == "simarmv5te") { | 86 dart_target_arch == "simarmv5te") { |
| 104 defines += [ "TARGET_ARCH_ARM" ] | 87 defines += [ "TARGET_ARCH_ARM" ] |
| 105 defines += [ "TARGET_ARCH_ARM_5TE" ] | 88 defines += [ "TARGET_ARCH_ARM_5TE" ] |
| 106 } else if (dart_target_arch == "arm64" || dart_target_arch == "simarm64") { | 89 } else if (dart_target_arch == "arm64" || dart_target_arch == "simarm64") { |
| 107 defines += [ "TARGET_ARCH_ARM64" ] | 90 defines += [ "TARGET_ARCH_ARM64" ] |
| 108 } else if (dart_target_arch == "mips" || dart_target_arch == "simmips") { | 91 } else if (dart_target_arch == "mips" || dart_target_arch == "simmips") { |
| 109 defines += [ "TARGET_ARCH_MIPS" ] | 92 defines += [ "TARGET_ARCH_MIPS" ] |
| 110 } else if (dart_target_arch == "x64") { | 93 } else if (dart_target_arch == "x64") { |
| 111 defines += [ "TARGET_ARCH_X64" ] | 94 defines += [ "TARGET_ARCH_X64" ] |
| 112 } else if (dart_target_arch == "ia32") { | 95 } else if (dart_target_arch == "ia32") { |
| 113 defines += [ "TARGET_ARCH_IA32" ] | 96 defines += [ "TARGET_ARCH_IA32" ] |
| 114 } else if (dart_target_arch == "dbc" || dart_target_arch == "simdbc" || | 97 } else if (dart_target_arch == "dbc" || dart_target_arch == "simdbc" || |
| 115 dart_target_arch == "simdbc64" || | 98 dart_target_arch == "simdbc64" || |
| 116 dart_target_arch == "armsimdbc" || | 99 dart_target_arch == "armsimdbc" || |
| 117 dart_target_arch == "armsimdbc64") { | 100 dart_target_arch == "armsimdbc64") { |
| 118 defines += [ "TARGET_ARCH_DBC" ] | 101 defines += [ "TARGET_ARCH_DBC" ] |
| 119 defines += [ "USING_SIMULATOR" ] | 102 defines += [ "USING_SIMULATOR" ] |
| 120 } else { | 103 } else { |
| 121 print("Invalid dart_target_arch: $dart_target_arch") | 104 print("Invalid dart_target_arch: $dart_target_arch") |
| 122 assert(false) | 105 assert(false) |
| 123 } | 106 } |
| 124 } | 107 } |
| 108 } | |
| 109 | |
| 110 config("dart_config") { | |
| 111 defines = [] | |
| 112 | |
|
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
| |
| 113 if (target_os == "android") { | |
| 114 defines += [ "TARGET_OS_ANDROID" ] | |
| 115 } else if (target_os == "fuchsia") { | |
| 116 defines += [ "TARGET_OS_FUCHSIA" ] | |
| 117 } else if (target_os == "ios") { | |
| 118 defines += [ "TARGET_OS_MACOS" ] | |
| 119 defines += [ "TARGET_OS_MACOS_IOS" ] | |
| 120 } else if (target_os == "linux") { | |
| 121 defines += [ "TARGET_OS_LINUX" ] | |
| 122 } else if (target_os == "mac") { | |
| 123 defines += [ "TARGET_OS_MACOS" ] | |
| 124 } else if (target_os == "win") { | |
| 125 defines += [ "TARGET_OS_WINDOWS" ] | |
| 126 } else { | |
| 127 print("Unknown target_os: $target_os") | |
| 128 assert(false) | |
| 129 } | |
| 125 | 130 |
| 126 if (dart_debug) { | 131 if (dart_debug) { |
| 127 defines += [ "DEBUG" ] | 132 defines += [ "DEBUG" ] |
| 128 } else { | 133 } else { |
| 129 defines += [ "NDEBUG" ] | 134 defines += [ "NDEBUG" ] |
| 130 } | 135 } |
| 131 | 136 |
| 132 include_dirs = [] | 137 include_dirs = [] |
| 133 if (dart_use_tcmalloc) { | 138 if (dart_use_tcmalloc) { |
| 134 defines += [ "DART_USE_TCMALLOC" ] | 139 defines += [ "DART_USE_TCMALLOC" ] |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 216 "vm/debugger_api_impl.cc", | 221 "vm/debugger_api_impl.cc", |
| 217 "vm/mirrors_api_impl.cc", | 222 "vm/mirrors_api_impl.cc", |
| 218 "vm/native_api_impl.cc", | 223 "vm/native_api_impl.cc", |
| 219 "vm/version.h", | 224 "vm/version.h", |
| 220 ] | 225 ] |
| 221 defines = [ "DART_SHARED_LIB" ] | 226 defines = [ "DART_SHARED_LIB" ] |
| 222 } | 227 } |
| 223 } | 228 } |
| 224 | 229 |
| 225 libdart_library("libdart_jit") { | 230 libdart_library("libdart_jit") { |
| 231 extra_configs = [ ":dart_use_target_arch_config" ] | |
| 226 extra_deps = [ | 232 extra_deps = [ |
| 227 "vm:libdart_lib_jit", | 233 "vm:libdart_lib_jit", |
| 228 "vm:libdart_vm_jit", | 234 "vm:libdart_vm_jit", |
| 229 ] | 235 ] |
| 230 } | 236 } |
| 231 | 237 |
| 232 libdart_library("libdart_precompiled_runtime") { | 238 libdart_library("libdart_precompiled_runtime") { |
| 233 extra_configs = [ ":dart_precompiled_runtime_config" ] | 239 extra_configs = [ |
| 240 ":dart_precompiled_runtime_config", | |
| 241 ":dart_use_target_arch_config", | |
| 242 ] | |
| 234 extra_deps = [ | 243 extra_deps = [ |
| 235 "vm:libdart_lib_precompiled_runtime", | 244 "vm:libdart_lib_precompiled_runtime", |
| 236 "vm:libdart_vm_precompiled_runtime", | 245 "vm:libdart_vm_precompiled_runtime", |
| 237 ] | 246 ] |
| 238 } | 247 } |
| 239 | 248 |
| 240 libdart_library("libdart_nosnapshot_with_precompiler") { | 249 libdart_library("libdart_nosnapshot_with_precompiler") { |
| 241 extra_configs = [ | 250 extra_configs = [ |
| 242 ":dart_no_snapshot_config", | 251 ":dart_no_snapshot_config", |
| 243 ":dart_precompiler_config", | 252 ":dart_precompiler_config", |
| 253 ":dart_use_target_arch_config", | |
| 244 ] | 254 ] |
| 245 extra_deps = [ | 255 extra_deps = [ |
| 246 "vm:libdart_lib_nosnapshot_with_precompiler", | 256 "vm:libdart_lib_nosnapshot_with_precompiler", |
| 247 "vm:libdart_vm_nosnapshot_with_precompiler", | 257 "vm:libdart_vm_nosnapshot_with_precompiler", |
| 248 ] | 258 ] |
| 249 } | 259 } |
| 250 | 260 |
| 261 # 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.
| |
| 262 libdart_library("libdart_nosnapshot_with_precompiler_host_arch") { | |
| 263 extra_configs = [ | |
| 264 ":dart_no_snapshot_config", | |
| 265 ":dart_precompiler_config", | |
| 266 ] | |
| 267 extra_deps = [ | |
| 268 "vm:libdart_lib_nosnapshot_with_precompiler_host_arch", | |
| 269 "vm:libdart_vm_nosnapshot_with_precompiler_host_arch", | |
| 270 ] | |
| 271 } | |
| 272 | |
| 251 libdart_library("libdart_with_precompiler") { | 273 libdart_library("libdart_with_precompiler") { |
| 252 extra_configs = [ ":dart_precompiler_config" ] | 274 extra_configs = [ |
| 275 ":dart_precompiler_config", | |
| 276 ":dart_use_target_arch_config", | |
| 277 ] | |
| 253 extra_deps = [ | 278 extra_deps = [ |
| 254 "vm:libdart_lib_with_precompiler", | 279 "vm:libdart_lib_with_precompiler", |
| 255 "vm:libdart_vm_with_precompiler", | 280 "vm:libdart_vm_with_precompiler", |
| 256 ] | 281 ] |
| 257 } | 282 } |
| 258 | 283 |
| 259 action("generate_version_cc_file") { | 284 action("generate_version_cc_file") { |
| 260 deps = [ | 285 deps = [ |
| 261 ":libdart_dependency_helper", | 286 ":libdart_dependency_helper", |
| 262 ] | 287 ] |
| (...skipping 27 matching lines...) Expand all Loading... | |
| 290 "third_party/double-conversion/src:libdouble_conversion", | 315 "third_party/double-conversion/src:libdouble_conversion", |
| 291 "vm:libdart_lib_jit", | 316 "vm:libdart_lib_jit", |
| 292 "vm:libdart_lib_nosnapshot_with_precompiler", | 317 "vm:libdart_lib_nosnapshot_with_precompiler", |
| 293 "vm:libdart_vm_jit", | 318 "vm:libdart_vm_jit", |
| 294 "vm:libdart_vm_nosnapshot_with_precompiler", | 319 "vm:libdart_vm_nosnapshot_with_precompiler", |
| 295 ] | 320 ] |
| 296 sources = [ | 321 sources = [ |
| 297 "vm/libdart_dependency_helper.cc", | 322 "vm/libdart_dependency_helper.cc", |
| 298 ] | 323 ] |
| 299 } | 324 } |
| OLD | NEW |