| 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 config("libdart_vm_config") { | 5 config("libdart_vm_config") { |
| 6 libs = [ | 6 libs = [ |
| 7 "dl", | 7 "dl", |
| 8 ] | 8 ] |
| 9 | 9 |
| 10 if (!is_android) { | 10 if (!is_android) { |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 57 set_sources_assignment_filter(["*_test.cc", "*_test.h"]) | 57 set_sources_assignment_filter(["*_test.cc", "*_test.h"]) |
| 58 sources = vm_sources_list.sources | 58 sources = vm_sources_list.sources |
| 59 + ["$target_gen_dir/service_gen.cc",] | 59 + ["$target_gen_dir/service_gen.cc",] |
| 60 - ["vtune.cc", "vtune.h"] | 60 - ["vtune.cc", "vtune.h"] |
| 61 include_dirs = [ | 61 include_dirs = [ |
| 62 "..", | 62 "..", |
| 63 ] | 63 ] |
| 64 } | 64 } |
| 65 | 65 |
| 66 | 66 |
| 67 static_library("libdart_vm_nosnapshot") { |
| 68 configs += ["..:dart_config"] |
| 69 public_configs = [":libdart_vm_config"] |
| 70 deps = [ ":generate_service_cc_file", ] |
| 71 defines = [ "DART_NO_SNAPSHOT" ] |
| 72 vm_sources_list = exec_script("../../tools/gypi_to_gn.py", |
| 73 [rebase_path("vm_sources.gypi")], |
| 74 "scope", |
| 75 ["vm_sources.gypi"]) |
| 76 |
| 77 set_sources_assignment_filter(["*_test.cc", "*_test.h"]) |
| 78 sources = vm_sources_list.sources |
| 79 + ["$target_gen_dir/service_gen.cc",] |
| 80 - ["vtune.cc", "vtune.h"] |
| 81 include_dirs = [ |
| 82 "..", |
| 83 ] |
| 84 } |
| 85 |
| 86 |
| 67 template("generate_library_source") { | 87 template("generate_library_source") { |
| 68 assert(defined(invoker.libname), "Need libname in $target_name") | 88 assert(defined(invoker.libname), "Need libname in $target_name") |
| 69 assert(defined(invoker.filename), "Need a filename in $target_name") | 89 assert(defined(invoker.filename), "Need a filename in $target_name") |
| 70 assert(defined(invoker.kind), "Need kind in $target_name") | 90 assert(defined(invoker.kind), "Need kind in $target_name") |
| 71 assert(defined(invoker.output), "Need output in $target_name") | 91 assert(defined(invoker.output), "Need output in $target_name") |
| 72 action(target_name) { | 92 action(target_name) { |
| 73 visibility = [ ":*" ] # Only targets in this file can see this. | 93 visibility = [ ":*" ] # Only targets in this file can see this. |
| 74 libname = invoker.libname | 94 libname = invoker.libname |
| 75 filename = invoker.filename | 95 filename = invoker.filename |
| 76 kind = invoker.kind | 96 kind = invoker.kind |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 108 | 128 |
| 109 # This templates expects invoker.sources to be a list of pairs of strings. | 129 # This templates expects invoker.sources to be a list of pairs of strings. |
| 110 # The pairs of strings mean the following. | 130 # The pairs of strings mean the following. |
| 111 # library name, file name | 131 # library name, file name |
| 112 # e.g. for the "internal" library named "dart:_internal", | 132 # e.g. for the "internal" library named "dart:_internal", |
| 113 # with sources listed at sdk/lib/internal/internal_sources.gypi and | 133 # with sources listed at sdk/lib/internal/internal_sources.gypi and |
| 114 # lib/internal_sources.gypi, we have: ["_internal", "internal"] | 134 # lib/internal_sources.gypi, we have: ["_internal", "internal"] |
| 115 # | 135 # |
| 116 # The template iterates over the list, and generates generate_library_source | 136 # The template iterates over the list, and generates generate_library_source |
| 117 # actions for each. After that, it generates targets to compile the generated | 137 # actions for each. After that, it generates targets to compile the generated |
| 118 # sources to make libdart_lib_withcore and libdart_lib. | 138 # sources to make libdart_lib_nosnapshot and libdart_lib. |
| 119 template("generate_core_libraries") { | 139 template("generate_core_libraries") { |
| 120 assert(defined(invoker.sources), "Need sources in $target_name") | 140 assert(defined(invoker.sources), "Need sources in $target_name") |
| 121 liboutputs = [] | 141 liboutputs = [] |
| 122 libsources = [] | 142 libsources = [] |
| 123 libdeps = [] | 143 libdeps = [] |
| 124 foreach(lib, invoker.sources) { | 144 foreach(lib, invoker.sources) { |
| 125 libname = lib[0] | 145 libname = lib[0] |
| 126 filename = lib[1] | 146 filename = lib[1] |
| 127 generate_library_source("generate_${filename}_cc_file") { | 147 generate_library_source("generate_${filename}_cc_file") { |
| 128 libname = libname | 148 libname = libname |
| (...skipping 12 matching lines...) Expand all Loading... |
| 141 [rebase_path("../lib/${filename}_sources.gypi")], | 161 [rebase_path("../lib/${filename}_sources.gypi")], |
| 142 "scope", | 162 "scope", |
| 143 ["../lib/${filename}_sources.gypi"]) | 163 ["../lib/${filename}_sources.gypi"]) |
| 144 libsources += rebase_path(lib_sources_gypi.sources, ".", "../lib") | 164 libsources += rebase_path(lib_sources_gypi.sources, ".", "../lib") |
| 145 liboutputs += ["$target_gen_dir/${filename}_gen.cc", | 165 liboutputs += ["$target_gen_dir/${filename}_gen.cc", |
| 146 "$target_gen_dir/${filename}_patch_gen.cc"] | 166 "$target_gen_dir/${filename}_patch_gen.cc"] |
| 147 libdeps += [":generate_${filename}_cc_file", | 167 libdeps += [":generate_${filename}_cc_file", |
| 148 ":generate_${filename}_patch_cc_file"] | 168 ":generate_${filename}_patch_cc_file"] |
| 149 } | 169 } |
| 150 | 170 |
| 151 static_library("libdart_lib_withcore") { | 171 static_library("libdart_lib_nosnapshot") { |
| 152 configs += ["..:dart_config"] | 172 configs += ["..:dart_config"] |
| 153 deps = libdeps | 173 deps = libdeps |
| 154 sources = libsources + ["bootstrap.cc"] + liboutputs | 174 sources = libsources + ["bootstrap.cc"] + liboutputs |
| 155 include_dirs = [ | 175 include_dirs = [ |
| 156 "..", | 176 "..", |
| 157 ] | 177 ] |
| 158 } | 178 } |
| 159 static_library("libdart_lib") { | 179 static_library("libdart_lib") { |
| 160 configs += ["..:dart_config"] | 180 configs += ["..:dart_config"] |
| 161 sources = libsources + [ "bootstrap_nocore.cc", ] | 181 sources = libsources + [ "bootstrap_nocore.cc", ] |
| 162 include_dirs = [ | 182 include_dirs = [ |
| 163 "..", | 183 "..", |
| 164 ] | 184 ] |
| 165 } | 185 } |
| 166 } | 186 } |
| 167 | 187 |
| 168 | 188 |
| 169 generate_core_libraries("core_libraries") { | 189 generate_core_libraries("core_libraries") { |
| 170 sources = [ | 190 sources = [ |
| 171 ["async", "async"], | 191 ["async", "async"], |
| 172 ["core", "core"], | 192 ["core", "core"], |
| 173 ["collection", "collection"], | 193 ["collection", "collection"], |
| 174 ["convert", "convert"], | 194 ["convert", "convert"], |
| 175 ["debugger", "debugger"], | 195 ["developer", "developer"], |
| 176 ["_internal", "internal"], | 196 ["_internal", "internal"], |
| 177 ["isolate", "isolate"], | 197 ["isolate", "isolate"], |
| 178 ["math", "math"], | 198 ["math", "math"], |
| 179 ["mirrors", "mirrors"], | 199 ["mirrors", "mirrors"], |
| 180 ["profiler", "profiler"], | 200 ["profiler", "profiler"], |
| 181 ["typed_data", "typed_data"], | 201 ["typed_data", "typed_data"], |
| 182 ] | 202 ] |
| 183 } | 203 } |
| 184 | 204 |
| 185 | 205 |
| (...skipping 13 matching lines...) Expand all Loading... |
| 199 output = "$target_gen_dir/service_gen.cc" | 219 output = "$target_gen_dir/service_gen.cc" |
| 200 outputs = [ output, ] | 220 outputs = [ output, ] |
| 201 | 221 |
| 202 args = [ | 222 args = [ |
| 203 "--output", rebase_path(output, root_build_dir), | 223 "--output", rebase_path(output, root_build_dir), |
| 204 "--outer_namespace", "dart", | 224 "--outer_namespace", "dart", |
| 205 "--table_name", "service", | 225 "--table_name", "service", |
| 206 "--root_prefix", rebase_path("service/", root_build_dir)] + | 226 "--root_prefix", rebase_path("service/", root_build_dir)] + |
| 207 rebase_path(sources, root_build_dir) | 227 rebase_path(sources, root_build_dir) |
| 208 } | 228 } |
| OLD | NEW |