Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(640)

Side by Side Diff: BUILD.gn

Issue 2342563002: [d8] Fix the shared-library build (Closed)
Patch Set: Mark as extern in .cc Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | include/v8.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 import("//build/config/android/config.gni") 5 import("//build/config/android/config.gni")
6 import("//build/config/arm.gni") 6 import("//build/config/arm.gni")
7 import("//build/config/dcheck_always_on.gni") 7 import("//build/config/dcheck_always_on.gni")
8 import("//build/config/mips.gni") 8 import("//build/config/mips.gni")
9 import("//build/config/sanitizers/sanitizers.gni") 9 import("//build/config/sanitizers/sanitizers.gni")
10 10
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 108
109 ############################################################################### 109 ###############################################################################
110 # Configurations 110 # Configurations
111 # 111 #
112 config("internal_config") { 112 config("internal_config") {
113 visibility = [ ":*" ] # Only targets in this file can depend on this. 113 visibility = [ ":*" ] # Only targets in this file can depend on this.
114 114
115 include_dirs = [ "." ] 115 include_dirs = [ "." ]
116 116
117 if (is_component_build) { 117 if (is_component_build) {
118 defines = [ 118 defines = [ "BUILDING_V8_SHARED" ]
119 "V8_SHARED",
120 "BUILDING_V8_SHARED",
121 ]
122 } 119 }
123 } 120 }
124 121
125 config("internal_config_base") { 122 config("internal_config_base") {
126 visibility = [ ":*" ] # Only targets in this file can depend on this. 123 visibility = [ ":*" ] # Only targets in this file can depend on this.
127 124
128 include_dirs = [ "." ] 125 include_dirs = [ "." ]
129 } 126 }
130 127
131 # This config should be applied to code using the libplatform. 128 # This config should be applied to code using the libplatform.
132 config("libplatform_config") { 129 config("libplatform_config") {
133 include_dirs = [ "include" ] 130 include_dirs = [ "include" ]
134 } 131 }
135 132
136 # This config should be applied to code using the libsampler. 133 # This config should be applied to code using the libsampler.
137 config("libsampler_config") { 134 config("libsampler_config") {
138 include_dirs = [ "include" ] 135 include_dirs = [ "include" ]
139 } 136 }
140 137
141 # This config should only be applied to code using V8 and not any V8 code 138 # This config should only be applied to code using V8 and not any V8 code
142 # itself. 139 # itself.
143 config("external_config") { 140 config("external_config") {
144 if (is_component_build) { 141 if (is_component_build) {
145 defines = [ 142 defines = [ "USING_V8_SHARED" ]
146 "V8_SHARED",
147 "USING_V8_SHARED",
148 ]
149 } 143 }
150 include_dirs = [ "include" ] 144 include_dirs = [ "include" ]
151 if (v8_enable_inspector_override) { 145 if (v8_enable_inspector_override) {
152 include_dirs += [ "$target_gen_dir/include" ] 146 include_dirs += [ "$target_gen_dir/include" ]
153 } 147 }
154 libs = [] 148 libs = []
155 if (is_android && current_toolchain != host_toolchain) { 149 if (is_android && current_toolchain != host_toolchain) {
156 libs += [ "log" ] 150 libs += [ "log" ]
157 } 151 }
158 } 152 }
(...skipping 2223 matching lines...) Expand 10 before | Expand all | Expand 10 after
2382 public_deps = [ 2376 public_deps = [
2383 ":v8_base", 2377 ":v8_base",
2384 ":v8_maybe_snapshot", 2378 ":v8_maybe_snapshot",
2385 ] 2379 ]
2386 public_configs = [ ":external_config" ] 2380 public_configs = [ ":external_config" ]
2387 } 2381 }
2388 } 2382 }
2389 2383
2390 v8_executable("d8") { 2384 v8_executable("d8") {
2391 sources = [ 2385 sources = [
2386 "$target_gen_dir/d8-js.cc",
2392 "src/d8.cc", 2387 "src/d8.cc",
2393 "src/d8.h", 2388 "src/d8.h",
2394 ] 2389 ]
2395 2390
2396 configs = [ 2391 configs = [
2397 # Note: don't use :internal_config here because this target will get 2392 # Note: don't use :internal_config here because this target will get
2398 # the :external_config applied to it by virtue of depending on :v8, and 2393 # the :external_config applied to it by virtue of depending on :v8, and
2399 # you can't have both applied to the same target. 2394 # you can't have both applied to the same target.
2400 ":internal_config_base", 2395 ":internal_config_base",
2401 ] 2396 ]
2402 2397
2403 deps = [ 2398 deps = [
2404 ":d8_js2c", 2399 ":d8_js2c",
2405 ":v8", 2400 ":v8",
2406 ":v8_libplatform", 2401 ":v8_libplatform",
2407 "//build/config/sanitizers:deps", 2402 "//build/config/sanitizers:deps",
2408 "//build/win:default_exe_manifest", 2403 "//build/win:default_exe_manifest",
2409 ] 2404 ]
2410 2405
2411 # TODO(jochen): Add support for vtunejit. 2406 # TODO(jochen): Add support for vtunejit.
2412 2407
2413 if (is_posix) { 2408 if (is_posix) {
2414 sources += [ "src/d8-posix.cc" ] 2409 sources += [ "src/d8-posix.cc" ]
2415 } else if (is_win) { 2410 } else if (is_win) {
2416 sources += [ "src/d8-windows.cc" ] 2411 sources += [ "src/d8-windows.cc" ]
2417 } 2412 }
2418 2413
2419 if (!is_component_build) {
2420 sources += [ "$target_gen_dir/d8-js.cc" ]
2421 }
2422 if (v8_enable_i18n_support) { 2414 if (v8_enable_i18n_support) {
2423 deps += [ "//third_party/icu" ] 2415 deps += [ "//third_party/icu" ]
2424 } 2416 }
2425 } 2417 }
2426 2418
2427 v8_isolate_run("d8") { 2419 v8_isolate_run("d8") {
2428 deps = [ 2420 deps = [
2429 ":d8", 2421 ":d8",
2430 ] 2422 ]
2431 2423
(...skipping 350 matching lines...) Expand 10 before | Expand all | Expand 10 after
2782 ":fuzzer_support", 2774 ":fuzzer_support",
2783 ":lib_wasm_section_fuzzer", 2775 ":lib_wasm_section_fuzzer",
2784 ":wasm_module_runner", 2776 ":wasm_module_runner",
2785 ] 2777 ]
2786 2778
2787 configs = [ ":internal_config" ] 2779 configs = [ ":internal_config" ]
2788 } 2780 }
2789 2781
2790 v8_fuzzer("wasm_data_section_fuzzer") { 2782 v8_fuzzer("wasm_data_section_fuzzer") {
2791 } 2783 }
OLDNEW
« no previous file with comments | « no previous file | include/v8.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698