Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 # Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file | |
| 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. | |
| 4 | |
| 5 # This build rule will copy the source for one Dart SDK library. | |
| 6 # | |
| 7 # Expected arguments: | |
| 8 # sdk_lib_name | |
| 9 # The name of a Dart SDK library. | |
| 10 # | |
| 11 # The sources will be copied into $root_gen_dir/dart_sdk_libs/$sdk_lib_name/. | |
| 12 template("dart_sdk_lib_copy") { | |
| 13 assert(defined(invoker.sdk_lib_name)) | |
| 14 # The name of the SDK library being copied. | |
| 15 lib_name = invoker.sdk_lib_name | |
| 16 # The path to the libraries source directory. | |
| 17 lib_path = rebase_path(lib_name, "", "//dart/sdk/lib/") | |
|
zra
2016/02/11 18:58:37
Can //dart be an argument instead of hardcoded?
Cutch
2016/02/11 19:34:32
Done.
| |
| 18 # The path to the sources gypi. | |
| 19 lib_sources_gypi = lib_name + "_sources.gypi" | |
| 20 # Get the contents of the gypi file. | |
| 21 sdk_lib_sources_gypi = | |
| 22 exec_script("//dart/tools/gypi_to_gn.py", | |
|
zra
2016/02/11 18:58:37
ditto
Cutch
2016/02/11 19:34:33
Done.
| |
| 23 [rebase_path(lib_sources_gypi, "", lib_path)], | |
| 24 "scope", | |
| 25 [rebase_path(lib_sources_gypi, "", lib_path)]) | |
| 26 copy(target_name) { | |
| 27 sources = rebase_path(sdk_lib_sources_gypi.sources, "", lib_path) | |
| 28 outputs = [ "$root_gen_dir/dart_sdk_libs/$lib_name/{{source_file_part}}" ] | |
| 29 } | |
| 30 } | |
| OLD | NEW |