| 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 declare_args() { | 5 declare_args() { |
| 6 # Whether to fall back to built-in root certificates when they cannot be | 6 # Whether to fall back to built-in root certificates when they cannot be |
| 7 # verified at the operating system level. | 7 # verified at the operating system level. |
| 8 dart_use_fallback_root_certificates = false | 8 dart_use_fallback_root_certificates = false |
| 9 | 9 |
| 10 # The BUILD.gn file that we pull from chromium as part of zlib has a | 10 # The BUILD.gn file that we pull from chromium as part of zlib has a |
| 11 # dependence on //base, which we don't pull in. In a standalone build of the | 11 # dependence on //base, which we don't pull in. In a standalone build of the |
| 12 # VM, we set this to //runtime/bin/zlib where we have a BUILD.gn file without | 12 # VM, we set this to //runtime/bin/zlib where we have a BUILD.gn file without |
| 13 # a dependence on //base. | 13 # a dependence on //base. |
| 14 dart_zlib_path = "//third_party/zlib" | 14 dart_zlib_path = "//third_party/zlib" |
| 15 | 15 |
| 16 # Whether to link the standalone VM against tcmalloc. The standalone build of | 16 # Whether to link the standalone VM against tcmalloc. The standalone build of |
| 17 # the VM enables this only for Linux builds. | 17 # the VM enables this only for Linux builds. |
| 18 dart_use_tcmalloc = false | 18 dart_use_tcmalloc = false |
| 19 } | 19 } |
| 20 | 20 |
| 21 resources_sources_gypi = | 21 resources_sources_gypi = |
| 22 exec_script("../../tools/gypi_to_gn.py", | 22 exec_script("../../tools/gypi_to_gn.py", |
| 23 [rebase_path("vmservice/vmservice_sources.gypi")], | 23 [ rebase_path("vmservice/vmservice_sources.gypi") ], |
| 24 "scope", | 24 "scope", |
| 25 ["vmservice/vmservice_sources.gypi"]) | 25 [ "vmservice/vmservice_sources.gypi" ]) |
| 26 | 26 |
| 27 # Generate a resources.cc file for the service isolate without Observatory. | 27 # Generate a resources.cc file for the service isolate without Observatory. |
| 28 action("gen_resources_cc") { | 28 action("gen_resources_cc") { |
| 29 visibility = [ ":*" ] # Only targets in this file can see this. | 29 visibility = [ ":*" ] # Only targets in this file can see this. |
| 30 script = "../tools/create_resources.py" | 30 script = "../tools/create_resources.py" |
| 31 inputs = [ | 31 inputs = [ |
| 32 "../tools/create_resources.py", | 32 "../tools/create_resources.py", |
| 33 ] | 33 ] |
| 34 |
| 34 # The path below is hard coded for the Mojo and Flutter trees. When moving | 35 # The path below is hard coded for the Mojo and Flutter trees. When moving |
| 35 # the Dart runtime to gn, this path might need to be updated. | 36 # the Dart runtime to gn, this path might need to be updated. |
| 36 sources = rebase_path(resources_sources_gypi.sources, | 37 sources = rebase_path(resources_sources_gypi.sources, "", "../bin/vmservice/") |
| 37 "", | 38 outputs = [ |
| 38 "../bin/vmservice/") | 39 "$target_gen_dir/resources_gen.cc", |
| 39 outputs = [ "$target_gen_dir/resources_gen.cc" ] | 40 ] |
| 40 args = [ | 41 args = [ |
| 41 "--output", | 42 "--output", |
| 42 rebase_path("$target_gen_dir/resources_gen.cc", root_build_dir), | 43 rebase_path("$target_gen_dir/resources_gen.cc", root_build_dir), |
| 43 "--outer_namespace", "dart", | 44 "--outer_namespace", |
| 44 "--inner_namespace", "bin", | 45 "dart", |
| 45 "--table_name", "service_bin", | 46 "--inner_namespace", |
| 46 "--root_prefix", rebase_path(".", root_build_dir) + "/", | 47 "bin", |
| 47 ] + rebase_path(sources, root_build_dir) | 48 "--table_name", |
| 49 "service_bin", |
| 50 "--root_prefix", |
| 51 rebase_path(".", root_build_dir) + "/", |
| 52 ] + rebase_path(sources, root_build_dir) |
| 48 } | 53 } |
| 49 | 54 |
| 50 template("gen_library_src_path") { | 55 template("gen_library_src_path") { |
| 51 assert(defined(invoker.sources), "Need sources in $target_name") | 56 assert(defined(invoker.sources), "Need sources in $target_name") |
| 52 assert(defined(invoker.output), "Need output in $target_name") | 57 assert(defined(invoker.output), "Need output in $target_name") |
| 53 action(target_name) { | 58 action(target_name) { |
| 54 visibility = [ ":*" ] # Only targets in this file can see this. | 59 visibility = [ ":*" ] # Only targets in this file can see this. |
| 55 script = "../tools/gen_library_src_paths.py" | 60 script = "../tools/gen_library_src_paths.py" |
| 56 inputs = [ | 61 inputs = [ |
| 57 "../tools/gen_library_src_paths.py", | 62 "../tools/gen_library_src_paths.py", |
| 58 "builtin_in.cc", | 63 "builtin_in.cc", |
| 59 ] + invoker.sources | 64 ] + invoker.sources |
| 60 outputs = [ invoker.output, ] | 65 outputs = [ |
| 66 invoker.output, |
| 67 ] |
| 61 name = invoker.name | 68 name = invoker.name |
| 62 kind = invoker.kind | 69 kind = invoker.kind |
| 63 library_name = "dart:${name}" | 70 library_name = "dart:${name}" |
| 64 if (defined(invoker.library_name)) { | 71 if (defined(invoker.library_name)) { |
| 65 library_name = invoker.library_name | 72 library_name = invoker.library_name |
| 66 } | 73 } |
| 67 args = [ | 74 args = [ |
| 68 "--output", rebase_path(invoker.output, root_build_dir), | 75 "--output", |
| 69 "--input_cc", rebase_path("builtin_in.cc", root_build_dir), | 76 rebase_path(invoker.output, root_build_dir), |
| 70 "--include", "bin/builtin.h", | 77 "--input_cc", |
| 71 "--var_name", "dart::bin::Builtin::${name}_${kind}_paths_", | 78 rebase_path("builtin_in.cc", root_build_dir), |
| 72 "--library_name", library_name,] + | 79 "--include", |
| 73 rebase_path(invoker.sources, root_build_dir) | 80 "bin/builtin.h", |
| 81 "--var_name", |
| 82 "dart::bin::Builtin::${name}_${kind}_paths_", |
| 83 "--library_name", |
| 84 library_name, |
| 85 ] + rebase_path(invoker.sources, root_build_dir) |
| 74 } | 86 } |
| 75 } | 87 } |
| 76 | 88 |
| 77 builtin_sources_gypi = | 89 builtin_sources_gypi = exec_script("../../tools/gypi_to_gn.py", |
| 78 exec_script("../../tools/gypi_to_gn.py", | 90 [ rebase_path("builtin_sources.gypi") ], |
| 79 [rebase_path("builtin_sources.gypi")], | 91 "scope", |
| 80 "scope", | 92 [ "builtin_sources.gypi" ]) |
| 81 ["builtin_sources.gypi"]) | |
| 82 | 93 |
| 83 gen_library_src_path("generate_builtin_cc_file") { | 94 gen_library_src_path("generate_builtin_cc_file") { |
| 84 name = "_builtin" | 95 name = "_builtin" |
| 85 kind = "source" | 96 kind = "source" |
| 86 sources = builtin_sources_gypi.sources | 97 sources = builtin_sources_gypi.sources |
| 87 output = "$target_gen_dir/builtin_gen.cc" | 98 output = "$target_gen_dir/builtin_gen.cc" |
| 88 } | 99 } |
| 89 | 100 |
| 90 sdk_io_sources_gypi = | 101 sdk_io_sources_gypi = |
| 91 exec_script("../../tools/gypi_to_gn.py", | 102 exec_script("../../tools/gypi_to_gn.py", |
| 92 [rebase_path("../../sdk/lib/io/io_sources.gypi")], | 103 [ rebase_path("../../sdk/lib/io/io_sources.gypi") ], |
| 93 "scope", | 104 "scope", |
| 94 ["../../sdk/lib/io/io_sources.gypi"]) | 105 [ "../../sdk/lib/io/io_sources.gypi" ]) |
| 95 sdk_io_sources = | 106 sdk_io_sources = |
| 96 rebase_path(sdk_io_sources_gypi.sources, ".", "../../sdk/lib/io") | 107 rebase_path(sdk_io_sources_gypi.sources, ".", "../../sdk/lib/io") |
| 97 | 108 |
| 98 gen_library_src_path("generate_io_cc_file") { | 109 gen_library_src_path("generate_io_cc_file") { |
| 99 name = "io" | 110 name = "io" |
| 100 kind = "source" | 111 kind = "source" |
| 101 sources = ["../../sdk/lib/io/io.dart"] + sdk_io_sources | 112 sources = [ "../../sdk/lib/io/io.dart" ] + sdk_io_sources |
| 102 output = "$target_gen_dir/io_gen.cc" | 113 output = "$target_gen_dir/io_gen.cc" |
| 103 } | 114 } |
| 104 | 115 |
| 105 io_sources_gypi = | 116 io_sources_gypi = exec_script("../../tools/gypi_to_gn.py", |
| 106 exec_script("../../tools/gypi_to_gn.py", | 117 [ rebase_path("io_sources.gypi") ], |
| 107 [rebase_path("io_sources.gypi")], | 118 "scope", |
| 108 "scope", | 119 [ "io_sources.gypi" ]) |
| 109 ["io_sources.gypi"]) | |
| 110 | 120 |
| 111 gen_library_src_path("generate_io_patch_cc_file") { | 121 gen_library_src_path("generate_io_patch_cc_file") { |
| 112 name = "io" | 122 name = "io" |
| 113 kind = "patch" | 123 kind = "patch" |
| 114 sources = io_sources_gypi.sources | 124 sources = io_sources_gypi.sources |
| 115 output = "$target_gen_dir/io_patch_gen.cc" | 125 output = "$target_gen_dir/io_patch_gen.cc" |
| 116 } | 126 } |
| 117 | 127 |
| 118 gen_library_src_path("generate_html_cc_file") { | 128 gen_library_src_path("generate_html_cc_file") { |
| 119 name = "html" | 129 name = "html" |
| 120 kind = "source" | 130 kind = "source" |
| 121 sources = ["../../sdk/lib/html/dartium/html_dartium.dart"] | 131 sources = [ |
| 132 "../../sdk/lib/html/dartium/html_dartium.dart", |
| 133 ] |
| 122 output = "$target_gen_dir/html_gen.cc" | 134 output = "$target_gen_dir/html_gen.cc" |
| 123 } | 135 } |
| 124 | 136 |
| 125 gen_library_src_path("generate_html_common_cc_file") { | 137 gen_library_src_path("generate_html_common_cc_file") { |
| 126 name = "html_common" | 138 name = "html_common" |
| 127 kind = "source" | 139 kind = "source" |
| 128 sources = [ | 140 sources = [ |
| 129 "../../sdk/lib/html/html_common/html_common.dart", | 141 "../../sdk/lib/html/html_common/conversions.dart", |
| 142 "../../sdk/lib/html/html_common/conversions_dartium.dart", |
| 130 "../../sdk/lib/html/html_common/css_class_set.dart", | 143 "../../sdk/lib/html/html_common/css_class_set.dart", |
| 131 "../../sdk/lib/html/html_common/device.dart", | 144 "../../sdk/lib/html/html_common/device.dart", |
| 132 "../../sdk/lib/html/html_common/filtered_element_list.dart", | 145 "../../sdk/lib/html/html_common/filtered_element_list.dart", |
| 146 "../../sdk/lib/html/html_common/html_common.dart", |
| 133 "../../sdk/lib/html/html_common/lists.dart", | 147 "../../sdk/lib/html/html_common/lists.dart", |
| 134 "../../sdk/lib/html/html_common/conversions.dart", | |
| 135 "../../sdk/lib/html/html_common/conversions_dartium.dart", | |
| 136 ] | 148 ] |
| 137 output = "$target_gen_dir/html_common_gen.cc" | 149 output = "$target_gen_dir/html_common_gen.cc" |
| 138 } | 150 } |
| 139 | 151 |
| 140 gen_library_src_path("generate_js_cc_file") { | 152 gen_library_src_path("generate_js_cc_file") { |
| 141 name = "js" | 153 name = "js" |
| 142 kind = "source" | 154 kind = "source" |
| 143 sources = ["../../sdk/lib/js/dartium/js_dartium.dart"] | 155 sources = [ |
| 156 "../../sdk/lib/js/dartium/js_dartium.dart", |
| 157 ] |
| 144 output = "$target_gen_dir/js_gen.cc" | 158 output = "$target_gen_dir/js_gen.cc" |
| 145 } | 159 } |
| 146 | 160 |
| 147 gen_library_src_path("generate_js_util_cc_file") { | 161 gen_library_src_path("generate_js_util_cc_file") { |
| 148 name = "js_util" | 162 name = "js_util" |
| 149 kind = "source" | 163 kind = "source" |
| 150 sources = ["../../sdk/lib/js_util/dartium/js_util_dartium.dart"] | 164 sources = [ |
| 165 "../../sdk/lib/js_util/dartium/js_util_dartium.dart", |
| 166 ] |
| 151 output = "$target_gen_dir/js_util_gen.cc" | 167 output = "$target_gen_dir/js_util_gen.cc" |
| 152 } | 168 } |
| 153 | 169 |
| 154 gen_library_src_path("generate_blink_cc_file") { | 170 gen_library_src_path("generate_blink_cc_file") { |
| 155 name = "_blink" | 171 name = "_blink" |
| 156 kind = "source" | 172 kind = "source" |
| 157 sources = ["../../sdk/lib/_blink/dartium/_blink_dartium.dart"] | 173 sources = [ |
| 174 "../../sdk/lib/_blink/dartium/_blink_dartium.dart", |
| 175 ] |
| 158 output = "$target_gen_dir/blink_gen.cc" | 176 output = "$target_gen_dir/blink_gen.cc" |
| 159 } | 177 } |
| 160 | 178 |
| 161 gen_library_src_path("generate_indexed_db_cc_file") { | 179 gen_library_src_path("generate_indexed_db_cc_file") { |
| 162 name = "indexed_db" | 180 name = "indexed_db" |
| 163 kind = "source" | 181 kind = "source" |
| 164 sources = ["../../sdk/lib/indexed_db/dartium/indexed_db_dartium.dart"] | 182 sources = [ |
| 183 "../../sdk/lib/indexed_db/dartium/indexed_db_dartium.dart", |
| 184 ] |
| 165 output = "$target_gen_dir/indexed_db_gen.cc" | 185 output = "$target_gen_dir/indexed_db_gen.cc" |
| 166 } | 186 } |
| 167 | 187 |
| 168 gen_library_src_path("generate_cached_patches_cc_file") { | 188 gen_library_src_path("generate_cached_patches_cc_file") { |
| 169 name = "cached_patches" | 189 name = "cached_patches" |
| 170 library_name = "cached_patches.dart" | 190 library_name = "cached_patches.dart" |
| 171 kind = "source" | 191 kind = "source" |
| 172 sources = ["../../sdk/lib/js/dartium/cached_patches.dart"] | 192 sources = [ |
| 193 "../../sdk/lib/js/dartium/cached_patches.dart", |
| 194 ] |
| 173 output = "$target_gen_dir/cached_patches_gen.cc" | 195 output = "$target_gen_dir/cached_patches_gen.cc" |
| 174 } | 196 } |
| 175 | 197 |
| 176 gen_library_src_path("generate_web_gl_cc_file") { | 198 gen_library_src_path("generate_web_gl_cc_file") { |
| 177 name = "web_gl" | 199 name = "web_gl" |
| 178 kind = "source" | 200 kind = "source" |
| 179 sources = ["../../sdk/lib/web_gl/dartium/web_gl_dartium.dart"] | 201 sources = [ |
| 202 "../../sdk/lib/web_gl/dartium/web_gl_dartium.dart", |
| 203 ] |
| 180 output = "$target_gen_dir/web_gl_gen.cc" | 204 output = "$target_gen_dir/web_gl_gen.cc" |
| 181 } | 205 } |
| 182 | 206 |
| 183 gen_library_src_path("generate_metadata_cc_file") { | 207 gen_library_src_path("generate_metadata_cc_file") { |
| 184 name = "metadata" | 208 name = "metadata" |
| 185 library_name = "metadata.dart" | 209 library_name = "metadata.dart" |
| 186 kind = "source" | 210 kind = "source" |
| 187 sources = ["../../sdk/lib/html/html_common/metadata.dart"] | 211 sources = [ |
| 212 "../../sdk/lib/html/html_common/metadata.dart", |
| 213 ] |
| 188 output = "$target_gen_dir/metadata_gen.cc" | 214 output = "$target_gen_dir/metadata_gen.cc" |
| 189 } | 215 } |
| 190 | 216 |
| 191 gen_library_src_path("generate_web_sql_cc_file") { | 217 gen_library_src_path("generate_web_sql_cc_file") { |
| 192 name = "web_sql" | 218 name = "web_sql" |
| 193 kind = "source" | 219 kind = "source" |
| 194 sources = ["../../sdk/lib/web_sql/dartium/web_sql_dartium.dart"] | 220 sources = [ |
| 221 "../../sdk/lib/web_sql/dartium/web_sql_dartium.dart", |
| 222 ] |
| 195 output = "$target_gen_dir/web_sql_gen.cc" | 223 output = "$target_gen_dir/web_sql_gen.cc" |
| 196 } | 224 } |
| 197 | 225 |
| 198 gen_library_src_path("generate_svg_cc_file") { | 226 gen_library_src_path("generate_svg_cc_file") { |
| 199 name = "svg" | 227 name = "svg" |
| 200 kind = "source" | 228 kind = "source" |
| 201 sources = ["../../sdk/lib/svg/dartium/svg_dartium.dart"] | 229 sources = [ |
| 230 "../../sdk/lib/svg/dartium/svg_dartium.dart", |
| 231 ] |
| 202 output = "$target_gen_dir/svg_gen.cc" | 232 output = "$target_gen_dir/svg_gen.cc" |
| 203 } | 233 } |
| 204 | 234 |
| 205 gen_library_src_path("generate_web_audio_cc_file") { | 235 gen_library_src_path("generate_web_audio_cc_file") { |
| 206 name = "web_audio" | 236 name = "web_audio" |
| 207 kind = "source" | 237 kind = "source" |
| 208 sources = ["../../sdk/lib/web_audio/dartium/web_audio_dartium.dart"] | 238 sources = [ |
| 239 "../../sdk/lib/web_audio/dartium/web_audio_dartium.dart", |
| 240 ] |
| 209 output = "$target_gen_dir/web_audio_gen.cc" | 241 output = "$target_gen_dir/web_audio_gen.cc" |
| 210 } | 242 } |
| 211 | 243 |
| 212 config("libdart_builtin_config") { | 244 config("libdart_builtin_config") { |
| 213 if (!is_win) { | 245 if (!is_win) { |
| 214 libs = [ | 246 libs = [ "dl" ] |
| 215 "dl", | |
| 216 ] | |
| 217 } | 247 } |
| 218 if (is_android) { | 248 if (is_android) { |
| 219 libs += [ | 249 libs += [ |
| 220 "android", | 250 "android", |
| 221 "log", | 251 "log", |
| 222 ] | 252 ] |
| 223 } | 253 } |
| 224 } | 254 } |
| 225 | 255 |
| 226 builtin_impl_sources_gypi = | 256 builtin_impl_sources_gypi = |
| 227 exec_script("../../tools/gypi_to_gn.py", | 257 exec_script("../../tools/gypi_to_gn.py", |
| 228 [rebase_path("builtin_impl_sources.gypi")], | 258 [ rebase_path("builtin_impl_sources.gypi") ], |
| 229 "scope", | 259 "scope", |
| 230 ["builtin_impl_sources.gypi"]) | 260 [ "builtin_impl_sources.gypi" ]) |
| 231 | 261 |
| 232 static_library("libdart_builtin") { | 262 static_library("libdart_builtin") { |
| 233 configs += ["..:dart_config", | 263 configs += [ |
| 234 "..:dart_maybe_product_config"] | 264 "..:dart_config", |
| 235 public_configs = [":libdart_builtin_config"] | 265 "..:dart_maybe_product_config", |
| 266 ] |
| 267 public_configs = [ ":libdart_builtin_config" ] |
| 236 deps = [ | 268 deps = [ |
| 269 ":generate_blink_cc_file", |
| 237 ":generate_builtin_cc_file", | 270 ":generate_builtin_cc_file", |
| 271 ":generate_cached_patches_cc_file", |
| 272 ":generate_html_cc_file", |
| 273 ":generate_html_common_cc_file", |
| 274 ":generate_indexed_db_cc_file", |
| 238 ":generate_io_cc_file", | 275 ":generate_io_cc_file", |
| 239 ":generate_io_patch_cc_file", | 276 ":generate_io_patch_cc_file", |
| 240 ":generate_html_cc_file", | |
| 241 ":generate_html_common_cc_file", | |
| 242 ":generate_js_cc_file", | 277 ":generate_js_cc_file", |
| 243 ":generate_js_util_cc_file", | 278 ":generate_js_util_cc_file", |
| 244 ":generate_blink_cc_file", | |
| 245 ":generate_indexed_db_cc_file", | |
| 246 ":generate_cached_patches_cc_file", | |
| 247 ":generate_web_gl_cc_file", | |
| 248 ":generate_metadata_cc_file", | 279 ":generate_metadata_cc_file", |
| 249 ":generate_web_sql_cc_file", | |
| 250 ":generate_svg_cc_file", | 280 ":generate_svg_cc_file", |
| 251 ":generate_web_audio_cc_file", | 281 ":generate_web_audio_cc_file", |
| 282 ":generate_web_gl_cc_file", |
| 283 ":generate_web_sql_cc_file", |
| 252 ] | 284 ] |
| 253 include_dirs = [ | 285 include_dirs = [ ".." ] |
| 254 "..", | 286 set_sources_assignment_filter([ |
| 255 ] | 287 "*_test.cc", |
| 256 set_sources_assignment_filter(["*_test.cc", "*_test.h"]) | 288 "*_test.h", |
| 289 ]) |
| 257 sources = [ | 290 sources = [ |
| 258 "log_android.cc", | 291 "log_android.cc", |
| 259 "log_fuchsia.cc", | 292 "log_fuchsia.cc", |
| 260 "log_linux.cc", | 293 "log_linux.cc", |
| 261 "log_macos.cc", | 294 "log_macos.cc", |
| 262 "log_win.cc", | 295 "log_win.cc", |
| 263 ] + builtin_impl_sources_gypi.sources | 296 ] + builtin_impl_sources_gypi.sources |
| 264 } | 297 } |
| 265 | 298 |
| 266 io_impl_sources_gypi = | 299 io_impl_sources_gypi = exec_script("../../tools/gypi_to_gn.py", |
| 267 exec_script("../../tools/gypi_to_gn.py", | 300 [ rebase_path("io_impl_sources.gypi") ], |
| 268 [ rebase_path("io_impl_sources.gypi") ], | 301 "scope", |
| 269 "scope", | 302 [ "io_impl_sources.gypi" ]) |
| 270 [ "io_impl_sources.gypi" ]) | |
| 271 | 303 |
| 272 executable("gen_snapshot") { | 304 executable("gen_snapshot") { |
| 273 configs += ["..:dart_config", | 305 configs += [ |
| 274 "..:dart_maybe_product_config", | 306 "..:dart_config", |
| 275 "..:dart_precompiler_config"] | 307 "..:dart_maybe_product_config", |
| 308 "..:dart_precompiler_config", |
| 309 ] |
| 276 deps = [ | 310 deps = [ |
| 277 ":gen_resources_cc", | 311 ":gen_resources_cc", |
| 278 ":gen_snapshot_dart_io", | 312 ":gen_snapshot_dart_io", |
| 279 ":generate_builtin_cc_file", | 313 ":generate_builtin_cc_file", |
| 280 ":generate_io_cc_file", | 314 ":generate_io_cc_file", |
| 281 ":generate_io_patch_cc_file", | 315 ":generate_io_patch_cc_file", |
| 282 ":libdart_builtin", | 316 ":libdart_builtin", |
| 283 "..:libdart_nosnapshot_with_precompiler", | 317 "..:libdart_nosnapshot_with_precompiler", |
| 284 ] | 318 ] |
| 285 | 319 |
| 286 sources = [ | 320 sources = [ |
| 287 "address_sanitizer.cc", | |
| 288 "gen_snapshot.cc", | |
| 289 # Very limited native resolver provided. | |
| 290 "builtin_common.cc", | |
| 291 "builtin_gen_snapshot.cc", | |
| 292 "builtin.cc", | |
| 293 "builtin.h", | |
| 294 "vmservice_impl.cc", | |
| 295 "vmservice_impl.h", | |
| 296 # Include generated source files. | 321 # Include generated source files. |
| 297 "$target_gen_dir/builtin_gen.cc", | 322 "$target_gen_dir/builtin_gen.cc", |
| 298 "$target_gen_dir/io_gen.cc", | 323 "$target_gen_dir/io_gen.cc", |
| 299 "$target_gen_dir/io_patch_gen.cc", | 324 "$target_gen_dir/io_patch_gen.cc", |
| 300 "$target_gen_dir/resources_gen.cc", | 325 "$target_gen_dir/resources_gen.cc", |
| 326 "address_sanitizer.cc", |
| 327 "builtin.cc", |
| 328 "builtin.h", |
| 329 |
| 330 # Very limited native resolver provided. |
| 331 "builtin_common.cc", |
| 332 "builtin_gen_snapshot.cc", |
| 333 "gen_snapshot.cc", |
| 334 "vmservice_impl.cc", |
| 335 "vmservice_impl.h", |
| 301 ] | 336 ] |
| 302 | 337 |
| 303 include_dirs = [ | 338 include_dirs = [ ".." ] |
| 304 "..", | |
| 305 ] | |
| 306 | 339 |
| 307 if (is_mac) { | 340 if (is_mac) { |
| 308 libs = [ | 341 libs = [ |
| 309 "CoreFoundation.framework", | 342 "CoreFoundation.framework", |
| 310 "CoreServices.framework" | 343 "CoreServices.framework", |
| 311 ] | 344 ] |
| 312 } | 345 } |
| 313 | 346 |
| 314 if (is_win) { | 347 if (is_win) { |
| 315 libs = [ | 348 libs = [ |
| 316 "iphlpapi.lib", | 349 "iphlpapi.lib", |
| 317 "psapi.lib", | 350 "psapi.lib", |
| 318 "ws2_32.lib", | 351 "ws2_32.lib", |
| 319 "Rpcrt4.lib", | 352 "Rpcrt4.lib", |
| 320 "winmm.lib", | 353 "winmm.lib", |
| 321 ] | 354 ] |
| 322 } | 355 } |
| 323 } | 356 } |
| 324 | 357 |
| 325 # A source set for the implementation of 'dart:io' library | 358 # A source set for the implementation of 'dart:io' library |
| 326 # (without secure sockets) suitable for linking with gen_snapshot. | 359 # (without secure sockets) suitable for linking with gen_snapshot. |
| 327 source_set("gen_snapshot_dart_io") { | 360 source_set("gen_snapshot_dart_io") { |
| 328 configs += ["..:dart_config", | 361 configs += [ |
| 329 "..:dart_maybe_product_config", | 362 "..:dart_config", |
| 330 "..:dart_precompiler_config"] | 363 "..:dart_maybe_product_config", |
| 364 "..:dart_precompiler_config", |
| 365 ] |
| 331 | 366 |
| 332 deps = [ | 367 deps = [ |
| 333 "$dart_zlib_path", | 368 "$dart_zlib_path", |
| 334 ] | 369 ] |
| 335 | 370 |
| 336 custom_sources_filter = [ | 371 custom_sources_filter = [ |
| 337 "*_test.cc", | 372 "*_test.cc", |
| 338 "*_test.h", | 373 "*_test.h", |
| 339 "builtin.cc", | 374 "builtin.cc", |
| 340 "builtin_common.cc", | 375 "builtin_common.cc", |
| (...skipping 11 matching lines...) Expand all Loading... |
| 352 defines = [ "DART_IO_SECURE_SOCKET_DISABLED" ] | 387 defines = [ "DART_IO_SECURE_SOCKET_DISABLED" ] |
| 353 | 388 |
| 354 sources = io_impl_sources_gypi.sources + builtin_impl_sources_gypi.sources | 389 sources = io_impl_sources_gypi.sources + builtin_impl_sources_gypi.sources |
| 355 sources += [ | 390 sources += [ |
| 356 "io_natives.cc", | 391 "io_natives.cc", |
| 357 "io_natives.h", | 392 "io_natives.h", |
| 358 ] | 393 ] |
| 359 | 394 |
| 360 include_dirs = [ | 395 include_dirs = [ |
| 361 "..", | 396 "..", |
| 362 "//third_party" | 397 "//third_party", |
| 363 ] | 398 ] |
| 364 } | 399 } |
| 365 | 400 |
| 366 source_set("libdart_embedder_noio") { | 401 source_set("libdart_embedder_noio") { |
| 367 configs += ["..:dart_config", | 402 configs += [ |
| 368 "..:dart_maybe_product_config"] | 403 "..:dart_config", |
| 404 "..:dart_maybe_product_config", |
| 405 ] |
| 369 deps = [ | 406 deps = [ |
| 370 "..:libdart", | 407 "..:libdart", |
| 371 ] | 408 ] |
| 372 } | 409 } |
| 373 | 410 |
| 374 # A source set for the implementation of 'dart:io' library. | 411 # A source set for the implementation of 'dart:io' library. |
| 375 template("dart_io") { | 412 template("dart_io") { |
| 376 extra_sources = [] | 413 extra_sources = [] |
| 377 if (defined(invoker.extra_sources)) { | 414 if (defined(invoker.extra_sources)) { |
| 378 extra_sources += invoker.extra_sources | 415 extra_sources += invoker.extra_sources |
| 379 } | 416 } |
| 380 source_set(target_name) { | 417 source_set(target_name) { |
| 381 configs += ["..:dart_config", | 418 configs += [ |
| 382 "..:dart_maybe_product_config"] | 419 "..:dart_config", |
| 420 "..:dart_maybe_product_config", |
| 421 ] |
| 383 custom_sources_filter = [ | 422 custom_sources_filter = [ |
| 384 "*_test.cc", | 423 "*_test.cc", |
| 385 "*_test.h", | 424 "*_test.h", |
| 386 "builtin.cc", | 425 "builtin.cc", |
| 387 "builtin_gen_snapshot.cc", | 426 "builtin_gen_snapshot.cc", |
| 388 ] | 427 ] |
| 389 if (!is_mac && !is_ios) { | 428 if (!is_mac && !is_ios) { |
| 390 # Dart tree uses *_macos.* instead of *_mac.* | 429 # Dart tree uses *_macos.* instead of *_mac.* |
| 391 custom_sources_filter += [ | 430 custom_sources_filter += [ |
| 392 "*_macos.h", | 431 "*_macos.h", |
| 393 "*_macos.cc", | 432 "*_macos.cc", |
| 394 ] | 433 ] |
| 395 } | 434 } |
| 396 set_sources_assignment_filter(custom_sources_filter) | 435 set_sources_assignment_filter(custom_sources_filter) |
| 397 | 436 |
| 398 defines = [] | 437 defines = [] |
| 399 if (is_mac || is_ios) { | 438 if (is_mac || is_ios) { |
| 400 libs = [ | 439 libs = [ |
| 401 "CoreFoundation.framework", | 440 "CoreFoundation.framework", |
| 402 "Security.framework", | 441 "Security.framework", |
| 403 ] | 442 ] |
| 404 | 443 |
| 405 if (is_mac) { | 444 if (is_mac) { |
| 406 libs += [ | 445 libs += [ "CoreServices.framework" ] |
| 407 "CoreServices.framework", | |
| 408 ] | |
| 409 } | 446 } |
| 410 } else if (defined(is_fuchsia) && is_fuchsia) { | 447 } else if (defined(is_fuchsia) && is_fuchsia) { |
| 411 defines += [ | 448 defines += [ "DART_IO_SECURE_SOCKET_DISABLED" ] |
| 412 "DART_IO_SECURE_SOCKET_DISABLED" | |
| 413 ] | |
| 414 } else { | 449 } else { |
| 415 deps = [ | 450 deps = [ |
| 416 "//third_party/boringssl", | 451 "//third_party/boringssl", |
| 417 ] | 452 ] |
| 418 } | 453 } |
| 419 | 454 |
| 420 sources = io_impl_sources_gypi.sources + builtin_impl_sources_gypi.sources | 455 sources = io_impl_sources_gypi.sources + builtin_impl_sources_gypi.sources |
| 421 sources += [ | 456 sources += [ |
| 422 "builtin_natives.cc", | 457 "builtin_natives.cc", |
| 423 "io_natives.cc", | 458 "io_natives.cc", |
| 424 "io_natives.h", | 459 "io_natives.h", |
| 425 "log_android.cc", | 460 "log_android.cc", |
| 426 "log_linux.cc", | 461 "log_linux.cc", |
| 427 "log_macos.cc", | 462 "log_macos.cc", |
| 428 "log_win.cc", | 463 "log_win.cc", |
| 429 "log.h", | 464 "log.h", |
| 430 ] + extra_sources | 465 ] + extra_sources |
| 431 | 466 |
| 432 if (is_linux || is_win) { | 467 if (is_linux || is_win) { |
| 433 if (dart_use_fallback_root_certificates) { | 468 if (dart_use_fallback_root_certificates) { |
| 434 sources += [ "//third_party/root_certificates/root_certificates.cc"] | 469 sources += [ "//third_party/root_certificates/root_certificates.cc" ] |
| 435 } else { | 470 } else { |
| 436 defines += [ | 471 defines += [ "DART_IO_ROOT_CERTS_DISABLED" ] |
| 437 "DART_IO_ROOT_CERTS_DISABLED", | |
| 438 ] | |
| 439 } | 472 } |
| 440 } | 473 } |
| 441 | 474 |
| 442 include_dirs = [ | 475 include_dirs = [ |
| 443 "..", | 476 "..", |
| 444 "//third_party" | 477 "//third_party", |
| 445 ] | 478 ] |
| 446 } | 479 } |
| 447 } | 480 } |
| 448 | 481 |
| 449 dart_io("embedded_dart_io") { | 482 dart_io("embedded_dart_io") { |
| 450 extra_sources = [ | 483 extra_sources = [ |
| 451 "builtin_nolib.cc", | 484 "builtin_nolib.cc", |
| 452 "embedded_dart_io.cc", | 485 "embedded_dart_io.cc", |
| 453 "embedded_dart_io.h", | 486 "embedded_dart_io.h", |
| 454 ] | 487 ] |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 542 extra_defines = [] | 575 extra_defines = [] |
| 543 if (defined(invoker.extra_defines)) { | 576 if (defined(invoker.extra_defines)) { |
| 544 extra_defines = invoker.extra_defines | 577 extra_defines = invoker.extra_defines |
| 545 } | 578 } |
| 546 extra_sources = [] | 579 extra_sources = [] |
| 547 if (defined(invoker.extra_sources)) { | 580 if (defined(invoker.extra_sources)) { |
| 548 extra_sources += invoker.extra_sources | 581 extra_sources += invoker.extra_sources |
| 549 } | 582 } |
| 550 executable(target_name) { | 583 executable(target_name) { |
| 551 configs += [ | 584 configs += [ |
| 552 "..:dart_config", | 585 "..:dart_config", |
| 553 "..:dart_maybe_product_config" | 586 "..:dart_maybe_product_config", |
| 554 ] + extra_configs | 587 ] + extra_configs |
| 555 | 588 |
| 556 deps = [ | 589 deps = [ |
| 557 ":gen_resources_cc", | 590 ":gen_resources_cc", |
| 558 ":standalone_dart_io", | 591 ":standalone_dart_io", |
| 559 ":libdart_builtin", | 592 ":libdart_builtin", |
| 560 "$dart_zlib_path", | 593 "$dart_zlib_path", |
| 561 ] + extra_deps | 594 ] + extra_deps |
| 562 | 595 |
| 563 if (dart_use_tcmalloc) { | 596 if (dart_use_tcmalloc) { |
| 564 deps += [ | 597 deps += [ "//third_party/tcmalloc" ] |
| 565 "//third_party/tcmalloc", | |
| 566 ] | |
| 567 } | 598 } |
| 568 | 599 |
| 569 defines = extra_defines | 600 defines = extra_defines |
| 570 | 601 |
| 571 sources = [ | 602 sources = [ |
| 572 "main.cc", | 603 "main.cc", |
| 573 "vmservice_impl.cc", | 604 "vmservice_impl.cc", |
| 574 "vmservice_impl.h", | 605 "vmservice_impl.h", |
| 575 "$target_gen_dir/resources_gen.cc", | 606 "$target_gen_dir/resources_gen.cc", |
| 576 ] + extra_sources | 607 ] + extra_sources |
| 577 | 608 |
| 578 include_dirs = [ | 609 include_dirs = [ |
| 579 "..", | 610 "..", |
| 580 "//third_party", | 611 "//third_party", |
| 581 ] | 612 ] |
| 582 | 613 |
| 583 if (is_win) { | 614 if (is_win) { |
| 584 ldflags = [ | 615 ldflags = [ "/EXPORT:Dart_True" ] |
| 585 "/EXPORT:Dart_True" | |
| 586 ] | |
| 587 } else { | 616 } else { |
| 588 ldflags = [ | 617 ldflags = [ "-rdynamic" ] |
| 589 "-rdynamic", | |
| 590 ] | |
| 591 } | 618 } |
| 592 | 619 |
| 593 if (is_win) { | 620 if (is_win) { |
| 594 libs = [ | 621 libs = [ |
| 595 "iphlpapi.lib", | 622 "iphlpapi.lib", |
| 596 "psapi.lib", | 623 "psapi.lib", |
| 597 "ws2_32.lib", | 624 "ws2_32.lib", |
| 598 "Rpcrt4.lib", | 625 "Rpcrt4.lib", |
| 599 "winmm.lib", | 626 "winmm.lib", |
| 600 ] | 627 ] |
| 601 } | 628 } |
| 602 } | 629 } |
| 603 } | 630 } |
| 604 | 631 |
| 605 if (!defined(is_fuchsia) || !is_fuchsia) { | 632 if (!defined(is_fuchsia) || !is_fuchsia) { |
| 606 dart_executable("dart") { | 633 dart_executable("dart") { |
| 607 extra_deps = [ | 634 extra_deps = [ |
| 608 "..:libdart", | 635 "..:libdart", |
| 609 ":dart_snapshot_cc", | 636 ":dart_snapshot_cc", |
| 610 "../observatory:standalone_observatory_archive", | 637 "../observatory:standalone_observatory_archive", |
| 611 ] | 638 ] |
| 612 extra_sources = [ | 639 extra_sources = [ "builtin_nolib.cc" ] |
| 613 "builtin_nolib.cc", | |
| 614 ] | |
| 615 } | 640 } |
| 616 | 641 |
| 617 dart_executable("dart_noopt") { | 642 dart_executable("dart_noopt") { |
| 618 extra_configs = [ | 643 extra_configs = [ "..:dart_precompiler_config" ] |
| 619 "..:dart_precompiler_config", | |
| 620 ] | |
| 621 extra_deps = [ | 644 extra_deps = [ |
| 622 "..:libdart_noopt", | 645 "..:libdart_noopt", |
| 623 ":dart_snapshot_cc", | 646 ":dart_snapshot_cc", |
| 624 "../observatory:standalone_observatory_archive", | 647 "../observatory:standalone_observatory_archive", |
| 625 ] | 648 ] |
| 626 extra_sources = [ | 649 extra_sources = [ "builtin_nolib.cc" ] |
| 627 "builtin_nolib.cc", | |
| 628 ] | |
| 629 } | 650 } |
| 630 | 651 |
| 631 dart_executable("dart_precompiled_runtime") { | 652 dart_executable("dart_precompiled_runtime") { |
| 632 extra_configs = [ | 653 extra_configs = [ "..:dart_precompiled_runtime_config" ] |
| 633 "..:dart_precompiled_runtime_config" | |
| 634 ] | |
| 635 extra_deps = [ | 654 extra_deps = [ |
| 636 "..:libdart_precompiled_runtime", | 655 "..:libdart_precompiled_runtime", |
| 637 "../observatory:standalone_observatory_archive", | 656 "../observatory:standalone_observatory_archive", |
| 638 ] | 657 ] |
| 639 extra_sources = [ | 658 extra_sources = [ |
| 640 "builtin_nolib.cc", | 659 "builtin_nolib.cc", |
| 641 "snapshot_empty.cc", | 660 "snapshot_empty.cc", |
| 642 ] | 661 ] |
| 643 } | 662 } |
| 644 } | 663 } |
| (...skipping 14 matching lines...) Expand all Loading... |
| 659 ":generate_blink_cc_file", | 678 ":generate_blink_cc_file", |
| 660 ":generate_indexed_db_cc_file", | 679 ":generate_indexed_db_cc_file", |
| 661 ":generate_cached_patches_cc_file", | 680 ":generate_cached_patches_cc_file", |
| 662 ":generate_web_gl_cc_file", | 681 ":generate_web_gl_cc_file", |
| 663 ":generate_metadata_cc_file", | 682 ":generate_metadata_cc_file", |
| 664 ":generate_web_sql_cc_file", | 683 ":generate_web_sql_cc_file", |
| 665 ":generate_svg_cc_file", | 684 ":generate_svg_cc_file", |
| 666 ":generate_web_audio_cc_file", | 685 ":generate_web_audio_cc_file", |
| 667 "..:libdart_nosnapshot_with_precompiler", | 686 "..:libdart_nosnapshot_with_precompiler", |
| 668 ] | 687 ] |
| 669 extra_defines = [ | 688 extra_defines = [ "NO_OBSERVATORY" ] |
| 670 "NO_OBSERVATORY", | |
| 671 ] | |
| 672 extra_sources = [ | 689 extra_sources = [ |
| 673 "builtin.cc", | 690 "builtin.cc", |
| 674 "builtin.h", | 691 "builtin.h", |
| 675 "observatory_assets_empty.cc", | 692 "observatory_assets_empty.cc", |
| 676 "snapshot_empty.cc", | 693 "snapshot_empty.cc", |
| 694 |
| 677 # Include generated source files. | 695 # Include generated source files. |
| 678 "$target_gen_dir/builtin_gen.cc", | 696 "$target_gen_dir/builtin_gen.cc", |
| 679 "$target_gen_dir/io_gen.cc", | 697 "$target_gen_dir/io_gen.cc", |
| 680 "$target_gen_dir/io_patch_gen.cc", | 698 "$target_gen_dir/io_patch_gen.cc", |
| 681 "$target_gen_dir/html_gen.cc", | 699 "$target_gen_dir/html_gen.cc", |
| 682 "$target_gen_dir/html_common_gen.cc", | 700 "$target_gen_dir/html_common_gen.cc", |
| 683 "$target_gen_dir/js_gen.cc", | 701 "$target_gen_dir/js_gen.cc", |
| 684 "$target_gen_dir/js_util_gen.cc", | 702 "$target_gen_dir/js_util_gen.cc", |
| 685 "$target_gen_dir/blink_gen.cc", | 703 "$target_gen_dir/blink_gen.cc", |
| 686 "$target_gen_dir/indexed_db_gen.cc", | 704 "$target_gen_dir/indexed_db_gen.cc", |
| 687 "$target_gen_dir/cached_patches_gen.cc", | 705 "$target_gen_dir/cached_patches_gen.cc", |
| 688 "$target_gen_dir/web_gl_gen.cc", | 706 "$target_gen_dir/web_gl_gen.cc", |
| 689 "$target_gen_dir/metadata_gen.cc", | 707 "$target_gen_dir/metadata_gen.cc", |
| 690 "$target_gen_dir/web_sql_gen.cc", | 708 "$target_gen_dir/web_sql_gen.cc", |
| 691 "$target_gen_dir/svg_gen.cc", | 709 "$target_gen_dir/svg_gen.cc", |
| 692 "$target_gen_dir/web_audio_gen.cc", | 710 "$target_gen_dir/web_audio_gen.cc", |
| 693 ] | 711 ] |
| 694 } | 712 } |
| 695 | 713 |
| 696 if (defined(is_fuchsia) && is_fuchsia) { | 714 if (defined(is_fuchsia) && is_fuchsia) { |
| 697 copy("hello_fuchsia") { | 715 copy("hello_fuchsia") { |
| 698 sources = [ "../tests/vm/dart/hello_fuchsia_test.dart" ] | 716 sources = [ |
| 699 outputs = [ "$root_out_dir/hello_fuchsia.dart" ] | 717 "../tests/vm/dart/hello_fuchsia_test.dart", |
| 718 ] |
| 719 outputs = [ |
| 720 "$root_out_dir/hello_fuchsia.dart", |
| 721 ] |
| 700 } | 722 } |
| 701 | 723 |
| 702 executable("run_vm_tests_fuchsia") { | 724 executable("run_vm_tests_fuchsia") { |
| 703 testonly = true | 725 testonly = true |
| 704 configs += ["..:dart_config"] | 726 configs += [ "..:dart_config" ] |
| 705 sources = [ | 727 sources = [ |
| 706 "run_vm_tests_fuchsia.cc" | 728 "run_vm_tests_fuchsia.cc", |
| 707 ] | 729 ] |
| 708 libs = [ | 730 libs = [ |
| 709 "launchpad", | 731 "launchpad", |
| 710 "magenta", | 732 "magenta", |
| 711 ] | 733 ] |
| 712 } | 734 } |
| 713 } | 735 } |
| 714 | 736 |
| 715 # This is only needed for the Fuchsia target build until the Observatory is | 737 # This is only needed for the Fuchsia target build until the Observatory is |
| 716 # supported. | 738 # supported. |
| 717 dart_executable("dart_no_observatory") { | 739 dart_executable("dart_no_observatory") { |
| 718 extra_deps = [ | 740 extra_deps = [ |
| 719 "..:libdart", | 741 "..:libdart", |
| 720 ":dart_snapshot_cc", | 742 ":dart_snapshot_cc", |
| 721 ] | 743 ] |
| 722 if (defined(is_fuchsia) && is_fuchsia) { | 744 if (defined(is_fuchsia) && is_fuchsia) { |
| 723 extra_deps += [ ":hello_fuchsia" ] | 745 extra_deps += [ ":hello_fuchsia" ] |
| 724 } | 746 } |
| 725 extra_defines = [ | 747 extra_defines = [ "NO_OBSERVATORY" ] |
| 726 "NO_OBSERVATORY", | 748 extra_sources = [ "observatory_assets_empty.cc" ] |
| 727 ] | |
| 728 extra_sources = [ | |
| 729 "observatory_assets_empty.cc", | |
| 730 ] | |
| 731 } | 749 } |
| 732 | 750 |
| 733 executable("process_test") { | 751 executable("process_test") { |
| 734 sources = [ | 752 sources = [ |
| 735 "process_test.cc", | 753 "process_test.cc", |
| 736 ] | 754 ] |
| 737 } | 755 } |
| 738 | 756 |
| 739 action("generate_snapshot_test_dat_file") { | 757 action("generate_snapshot_test_dat_file") { |
| 740 snapshot_test_dat_file = "$root_gen_dir/snapshot_test.dat" | 758 snapshot_test_dat_file = "$root_gen_dir/snapshot_test.dat" |
| (...skipping 17 matching lines...) Expand all Loading... |
| 758 rebase_path(snapshot_test_in_dat_file), | 776 rebase_path(snapshot_test_in_dat_file), |
| 759 "--include", | 777 "--include", |
| 760 "INTENTIONALLY_LEFT_BLANK", | 778 "INTENTIONALLY_LEFT_BLANK", |
| 761 "--var_name", | 779 "--var_name", |
| 762 "INTENTIONALLY_LEFT_BLANK_TOO", | 780 "INTENTIONALLY_LEFT_BLANK_TOO", |
| 763 rebase_path(snapshot_test_dart_file), | 781 rebase_path(snapshot_test_dart_file), |
| 764 ] | 782 ] |
| 765 } | 783 } |
| 766 | 784 |
| 767 executable("run_vm_tests") { | 785 executable("run_vm_tests") { |
| 768 configs += ["..:dart_config", | 786 configs += [ |
| 769 "..:dart_maybe_product_config"] | 787 "..:dart_config", |
| 788 "..:dart_maybe_product_config", |
| 789 ] |
| 770 deps = [ | 790 deps = [ |
| 771 "..:libdart", | 791 ":dart_snapshot_cc", |
| 792 ":generate_snapshot_test_dat_file", |
| 772 ":libdart_builtin", | 793 ":libdart_builtin", |
| 773 ":standalone_dart_io", | 794 ":standalone_dart_io", |
| 774 ":dart_snapshot_cc", | |
| 775 ":generate_snapshot_test_dat_file", | |
| 776 "$dart_zlib_path", | 795 "$dart_zlib_path", |
| 796 "..:libdart", |
| 777 ] | 797 ] |
| 778 include_dirs = [ | 798 include_dirs = [ |
| 779 "..", | 799 "..", |
| 780 "$target_gen_dir", | 800 "$target_gen_dir", |
| 781 ] | 801 ] |
| 782 defines = [ | 802 defines = [ "TESTING" ] |
| 783 "TESTING", | |
| 784 ] | |
| 785 | 803 |
| 786 if (dart_use_tcmalloc) { | 804 if (dart_use_tcmalloc) { |
| 787 deps += [ | 805 deps += [ "//third_party/tcmalloc" ] |
| 788 "//third_party/tcmalloc", | |
| 789 ] | |
| 790 } | 806 } |
| 791 | 807 |
| 792 # The VM sources are already included in libdart, so we just want to add in | 808 # The VM sources are already included in libdart, so we just want to add in |
| 793 # the tests here. | 809 # the tests here. |
| 794 vm_tests_list = exec_script("../../tools/gypi_to_gn.py", | 810 vm_tests_list = exec_script("../../tools/gypi_to_gn.py", |
| 795 [rebase_path("../vm/vm_sources.gypi"), | 811 [ |
| 796 "--keep_only=_test.cc", | 812 rebase_path("../vm/vm_sources.gypi"), |
| 797 "--keep_only=_test.h",], | 813 "--keep_only=_test.cc", |
| 798 "scope", | 814 "--keep_only=_test.h", |
| 799 ["../vm/vm_sources.gypi"]) | 815 ], |
| 816 "scope", |
| 817 [ "../vm/vm_sources.gypi" ]) |
| 800 vm_tests = rebase_path(vm_tests_list.sources, ".", "../vm") | 818 vm_tests = rebase_path(vm_tests_list.sources, ".", "../vm") |
| 801 | 819 |
| 802 builtin_impl_tests_list = | 820 builtin_impl_tests_list = |
| 803 exec_script("../../tools/gypi_to_gn.py", | 821 exec_script("../../tools/gypi_to_gn.py", |
| 804 [rebase_path("builtin_impl_sources.gypi"), | 822 [ |
| 805 "--keep_only=_test.cc", | 823 rebase_path("builtin_impl_sources.gypi"), |
| 806 "--keep_only=_test.h",], | 824 "--keep_only=_test.cc", |
| 825 "--keep_only=_test.h", |
| 826 ], |
| 807 "scope", | 827 "scope", |
| 808 ["builtin_impl_sources.gypi"]) | 828 [ "builtin_impl_sources.gypi" ]) |
| 809 | 829 |
| 810 sources = [ | 830 sources = [ |
| 811 "builtin_nolib.cc", | 831 "builtin_nolib.cc", |
| 812 "run_vm_tests.cc", | 832 "run_vm_tests.cc", |
| 813 ] + builtin_impl_tests_list.sources + vm_tests | 833 ] + builtin_impl_tests_list.sources + vm_tests |
| 814 | 834 |
| 815 if (!is_win) { | 835 if (!is_win) { |
| 816 ldflags = [ | 836 ldflags = [ "-rdynamic" ] |
| 817 "-rdynamic", | |
| 818 ] | |
| 819 } | 837 } |
| 820 | 838 |
| 821 if (is_win) { | 839 if (is_win) { |
| 822 libs = [ | 840 libs = [ |
| 823 "iphlpapi.lib", | 841 "iphlpapi.lib", |
| 824 "psapi.lib", | 842 "psapi.lib", |
| 825 "ws2_32.lib", | 843 "ws2_32.lib", |
| 826 "Rpcrt4.lib", | 844 "Rpcrt4.lib", |
| 827 "winmm.lib", | 845 "winmm.lib", |
| 828 ] | 846 ] |
| 829 } | 847 } |
| 830 } | 848 } |
| 831 | 849 |
| 832 if (!defined(is_fuchsia) || !is_fuchsia) { | 850 if (!defined(is_fuchsia) || !is_fuchsia) { |
| 833 shared_library("test_extension") { | 851 shared_library("test_extension") { |
| 834 deps = [ | 852 deps = [ |
| 835 ":dart", | 853 ":dart", |
| 836 ] | 854 ] |
| 837 sources = [ | 855 sources = [ |
| 838 "test_extension.c", | 856 "test_extension.c", |
| 839 "test_extension_dllmain_win.cc", | 857 "test_extension_dllmain_win.cc", |
| 840 ] | 858 ] |
| 841 include_dirs = [ | 859 include_dirs = [ ".." ] |
| 842 "..", | |
| 843 ] | |
| 844 defines = [ | 860 defines = [ |
| 845 # The only effect of DART_SHARED_LIB is to export the Dart API. | 861 # The only effect of DART_SHARED_LIB is to export the Dart API. |
| 846 "DART_SHARED_LIB", | 862 "DART_SHARED_LIB", |
| 847 ] | 863 ] |
| 848 if (is_win) { | 864 if (is_win) { |
| 849 libs = [ | 865 libs = [ "dart.lib" ] |
| 850 "dart.lib" | |
| 851 ] | |
| 852 abs_root_out_dir = rebase_path(root_out_dir) | 866 abs_root_out_dir = rebase_path(root_out_dir) |
| 853 ldflags = [ | 867 ldflags = [ "/LIBPATH:$abs_root_out_dir" ] |
| 854 "/LIBPATH:$abs_root_out_dir" | |
| 855 ] | |
| 856 } | 868 } |
| 857 } | 869 } |
| 858 | 870 |
| 859 shared_library("sample_extension") { | 871 shared_library("sample_extension") { |
| 860 deps = [ | 872 deps = [ |
| 861 ":dart", | 873 ":dart", |
| 862 ] | 874 ] |
| 863 sources = [ | 875 sources = [ |
| 864 "../../samples/sample_extension/sample_extension.cc", | 876 "../../samples/sample_extension/sample_extension.cc", |
| 865 "../../samples/sample_extension/sample_extension_dllmain_win.cc", | 877 "../../samples/sample_extension/sample_extension_dllmain_win.cc", |
| 866 ] | 878 ] |
| 867 include_dirs = [ | 879 include_dirs = [ ".." ] |
| 868 "..", | |
| 869 ] | |
| 870 defines = [ | 880 defines = [ |
| 871 # The only effect of DART_SHARED_LIB is to export the Dart API. | 881 # The only effect of DART_SHARED_LIB is to export the Dart API. |
| 872 "DART_SHARED_LIB", | 882 "DART_SHARED_LIB", |
| 873 ] | 883 ] |
| 874 if (is_win) { | 884 if (is_win) { |
| 875 libs = [ | 885 libs = [ "dart.lib" ] |
| 876 "dart.lib" | |
| 877 ] | |
| 878 abs_root_out_dir = rebase_path(root_out_dir) | 886 abs_root_out_dir = rebase_path(root_out_dir) |
| 879 ldflags = [ | 887 ldflags = [ "/LIBPATH:$abs_root_out_dir" ] |
| 880 "/LIBPATH:$abs_root_out_dir" | |
| 881 ] | |
| 882 } | 888 } |
| 883 } | 889 } |
| 884 } | 890 } |
| OLD | NEW |