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("../../build/executable_suffix.gni") | 5 import("../../build/executable_suffix.gni") |
| 6 import("../../build/prebuilt_dart_sdk.gni") | 6 import("../../build/prebuilt_dart_sdk.gni") |
| 7 import("gypi_contents.gni") | |
| 7 | 8 |
| 8 config("libdart_vm_config") { | 9 config("libdart_vm_config") { |
| 9 if (defined(is_fuchsia) && is_fuchsia) { | 10 if (defined(is_fuchsia) && is_fuchsia) { |
| 10 libs = [ "magenta" ] | 11 libs = [ "magenta" ] |
| 11 } else if (is_win) { | 12 } else if (is_win) { |
| 12 libs = [ | 13 libs = [ |
| 13 "advapi32.lib", | 14 "advapi32.lib", |
| 14 "shell32.lib", | 15 "shell32.lib", |
| 15 "dbghelp.lib", | 16 "dbghelp.lib", |
| 16 ] | 17 ] |
| 17 } else { | 18 } else { |
| 18 libs = [ "dl" ] | 19 libs = [ "dl" ] |
| 19 if (!is_android) { | 20 if (!is_android) { |
| 20 libs += [ "pthread" ] | 21 libs += [ "pthread" ] |
| 21 } | 22 } |
| 22 if (is_linux) { | 23 if (is_linux) { |
| 23 libs += [ "rt" ] | 24 libs += [ "rt" ] |
| 24 } | 25 } |
| 25 } | 26 } |
| 26 } | 27 } |
| 27 | 28 |
| 28 static_library("libdart_platform") { | 29 static_library("libdart_platform") { |
| 29 configs += [ | 30 configs += [ |
| 30 "..:dart_config", | 31 "..:dart_config", |
| 31 "..:dart_maybe_product_config", | 32 "..:dart_maybe_product_config", |
| 32 ] | 33 ] |
| 33 public_configs = [ ":libdart_vm_config" ] | 34 public_configs = [ ":libdart_vm_config" ] |
| 34 | 35 |
| 35 platform_headers_gypi = | 36 sources = rebase_path(processed_gypis.platform_sources, ".", "../platform") |
| 36 exec_script("../../tools/gypi_to_gn.py", | |
| 37 [ rebase_path("../platform/platform_headers.gypi") ], | |
| 38 "scope", | |
| 39 [ "../platform/platform_headers.gypi" ]) | |
| 40 platform_headers = | |
| 41 rebase_path(platform_headers_gypi.sources, ".", "../platform") | |
| 42 | 37 |
| 43 platform_sources_gypi = | |
| 44 exec_script("../../tools/gypi_to_gn.py", | |
| 45 [ rebase_path("../platform/platform_sources.gypi") ], | |
| 46 "scope", | |
| 47 [ "../platform/platform_sources.gypi" ]) | |
| 48 platform_sources = | |
| 49 rebase_path(platform_sources_gypi.sources, ".", "../platform") | |
| 50 | |
| 51 sources = platform_headers + platform_sources | |
| 52 include_dirs = [ ".." ] | 38 include_dirs = [ ".." ] |
| 53 } | 39 } |
| 54 | 40 |
| 55 vm_sources_list = exec_script("../../tools/gypi_to_gn.py", | 41 vm_sources_list = processed_gypis.vm_sources |
| 56 [ rebase_path("vm_sources.gypi") ], | |
| 57 "scope", | |
| 58 [ "vm_sources.gypi" ]) | |
| 59 | 42 |
| 60 static_library("libdart_vm") { | 43 static_library("libdart_vm") { |
| 61 configs += [ | 44 configs += [ |
| 62 "..:dart_config", | 45 "..:dart_config", |
| 63 "..:dart_maybe_product_config", | 46 "..:dart_maybe_product_config", |
| 64 "..:dart_maybe_precompiled_runtime_config", | 47 "..:dart_maybe_precompiled_runtime_config", |
| 65 ] | 48 ] |
| 66 public_configs = [ ":libdart_vm_config" ] | 49 public_configs = [ ":libdart_vm_config" ] |
| 67 set_sources_assignment_filter([ | 50 set_sources_assignment_filter([ |
| 68 "*_test.cc", | 51 "*_test.cc", |
| 69 "*_test.h", | 52 "*_test.h", |
| 70 ]) | 53 ]) |
| 71 sources = vm_sources_list.sources | 54 sources = vm_sources_list |
| 72 include_dirs = [ ".." ] | 55 include_dirs = [ ".." ] |
| 73 } | 56 } |
| 74 | 57 |
| 75 static_library("libdart_vm_noopt") { | 58 static_library("libdart_vm_noopt") { |
| 76 configs += [ | 59 configs += [ |
| 77 "..:dart_config", | 60 "..:dart_config", |
| 78 "..:dart_maybe_product_config", | 61 "..:dart_maybe_product_config", |
| 79 "..:dart_precompiler_config", | 62 "..:dart_precompiler_config", |
| 80 "..:dart_maybe_precompiled_runtime_config", | 63 "..:dart_maybe_precompiled_runtime_config", |
| 81 ] | 64 ] |
| 82 public_configs = [ ":libdart_vm_config" ] | 65 public_configs = [ ":libdart_vm_config" ] |
| 83 set_sources_assignment_filter([ | 66 set_sources_assignment_filter([ |
| 84 "*_test.cc", | 67 "*_test.cc", |
| 85 "*_test.h", | 68 "*_test.h", |
| 86 ]) | 69 ]) |
| 87 sources = vm_sources_list.sources | 70 sources = vm_sources_list |
| 88 include_dirs = [ ".." ] | 71 include_dirs = [ ".." ] |
| 89 } | 72 } |
| 90 | 73 |
| 91 static_library("libdart_vm_precompiled_runtime") { | 74 static_library("libdart_vm_precompiled_runtime") { |
| 92 configs += [ | 75 configs += [ |
| 93 "..:dart_config", | 76 "..:dart_config", |
| 94 "..:dart_maybe_product_config", | 77 "..:dart_maybe_product_config", |
| 95 "..:dart_precompiled_runtime_config", | 78 "..:dart_precompiled_runtime_config", |
| 96 ] | 79 ] |
| 97 public_configs = [ ":libdart_vm_config" ] | 80 public_configs = [ ":libdart_vm_config" ] |
| 98 set_sources_assignment_filter([ | 81 set_sources_assignment_filter([ |
| 99 "*_test.cc", | 82 "*_test.cc", |
| 100 "*_test.h", | 83 "*_test.h", |
| 101 ]) | 84 ]) |
| 102 sources = vm_sources_list.sources | 85 sources = vm_sources_list |
| 103 include_dirs = [ ".." ] | 86 include_dirs = [ ".." ] |
| 104 } | 87 } |
| 105 | 88 |
| 106 static_library("libdart_vm_nosnapshot") { | 89 static_library("libdart_vm_nosnapshot") { |
| 107 configs += [ | 90 configs += [ |
| 108 "..:dart_config", | 91 "..:dart_config", |
| 109 "..:dart_maybe_product_config", | 92 "..:dart_maybe_product_config", |
| 110 "..:dart_maybe_precompiled_runtime_config", | 93 "..:dart_maybe_precompiled_runtime_config", |
| 111 "..:dart_no_snapshot_config", | 94 "..:dart_no_snapshot_config", |
| 112 ] | 95 ] |
| 113 public_configs = [ ":libdart_vm_config" ] | 96 public_configs = [ ":libdart_vm_config" ] |
| 114 set_sources_assignment_filter([ | 97 set_sources_assignment_filter([ |
| 115 "*_test.cc", | 98 "*_test.cc", |
| 116 "*_test.h", | 99 "*_test.h", |
| 117 ]) | 100 ]) |
| 118 sources = vm_sources_list.sources | 101 sources = vm_sources_list |
| 119 include_dirs = [ ".." ] | 102 include_dirs = [ ".." ] |
| 120 } | 103 } |
| 121 | 104 |
| 122 static_library("libdart_vm_nosnapshot_precompiled_runtime") { | 105 static_library("libdart_vm_nosnapshot_precompiled_runtime") { |
| 123 configs += [ | 106 configs += [ |
| 124 "..:dart_config", | 107 "..:dart_config", |
| 125 "..:dart_maybe_product_config", | 108 "..:dart_maybe_product_config", |
| 126 "..:dart_precompiled_runtime_config", | 109 "..:dart_precompiled_runtime_config", |
| 127 "..:dart_no_snapshot_config", | 110 "..:dart_no_snapshot_config", |
| 128 ] | 111 ] |
| 129 public_configs = [ ":libdart_vm_config" ] | 112 public_configs = [ ":libdart_vm_config" ] |
| 130 set_sources_assignment_filter([ | 113 set_sources_assignment_filter([ |
| 131 "*_test.cc", | 114 "*_test.cc", |
| 132 "*_test.h", | 115 "*_test.h", |
| 133 ]) | 116 ]) |
| 134 sources = vm_sources_list.sources | 117 sources = vm_sources_list |
| 135 include_dirs = [ ".." ] | 118 include_dirs = [ ".." ] |
| 136 } | 119 } |
| 137 | 120 |
| 138 static_library("libdart_vm_nosnapshot_with_precompiler") { | 121 static_library("libdart_vm_nosnapshot_with_precompiler") { |
| 139 configs += [ | 122 configs += [ |
| 140 "..:dart_config", | 123 "..:dart_config", |
| 141 "..:dart_maybe_product_config", | 124 "..:dart_maybe_product_config", |
| 142 "..:dart_precompiler_config", | 125 "..:dart_precompiler_config", |
| 143 "..:dart_no_snapshot_config", | 126 "..:dart_no_snapshot_config", |
| 144 ] | 127 ] |
| 145 public_configs = [ ":libdart_vm_config" ] | 128 public_configs = [ ":libdart_vm_config" ] |
| 146 set_sources_assignment_filter([ | 129 set_sources_assignment_filter([ |
| 147 "*_test.cc", | 130 "*_test.cc", |
| 148 "*_test.h", | 131 "*_test.h", |
| 149 ]) | 132 ]) |
| 150 sources = vm_sources_list.sources | 133 sources = vm_sources_list |
| 151 include_dirs = [ ".." ] | 134 include_dirs = [ ".." ] |
| 152 } | 135 } |
| 153 | 136 |
| 154 template("process_library_source") { | 137 template("process_library_source") { |
| 155 assert(defined(invoker.filename), "Need filename in $target_name") | 138 assert(defined(invoker.libsources), "Need libsources in $target_name") |
| 156 assert(defined(invoker.output), "Need output in $target_name") | 139 assert(defined(invoker.output), "Need output in $target_name") |
| 157 assert(defined(invoker.path), "Need path in $target_name") | |
| 158 action(target_name) { | 140 action(target_name) { |
| 159 visibility = [ ":*" ] # Only targets in this file can see this. | 141 visibility = [ ":*" ] # Only targets in this file can see this. |
| 160 filename = invoker.filename | 142 libsources = invoker.libsources |
| 161 path = invoker.path | |
| 162 | |
| 163 lib_sources_gypi = | |
| 164 exec_script("../../tools/gypi_to_gn.py", | |
| 165 [ rebase_path("${path}/${filename}_sources.gypi") ], | |
| 166 "scope", | |
| 167 [ "${path}/${filename}_sources.gypi" ]) | |
| 168 lib_sources = rebase_path(lib_sources_gypi.sources, ".", path) | |
| 169 | 143 |
| 170 script = invoker.script | 144 script = invoker.script |
| 171 inputs = invoker.inputs + [ script ] | 145 inputs = invoker.inputs + libsources |
| 172 inputs += lib_sources | |
| 173 outputs = [ | 146 outputs = [ |
| 174 invoker.output, | 147 invoker.output, |
| 175 ] | 148 ] |
| 176 args = invoker.args + rebase_path(lib_sources, root_build_dir) | 149 args = invoker.args + rebase_path(libsources, root_build_dir) |
| 177 } | 150 } |
| 178 } | 151 } |
| 179 | 152 |
| 180 template("generate_library_source") { | 153 template("generate_library_source") { |
| 181 assert(defined(invoker.libname), "Need libname in $target_name") | 154 assert(defined(invoker.libname), "Need libname in $target_name") |
| 182 assert(defined(invoker.filename), "Need a filename in $target_name") | 155 assert(defined(invoker.libsources), "Need libsources in $target_name") |
| 183 assert(defined(invoker.kind), "Need kind in $target_name") | 156 assert(defined(invoker.kind), "Need kind in $target_name") |
| 184 assert(defined(invoker.output), "Need output in $target_name") | 157 assert(defined(invoker.output), "Need output in $target_name") |
| 185 assert(defined(invoker.path), "Need path in $target_name") | |
| 186 | 158 |
| 187 process_library_source(target_name) { | 159 process_library_source(target_name) { |
| 188 libname = invoker.libname | 160 libname = invoker.libname |
| 189 filename = invoker.filename | 161 libsources = invoker.libsources |
| 190 kind = invoker.kind | 162 kind = invoker.kind |
| 191 output = invoker.output | |
| 192 path = invoker.path | |
| 193 script = "../tools/gen_library_src_paths.py" | 163 script = "../tools/gen_library_src_paths.py" |
| 194 inputs = [ | 164 inputs = [ |
| 195 "../lib/libgen_in.cc", | 165 "../lib/libgen_in.cc", |
| 196 ] | 166 ] |
| 167 output = invoker.output | |
| 197 args = [ | 168 args = [ |
| 198 "--output", | 169 "--output", |
| 199 rebase_path(invoker.output, root_build_dir), | 170 rebase_path(invoker.output, root_build_dir), |
| 200 "--input_cc", | 171 "--input_cc", |
| 201 rebase_path("../lib/libgen_in.cc", root_build_dir), | 172 rebase_path("../lib/libgen_in.cc", root_build_dir), |
| 202 "--include", | 173 "--include", |
| 203 "vm/bootstrap.h", | 174 "vm/bootstrap.h", |
| 204 "--var_name", | 175 "--var_name", |
| 205 "dart::Bootstrap::${libname}_${kind}_paths_", | 176 "dart::Bootstrap::${libname}_${kind}_paths_", |
| 206 "--library_name", | 177 "--library_name", |
| 207 "dart:${libname}", | 178 "dart:${libname}", |
| 208 ] | 179 ] |
| 209 } | 180 } |
| 210 } | 181 } |
| 211 | 182 |
| 212 # This templates expects invoker.sources to be a list of pairs of strings. | 183 # This templates expects invoker.sources to be a list of pairs of strings. |
|
zra
2016/11/10 21:30:41
This comment was already out of date, but maybe no
| |
| 213 # The pairs of strings mean the following. | 184 # The pairs of strings mean the following. |
| 214 # library name, file name | 185 # library name, file name |
| 215 # e.g. for the "internal" library named "dart:_internal", | 186 # e.g. for the "internal" library named "dart:_internal", |
| 216 # with sources listed at sdk/lib/internal/internal_sources.gypi and | 187 # with sources listed at sdk/lib/internal/internal_sources.gypi and |
| 217 # lib/internal_sources.gypi, we have: ["_internal", "internal"] | 188 # lib/internal_sources.gypi, we have: ["_internal", "internal"] |
| 218 # | 189 # |
| 219 # The template iterates over the list, and generates generate_library_source | 190 # The template iterates over the list, and generates generate_library_source |
| 220 # actions for each. After that, it generates targets to compile the generated | 191 # actions for each. After that, it generates targets to compile the generated |
| 221 # sources to make libdart_lib_nosnapshot and libdart_lib. | 192 # sources to make libdart_lib_nosnapshot and libdart_lib. |
| 222 template("generate_core_libraries") { | 193 template("generate_core_libraries") { |
| 223 assert(defined(invoker.sources), "Need sources in $target_name") | 194 assert(defined(invoker.sources), "Need sources in $target_name") |
| 195 assert(defined(invoker.allsources), "Need allsources in $target_name") | |
| 224 liboutputs = [] | 196 liboutputs = [] |
| 225 libsources = [] | |
| 226 libdeps = [] | 197 libdeps = [] |
| 227 foreach(lib, invoker.sources) { | 198 foreach(lib, invoker.sources) { |
| 228 libname = lib[0] | 199 libname = lib[0] |
| 229 filename = lib[1] | 200 filename = lib[3] |
| 230 do_patch = lib[2] | 201 do_patch = lib[4] |
| 231 source_path = lib[3] | |
| 232 generate_library_source("generate_${filename}_cc_file") { | 202 generate_library_source("generate_${filename}_cc_file") { |
| 233 libname = libname | 203 libname = libname |
| 234 filename = filename | 204 libsources = rebase_path(lib[1], ".", lib[2]) |
| 235 kind = "source" | 205 kind = "source" |
| 236 path = source_path | |
| 237 output = "$target_gen_dir/${filename}_gen.cc" | 206 output = "$target_gen_dir/${filename}_gen.cc" |
| 238 } | 207 } |
| 239 if (do_patch) { | 208 if (do_patch) { |
| 240 patch_path = lib[4] | |
| 241 generate_library_source("generate_${filename}_patch_cc_file") { | 209 generate_library_source("generate_${filename}_patch_cc_file") { |
| 242 libname = libname | 210 libname = libname |
| 243 filename = filename | 211 libsources = rebase_path(lib[5], ".", lib[6]) |
| 244 kind = "patch" | 212 kind = "patch" |
| 245 path = patch_path | |
| 246 output = "$target_gen_dir/${filename}_patch_gen.cc" | 213 output = "$target_gen_dir/${filename}_patch_gen.cc" |
| 247 } | 214 } |
| 248 } | 215 } |
| 249 lib_sources_gypi = { | 216 |
| 250 } | |
| 251 lib_sources_gypi = | |
| 252 exec_script("../../tools/gypi_to_gn.py", | |
| 253 [ rebase_path("../lib/${filename}_sources.gypi") ], | |
| 254 "scope", | |
| 255 [ "../lib/${filename}_sources.gypi" ]) | |
| 256 libsources += rebase_path(lib_sources_gypi.sources, ".", "../lib") | |
| 257 liboutputs += [ "$target_gen_dir/${filename}_gen.cc" ] | 217 liboutputs += [ "$target_gen_dir/${filename}_gen.cc" ] |
| 258 libdeps += [ ":generate_${filename}_cc_file" ] | 218 libdeps += [ ":generate_${filename}_cc_file" ] |
| 259 if (do_patch) { | 219 if (do_patch) { |
| 260 liboutputs += [ "$target_gen_dir/${filename}_patch_gen.cc" ] | 220 liboutputs += [ "$target_gen_dir/${filename}_patch_gen.cc" ] |
| 261 libdeps += [ ":generate_${filename}_patch_cc_file" ] | 221 libdeps += [ ":generate_${filename}_patch_cc_file" ] |
| 262 } | 222 } |
| 263 } | 223 } |
| 264 | 224 |
| 225 all_libsources = rebase_path(invoker.allsources, ".", "../lib") | |
| 226 | |
| 265 static_library("libdart_lib_nosnapshot") { | 227 static_library("libdart_lib_nosnapshot") { |
| 266 configs += [ | 228 configs += [ |
| 267 "..:dart_config", | 229 "..:dart_config", |
| 268 "..:dart_maybe_product_config", | 230 "..:dart_maybe_product_config", |
| 269 "..:dart_maybe_precompiled_runtime_config", | 231 "..:dart_maybe_precompiled_runtime_config", |
| 270 ] | 232 ] |
| 271 deps = libdeps | 233 deps = libdeps |
| 272 sources = libsources + [ "bootstrap.cc" ] + liboutputs | 234 sources = all_libsources + [ "bootstrap.cc" ] + liboutputs |
| 273 include_dirs = [ ".." ] | 235 include_dirs = [ ".." ] |
| 274 } | 236 } |
| 275 static_library("libdart_lib_nosnapshot_precompiled_runtime") { | 237 static_library("libdart_lib_nosnapshot_precompiled_runtime") { |
| 276 configs += [ | 238 configs += [ |
| 277 "..:dart_config", | 239 "..:dart_config", |
| 278 "..:dart_maybe_product_config", | 240 "..:dart_maybe_product_config", |
| 279 "..:dart_precompiled_runtime_config", | 241 "..:dart_precompiled_runtime_config", |
| 280 ] | 242 ] |
| 281 deps = libdeps | 243 deps = libdeps |
| 282 sources = libsources + [ "bootstrap.cc" ] + liboutputs | 244 sources = all_libsources + [ "bootstrap.cc" ] + liboutputs |
| 283 include_dirs = [ ".." ] | 245 include_dirs = [ ".." ] |
| 284 } | 246 } |
| 285 static_library("libdart_lib_nosnapshot_with_precompiler") { | 247 static_library("libdart_lib_nosnapshot_with_precompiler") { |
| 286 configs += [ | 248 configs += [ |
| 287 "..:dart_config", | 249 "..:dart_config", |
| 288 "..:dart_maybe_product_config", | 250 "..:dart_maybe_product_config", |
| 289 "..:dart_precompiler_config", | 251 "..:dart_precompiler_config", |
| 290 ] | 252 ] |
| 291 deps = libdeps | 253 deps = libdeps |
| 292 sources = libsources + [ "bootstrap.cc" ] + liboutputs | 254 sources = all_libsources + [ "bootstrap.cc" ] + liboutputs |
| 293 include_dirs = [ ".." ] | 255 include_dirs = [ ".." ] |
| 294 } | 256 } |
| 295 static_library("libdart_lib") { | 257 static_library("libdart_lib") { |
| 296 configs += [ | 258 configs += [ |
| 297 "..:dart_config", | 259 "..:dart_config", |
| 298 "..:dart_maybe_product_config", | 260 "..:dart_maybe_product_config", |
| 299 "..:dart_maybe_precompiled_runtime_config", | 261 "..:dart_maybe_precompiled_runtime_config", |
| 300 ] | 262 ] |
| 301 sources = libsources + [ "bootstrap_nocore.cc" ] | 263 sources = all_libsources + [ "bootstrap_nocore.cc" ] |
| 302 include_dirs = [ ".." ] | 264 include_dirs = [ ".." ] |
| 303 } | 265 } |
| 304 static_library("libdart_lib_precompiled_runtime") { | 266 static_library("libdart_lib_precompiled_runtime") { |
| 305 configs += [ | 267 configs += [ |
| 306 "..:dart_config", | 268 "..:dart_config", |
| 307 "..:dart_maybe_product_config", | 269 "..:dart_maybe_product_config", |
| 308 "..:dart_precompiled_runtime_config", | 270 "..:dart_precompiled_runtime_config", |
| 309 ] | 271 ] |
| 310 sources = libsources + [ "bootstrap_nocore.cc" ] | 272 sources = all_libsources + [ "bootstrap_nocore.cc" ] |
| 311 include_dirs = [ ".." ] | 273 include_dirs = [ ".." ] |
| 312 } | 274 } |
| 313 } | 275 } |
| 314 | 276 |
| 315 generate_core_libraries("core_libraries") { | 277 generate_core_libraries("core_libraries") { |
| 316 sources = [ | 278 sources = [ |
| 317 [ | 279 [ |
| 318 "async", | 280 "async", |
| 281 processed_gypis.async_sdk_sources, | |
|
jamesr
2016/11/10 21:17:26
i sent a patch to GN to allow indexing into a scop
zra
2016/11/10 21:30:41
Acknowledged.
| |
| 282 "../../sdk/lib/async", | |
| 319 "async", | 283 "async", |
| 320 true, | 284 true, |
| 321 "../../sdk/lib/async", | 285 processed_gypis.async_runtime_sources, |
| 322 "../lib", | 286 "../lib", |
| 323 ], | 287 ], |
| 324 [ | 288 [ |
| 325 "core", | 289 "core", |
| 290 processed_gypis.core_sdk_sources, | |
| 291 "../../sdk/lib/core", | |
| 326 "core", | 292 "core", |
| 327 true, | 293 true, |
| 328 "../../sdk/lib/core", | 294 processed_gypis.core_runtime_sources, |
| 329 "../lib", | 295 "../lib", |
| 330 ], | 296 ], |
| 331 [ | 297 [ |
| 332 "collection", | 298 "collection", |
| 299 processed_gypis.collection_sdk_sources, | |
| 300 "../../sdk/lib/collection", | |
| 333 "collection", | 301 "collection", |
| 334 true, | 302 true, |
| 335 "../../sdk/lib/collection", | 303 processed_gypis.collection_runtime_sources, |
| 336 "../lib", | 304 "../lib", |
| 337 ], | 305 ], |
| 338 [ | 306 [ |
| 339 "convert", | 307 "convert", |
| 308 processed_gypis.convert_sdk_sources, | |
| 309 "../../sdk/lib/convert", | |
| 340 "convert", | 310 "convert", |
| 341 true, | 311 true, |
| 342 "../../sdk/lib/convert", | 312 processed_gypis.convert_runtime_sources, |
| 343 "../lib", | 313 "../lib", |
| 344 ], | 314 ], |
| 345 [ | 315 [ |
| 346 "developer", | 316 "developer", |
| 317 processed_gypis.developer_sdk_sources, | |
| 318 "../../sdk/lib/developer", | |
| 347 "developer", | 319 "developer", |
| 348 true, | 320 true, |
| 349 "../../sdk/lib/developer", | 321 processed_gypis.developer_runtime_sources, |
| 350 "../lib", | 322 "../lib", |
| 351 ], | 323 ], |
| 352 [ | 324 [ |
| 353 "_internal", | 325 "_internal", |
| 326 processed_gypis.internal_sdk_sources, | |
| 327 "../../sdk/lib/internal", | |
| 354 "internal", | 328 "internal", |
| 355 true, | 329 true, |
| 356 "../../sdk/lib/internal", | 330 processed_gypis.internal_runtime_sources, |
| 357 "../lib", | 331 "../lib", |
| 358 ], | 332 ], |
| 359 [ | 333 [ |
| 360 "isolate", | 334 "isolate", |
| 335 processed_gypis.isolate_sdk_sources, | |
| 336 "../../sdk/lib/isolate", | |
| 361 "isolate", | 337 "isolate", |
| 362 true, | 338 true, |
| 363 "../../sdk/lib/isolate", | 339 processed_gypis.isolate_runtime_sources, |
| 364 "../lib", | 340 "../lib", |
| 365 ], | 341 ], |
| 366 [ | 342 [ |
| 367 "math", | 343 "math", |
| 344 processed_gypis.math_sdk_sources, | |
| 345 "../../sdk/lib/math", | |
| 368 "math", | 346 "math", |
| 369 true, | 347 true, |
| 370 "../../sdk/lib/math", | 348 processed_gypis.math_runtime_sources, |
| 371 "../lib", | 349 "../lib", |
| 372 ], | 350 ], |
| 373 [ | 351 [ |
| 374 "mirrors", | 352 "mirrors", |
| 353 processed_gypis.mirrors_sdk_sources, | |
| 354 "../../sdk/lib/mirrors", | |
| 375 "mirrors", | 355 "mirrors", |
| 376 true, | 356 true, |
| 377 "../../sdk/lib/mirrors", | 357 processed_gypis.mirrors_runtime_sources, |
| 378 "../lib", | 358 "../lib", |
| 379 ], | 359 ], |
| 380 [ | 360 [ |
| 381 "profiler", | 361 "profiler", |
| 362 processed_gypis.profiler_sdk_sources, | |
| 363 "../../sdk/lib/profiler", | |
| 382 "profiler", | 364 "profiler", |
| 383 false, | 365 false, |
| 384 "../../sdk/lib/profiler", | |
| 385 ], | 366 ], |
| 386 [ | 367 [ |
| 387 "typed_data", | 368 "typed_data", |
| 369 processed_gypis.typed_data_runtime_sources, | |
| 370 "../lib", | |
| 388 "typed_data", | 371 "typed_data", |
| 389 false, | 372 false, |
| 390 "../lib", | |
| 391 ], | 373 ], |
| 392 [ | 374 [ |
| 393 "_vmservice", | 375 "_vmservice", |
| 376 processed_gypis.vmservice_sdk_sources, | |
| 377 "../../sdk/lib/vmservice", | |
| 394 "vmservice", | 378 "vmservice", |
| 395 true, | 379 true, |
| 396 "../../sdk/lib/vmservice", | 380 processed_gypis.vmservice_runtime_sources, |
| 397 "../lib", | 381 "../lib", |
| 398 ], | 382 ], |
| 399 ] | 383 ] |
| 384 allsources = processed_gypis.allsources | |
| 400 } | 385 } |
| 401 | 386 |
| 402 template("concatenate_patch") { | 387 template("concatenate_patch") { |
| 403 assert(defined(invoker.libname), "Need a name in $target_name") | 388 assert(defined(invoker.libsources), "Need a sources in $target_name") |
| 404 assert(defined(invoker.dir), "Need a dir in $target_name") | |
| 405 assert(defined(invoker.output), "Need an output in $target_name") | 389 assert(defined(invoker.output), "Need an output in $target_name") |
| 406 | 390 |
| 407 process_library_source(target_name) { | 391 process_library_source(target_name) { |
| 392 libsources = invoker.libsources | |
| 393 inputs = [] | |
| 408 output = invoker.output | 394 output = invoker.output |
| 409 path = "../${invoker.dir}" | |
| 410 filename = invoker.libname | |
| 411 script = "../tools/concatenate_patches.py" | 395 script = "../tools/concatenate_patches.py" |
| 412 args = [ | 396 args = [ |
| 413 "--output", | 397 "--output", |
| 414 rebase_path(output, root_build_dir), | 398 rebase_path(output, root_build_dir), |
| 415 ] | 399 ] |
| 416 inputs = [] | |
| 417 } | 400 } |
| 418 } | 401 } |
| 419 | 402 |
| 420 if (!defined(is_fuchsia) || !is_fuchsia) { | 403 if (!defined(is_fuchsia) || !is_fuchsia) { |
| 421 template("generate_patched_sdk") { | 404 template("generate_patched_sdk") { |
| 422 assert(defined(invoker.libraries), "Need libraries in $target_name") | 405 assert(defined(invoker.libraries), "Need libraries in $target_name") |
| 423 | 406 |
| 424 concatenation_target_names = [] | 407 concatenation_target_names = [] |
| 425 concatenation_files = [] | 408 concatenation_files = [] |
| 426 | 409 |
| 427 # Concatenate vm library patches. | 410 # Concatenate vm library patches. |
| 428 foreach(library, invoker.libraries) { | 411 foreach(library, invoker.libraries) { |
| 429 name = library[1] | 412 name = library[0] |
| 430 | 413 |
| 431 target_output = "$target_gen_dir/patches/${name}_patch.dart" | 414 target_output = "$target_gen_dir/patches/${name}_patch.dart" |
| 432 concatenate_patch("concatenate_${name}_patch") { | 415 concatenate_patch("concatenate_${name}_patch") { |
| 433 libname = name | 416 libsources = library[1] |
| 434 dir = library[0] | |
| 435 output = target_output | 417 output = target_output |
| 436 } | 418 } |
| 437 concatenation_target_names += [ ":concatenate_${name}_patch" ] | 419 concatenation_target_names += [ ":concatenate_${name}_patch" ] |
| 438 concatenation_files += [ target_output ] | 420 concatenation_files += [ target_output ] |
| 439 } | 421 } |
| 440 | 422 |
| 441 # Build the patched sdk out of the concatenated patches and the special | 423 # Build the patched sdk out of the concatenated patches and the special |
| 442 # libraries. | 424 # libraries. |
| 443 action(target_name) { | 425 action(target_name) { |
| 444 deps = concatenation_target_names | 426 deps = concatenation_target_names |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 500 rebase_path("../../sdk"), | 482 rebase_path("../../sdk"), |
| 501 rebase_path(patches_dir, root_build_dir), | 483 rebase_path(patches_dir, root_build_dir), |
| 502 rebase_path(patched_sdk_dir, root_build_dir), | 484 rebase_path(patched_sdk_dir, root_build_dir), |
| 503 ] | 485 ] |
| 504 } | 486 } |
| 505 } | 487 } |
| 506 | 488 |
| 507 generate_patched_sdk("patched_sdk") { | 489 generate_patched_sdk("patched_sdk") { |
| 508 libraries = [ | 490 libraries = [ |
| 509 [ | 491 [ |
| 510 "lib", | |
| 511 "async", | 492 "async", |
| 493 processed_gypis.async_runtime_sources, | |
| 512 ], | 494 ], |
| 513 [ | 495 [ |
| 514 "lib", | |
| 515 "collection", | 496 "collection", |
| 497 processed_gypis.collection_runtime_sources, | |
| 516 ], | 498 ], |
| 517 [ | 499 [ |
| 518 "lib", | |
| 519 "convert", | 500 "convert", |
| 501 processed_gypis.convert_runtime_sources, | |
| 520 ], | 502 ], |
| 521 [ | 503 [ |
| 522 "lib", | |
| 523 "core", | 504 "core", |
| 505 processed_gypis.core_runtime_sources, | |
| 524 ], | 506 ], |
| 525 [ | 507 [ |
| 526 "lib", | |
| 527 "developer", | 508 "developer", |
| 509 processed_gypis.developer_runtime_sources, | |
| 528 ], | 510 ], |
| 529 [ | 511 [ |
| 530 "lib", | |
| 531 "internal", | 512 "internal", |
| 513 processed_gypis.internal_runtime_sources, | |
| 532 ], | 514 ], |
| 533 [ | 515 [ |
| 534 "lib", | |
| 535 "isolate", | 516 "isolate", |
| 517 processed_gypis.isolate_runtime_sources, | |
| 536 ], | 518 ], |
| 537 [ | 519 [ |
| 538 "lib", | |
| 539 "math", | 520 "math", |
| 521 processed_gypis.math_runtime_sources, | |
| 540 ], | 522 ], |
| 541 [ | 523 [ |
| 542 "lib", | |
| 543 "mirrors", | 524 "mirrors", |
| 525 processed_gypis.mirrors_runtime_sources, | |
| 544 ], | 526 ], |
| 545 [ | 527 [ |
| 546 "lib", | |
| 547 "profiler", | 528 "profiler", |
| 529 processed_gypis.profiler_runtime_sources, | |
| 548 ], | 530 ], |
| 549 [ | 531 [ |
| 550 "lib", | |
| 551 "vmservice", | 532 "vmservice", |
| 533 processed_gypis.vmservice_runtime_sources, | |
| 552 ], | 534 ], |
| 553 [ | 535 [ |
| 554 "bin", | |
| 555 "io", | 536 "io", |
| 537 processed_gypis.bin_io_sources, | |
| 556 ], | 538 ], |
| 557 ] | 539 ] |
| 558 } | 540 } |
| 559 } | 541 } |
| OLD | NEW |