OLD | NEW |
---|---|
1 # Copyright 2014 The Chromium Authors. All rights reserved. | 1 # Copyright 2014 The Chromium Authors. All rights reserved. |
2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 # TODO(jochen): These will need to be user-settable to support standalone V8 | 5 # TODO(jochen): These will need to be user-settable to support standalone V8 |
6 # builds. | 6 # builds. |
7 v8_compress_startup_data = "off" | 7 v8_compress_startup_data = "off" |
8 v8_deprecation_warnings = false | |
9 v8_enable_disassembler = false | |
10 v8_enable_gdbjit = false | |
11 v8_enable_handle_zapping = true | |
8 v8_enable_i18n_support = true | 12 v8_enable_i18n_support = true |
13 v8_enable_verify_heap = false | |
14 v8_interpreted_regexp = false | |
15 v8_object_print = false | |
16 v8_postmortem_support = false | |
17 v8_use_default_platform = true | |
18 v8_use_snapshot = true | |
19 | |
20 if (is_debug) { | |
21 v8_enable_extra_checks = true | |
22 } else { | |
23 v8_enable_extra_checks = false | |
24 } | |
9 | 25 |
10 # TODO(jochen): Add support for want_seperate_host_toolset. | 26 # TODO(jochen): Add support for want_seperate_host_toolset. |
11 # TODO(jochen): Add support for v8_target_arch. | 27 # TODO(jochen): Add toolchain.gypi support. |
12 # TODO(jochen): Add features.gypi and toolchain.gypi support. | |
13 | 28 |
14 | 29 |
15 ############################################################################### | 30 ############################################################################### |
16 # Configurations | 31 # Configurations |
17 # | 32 # |
18 config("internal_config") { | 33 config("internal_config") { |
19 visibility = ":*" # Only targets in this file can depend on this. | 34 visibility = ":*" # Only targets in this file can depend on this. |
20 | 35 |
21 include_dirs = [ "src" ] | 36 include_dirs = [ "src" ] |
22 | 37 |
23 if (component_mode == "shared_library") { | 38 if (component_mode == "shared_library") { |
24 defines = [ | 39 defines = [ |
25 "BUILDING_V8_SHARED", | 40 "BUILDING_V8_SHARED", |
26 "V8_SHARED", | 41 "V8_SHARED", |
27 ] | 42 ] |
28 } | 43 } |
29 } | 44 } |
30 | 45 |
46 config("features") { | |
47 visibility = ":*" # Only targets in this file can depend on this. | |
brettw
2014/05/05 16:24:49
Below here you'll want to say:
defines = []
And
| |
48 | |
49 if (v8_enable_disassembler == true) { | |
brettw
2014/05/05 16:24:49
Delete the " = true" parts. It's an if statement l
| |
50 defines = [ | |
51 "ENABLE_DISASSEMBLER", | |
52 ] | |
53 } | |
54 if (v8_enable_gdbjit == true) { | |
55 defines = [ | |
56 "ENABLE_GDB_JIT_INTERFACE", | |
57 ] | |
58 } | |
59 if (v8_object_print == true) { | |
60 defines = [ | |
61 "OBJECT_PRINT", | |
62 ] | |
63 } | |
64 if (v8_enable_verify_heap == true) { | |
65 defines = [ | |
66 "VERIFY_HEAP", | |
67 ] | |
68 } | |
69 if (v8_interpreted_regexp == true) { | |
70 defines = [ | |
71 "V8_INTERPRETED_REGEXP", | |
72 ] | |
73 } | |
74 if (v8_deprecation_warnings == true) { | |
75 defines = [ | |
76 "V8_DEPRECATION_WARNINGS", | |
77 ] | |
78 } | |
79 if (v8_enable_i18n_support == true) { | |
80 defines = [ | |
81 "V8_I18N_SUPPORT", | |
82 ] | |
83 } | |
84 if (v8_use_default_platform == true) { | |
85 defines = [ | |
86 "V8_USE_DEFAULT_PLATFORM", | |
87 ] | |
88 } | |
89 if (v8_compress_startup_data == "bz2") { | |
90 defines = [ | |
91 'COMPRESS_STARTUP_DATA_BZ2', | |
92 ] | |
93 } | |
94 if (v8_enable_extra_checks == true) { | |
95 defines = [ | |
96 "ENABLE_EXTRA_CHECKS", | |
97 ] | |
98 } | |
99 if (v8_enable_handle_zapping == true) { | |
100 defines = [ | |
101 "ENABLE_HANDLE_ZAPPING", | |
102 ] | |
103 } | |
104 } | |
105 | |
31 ############################################################################### | 106 ############################################################################### |
32 # Actions | 107 # Actions |
33 # | 108 # |
34 | 109 |
35 # TODO(jochen): Do actions need visibility settings as well? | 110 # TODO(jochen): Do actions need visibility settings as well? |
36 action("generate_trig_table") { | 111 action("generate_trig_table") { |
112 visibility = ":*" # Only targets in this file can depend on this. | |
113 | |
37 script = "tools/generate-trig-table.py" | 114 script = "tools/generate-trig-table.py" |
38 | 115 |
39 outputs = [ | 116 outputs = [ |
40 "$target_gen_dir/trig-table.cc" | 117 "$target_gen_dir/trig-table.cc" |
41 ] | 118 ] |
42 | 119 |
43 args = rebase_path(outputs, root_build_dir) | 120 args = rebase_path(outputs, root_build_dir) |
44 } | 121 } |
45 | 122 |
46 action("js2c") { | 123 action("js2c") { |
124 visibility = ":*" # Only targets in this file can depend on this. | |
125 | |
47 script = "tools/js2c.py" | 126 script = "tools/js2c.py" |
48 | 127 |
49 # The script depends on this other script, this rule causes a rebuild if it | 128 # The script depends on this other script, this rule causes a rebuild if it |
50 # changes. | 129 # changes. |
51 source_prereqs = [ "tools/jsmin.py" ] | 130 source_prereqs = [ "tools/jsmin.py" ] |
52 | 131 |
53 sources = [ | 132 sources = [ |
54 "src/runtime.js", | 133 "src/runtime.js", |
55 "src/v8natives.js", | 134 "src/v8natives.js", |
56 "src/array.js", | 135 "src/array.js", |
(...skipping 22 matching lines...) Expand all Loading... | |
79 sources += [ "src/i18n.js" ] | 158 sources += [ "src/i18n.js" ] |
80 } | 159 } |
81 | 160 |
82 args = | 161 args = |
83 rebase_path(outputs, root_build_dir) + | 162 rebase_path(outputs, root_build_dir) + |
84 [ "EXPERIMENTAL", v8_compress_startup_data ] + | 163 [ "EXPERIMENTAL", v8_compress_startup_data ] + |
85 rebase_path(sources, root_build_dir) | 164 rebase_path(sources, root_build_dir) |
86 } | 165 } |
87 | 166 |
88 action("js2c_experimental") { | 167 action("js2c_experimental") { |
168 visibility = ":*" # Only targets in this file can depend on this. | |
169 | |
89 script = "tools/js2c.py" | 170 script = "tools/js2c.py" |
90 | 171 |
91 # The script depends on this other script, this rule causes a rebuild if it | 172 # The script depends on this other script, this rule causes a rebuild if it |
92 # changes. | 173 # changes. |
93 source_prereqs = [ "tools/jsmin.py" ] | 174 source_prereqs = [ "tools/jsmin.py" ] |
94 | 175 |
95 sources = [ | 176 sources = [ |
96 "src/macros.py", | 177 "src/macros.py", |
97 "src/symbol.js", | 178 "src/symbol.js", |
98 "src/proxy.js", | 179 "src/proxy.js", |
(...skipping 11 matching lines...) Expand all Loading... | |
110 "$target_gen_dir/experimental-libraries.cc" | 191 "$target_gen_dir/experimental-libraries.cc" |
111 ] | 192 ] |
112 | 193 |
113 args = | 194 args = |
114 rebase_path(outputs, root_build_dir) + | 195 rebase_path(outputs, root_build_dir) + |
115 [ "CORE", v8_compress_startup_data ] + | 196 [ "CORE", v8_compress_startup_data ] + |
116 rebase_path(sources, root_build_dir) | 197 rebase_path(sources, root_build_dir) |
117 } | 198 } |
118 | 199 |
119 action("postmortem-metadata") { | 200 action("postmortem-metadata") { |
201 visibility = ":*" # Only targets in this file can depend on this. | |
202 | |
120 script = "tools/gen-postmortem-metadata.py" | 203 script = "tools/gen-postmortem-metadata.py" |
121 | 204 |
122 sources = [ | 205 sources = [ |
123 "src/objects.h", | 206 "src/objects.h", |
124 "src/objects-inl.h", | 207 "src/objects-inl.h", |
125 ] | 208 ] |
126 | 209 |
127 outputs = [ | 210 outputs = [ |
128 "$target_gen_dir/debug-support.cc" | 211 "$target_gen_dir/debug-support.cc" |
129 ] | 212 ] |
(...skipping 17 matching lines...) Expand all Loading... | |
147 ":v8_base", | 230 ":v8_base", |
148 ] | 231 ] |
149 | 232 |
150 sources = [ | 233 sources = [ |
151 "$target_gen_dir/libraries.cc", | 234 "$target_gen_dir/libraries.cc", |
152 "$target_gen_dir/experimental-libraries.cc", | 235 "$target_gen_dir/experimental-libraries.cc", |
153 "$target_gen_dir/trig-table.cc", | 236 "$target_gen_dir/trig-table.cc", |
154 "src/snapshot-empty.cc", | 237 "src/snapshot-empty.cc", |
155 ] | 238 ] |
156 | 239 |
157 configs += [ ":internal_config" ] | 240 configs += [ ":internal_config", ":features" ] |
158 } | 241 } |
159 | 242 |
160 source_set("v8_base") { | 243 source_set("v8_base") { |
161 visibility = ":*" # Only targets in this file can depend on this. | 244 visibility = ":*" # Only targets in this file can depend on this. |
162 | 245 |
163 sources = [ | 246 sources = [ |
164 "src/accessors.cc", | 247 "src/accessors.cc", |
165 "src/accessors.h", | 248 "src/accessors.h", |
166 "src/allocation.cc", | 249 "src/allocation.cc", |
167 "src/allocation.h", | 250 "src/allocation.h", |
(...skipping 350 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
518 "src/version.cc", | 601 "src/version.cc", |
519 "src/version.h", | 602 "src/version.h", |
520 "src/vm-state-inl.h", | 603 "src/vm-state-inl.h", |
521 "src/vm-state.h", | 604 "src/vm-state.h", |
522 "src/zone-inl.h", | 605 "src/zone-inl.h", |
523 "src/zone.cc", | 606 "src/zone.cc", |
524 "src/zone.h", | 607 "src/zone.h", |
525 ] | 608 ] |
526 | 609 |
527 if (cpu_arch == "x86") { | 610 if (cpu_arch == "x86") { |
528 # TODO(brettw) the GYP file has | |
529 # or v8_target_arch=="mac" or OS=="mac" | |
530 # which I don't understand. | |
531 sources += [ | 611 sources += [ |
532 "src/ia32/assembler-ia32-inl.h", | 612 "src/ia32/assembler-ia32-inl.h", |
533 "src/ia32/assembler-ia32.cc", | 613 "src/ia32/assembler-ia32.cc", |
534 "src/ia32/assembler-ia32.h", | 614 "src/ia32/assembler-ia32.h", |
535 "src/ia32/builtins-ia32.cc", | 615 "src/ia32/builtins-ia32.cc", |
536 "src/ia32/code-stubs-ia32.cc", | 616 "src/ia32/code-stubs-ia32.cc", |
537 "src/ia32/code-stubs-ia32.h", | 617 "src/ia32/code-stubs-ia32.h", |
538 "src/ia32/codegen-ia32.cc", | 618 "src/ia32/codegen-ia32.cc", |
539 "src/ia32/codegen-ia32.h", | 619 "src/ia32/codegen-ia32.h", |
540 "src/ia32/cpu-ia32.cc", | 620 "src/ia32/cpu-ia32.cc", |
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
693 "src/mips/lithium-mips.h", | 773 "src/mips/lithium-mips.h", |
694 "src/mips/macro-assembler-mips.cc", | 774 "src/mips/macro-assembler-mips.cc", |
695 "src/mips/macro-assembler-mips.h", | 775 "src/mips/macro-assembler-mips.h", |
696 "src/mips/regexp-macro-assembler-mips.cc", | 776 "src/mips/regexp-macro-assembler-mips.cc", |
697 "src/mips/regexp-macro-assembler-mips.h", | 777 "src/mips/regexp-macro-assembler-mips.h", |
698 "src/mips/simulator-mips.cc", | 778 "src/mips/simulator-mips.cc", |
699 "src/mips/stub-cache-mips.cc", | 779 "src/mips/stub-cache-mips.cc", |
700 ] | 780 ] |
701 } | 781 } |
702 | 782 |
703 configs += [ ":internal_config" ] | 783 configs += [ ":internal_config", ":features" ] |
704 | 784 |
705 defines = [] | 785 defines = [] |
706 deps = [] | 786 deps = [] |
707 | 787 |
708 if (is_posix) { | 788 if (is_posix) { |
709 sources += [ | 789 sources += [ |
710 "src/platform-posix.cc" | 790 "src/platform-posix.cc" |
711 ] | 791 ] |
712 } | 792 } |
713 | 793 |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
771 ] | 851 ] |
772 } | 852 } |
773 | 853 |
774 } else { | 854 } else { |
775 | 855 |
776 executable("mksnapshot") { | 856 executable("mksnapshot") { |
777 sources = [ | 857 sources = [ |
778 "src/mksnapshot.cc", | 858 "src/mksnapshot.cc", |
779 ] | 859 ] |
780 | 860 |
781 configs += [ ":internal_config" ] | 861 configs += [ ":internal_config", ":features" ] |
782 | 862 |
783 deps = [ | 863 deps = [ |
784 ":v8_base", | 864 ":v8_base", |
785 ":v8_nosnapshot", | 865 ":v8_nosnapshot", |
786 ] | 866 ] |
787 | 867 |
788 if (v8_compress_startup_data == "bz2") { | 868 if (v8_compress_startup_data == "bz2") { |
789 libs = [ "bz2" ] | 869 libs = [ "bz2" ] |
790 } | 870 } |
791 } | 871 } |
792 | 872 |
793 } | 873 } |
OLD | NEW |