-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathBUILD.gn
70 lines (64 loc) · 2 KB
/
BUILD.gn
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
# Copyright (c) 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# This is the root build file for GN. GN will start processing by loading this
# file, and recursively load all dependencies until all dependencies are either
# resolved or known not to exist (which will cause the build to fail). So if
# you add a new build file, there must be some path of dependencies from this
# file to your new one or GN won't know about it.
declare_args() {
# A list of extra dependencies to add to the root target. This allows a
# checkout to add additional targets without explicitly changing any checked-
# in files.
root_extra_deps = []
}
action("js2c") {
visibility = [":*"]
script = "tools/nojs_js2c.py"
sources = [
"lib/main.js",
"lib/module.js",
"lib/path.js",
"lib/fs.js"
]
outputs = [
"$target_gen_dir/libraries.cc"
]
args = [
rebase_path("$target_gen_dir/libraries.cc", root_build_dir),
"CORE",
] + rebase_path(sources, root_build_dir)
}
executable("nojs") {
sources = [
"$target_gen_dir/libraries.cc",
"src/nojs_validate_arguments.cc",
"src/nojs_thread_context.cc",
"src/nojs_constants.cc",
"src/nojs_string.cc",
"src/nojs_misc.cc",
"src/nojs_fs.cc",
"src/nojs_vm.cc",
"src/main.cc"
]
deps = [
":js2c",
"//third_party/libuv:libuv",
"//third_party/v8:v8",
"//third_party/v8:v8_libplatform",
"//third_party/uv_link_t:uv_link_t",
]
}
# In GN, a "group" is a dummy target that just lists other targets.
group("root") {
# This should not be linked into production and depends on test targets.
testonly = true
# Note that some dependencies are commented out. These are things that are
# currently written but not hooked up to the build yet. They may need to be
# completed or possibly just tested and then re-enabled.
deps = [
"//third_party/v8:v8",
"//third_party/libuv:libuv",
":nojs"
] + root_extra_deps
}