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

Side by Side Diff: BUILD.gn

Issue 2393603002: Revert of Turn libbase into a component (Closed)
Patch Set: Created 4 years, 2 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 | samples/samples.gyp » ('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 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 visibility = [ ":*" ] # Only targets in this file can depend on this. 123 visibility = [ ":*" ] # Only targets in this file can depend on this.
124 124
125 include_dirs = [ "." ] 125 include_dirs = [ "." ]
126 } 126 }
127 127
128 # This config should be applied to code using the libplatform. 128 # This config should be applied to code using the libplatform.
129 config("libplatform_config") { 129 config("libplatform_config") {
130 include_dirs = [ "include" ] 130 include_dirs = [ "include" ]
131 } 131 }
132 132
133 # This config should be applied to code using the libbase.
134 config("libbase_config") {
135 if (is_component_build) {
136 defines = [ "USING_V8_BASE_SHARED" ]
137 }
138 libs = []
139 if (is_android && current_toolchain != host_toolchain) {
140 libs += [ "log" ]
141 }
142 }
143
144 # This config should be applied to code using the libsampler. 133 # This config should be applied to code using the libsampler.
145 config("libsampler_config") { 134 config("libsampler_config") {
146 include_dirs = [ "include" ] 135 include_dirs = [ "include" ]
147 } 136 }
148 137
149 # 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
150 # itself. 139 # itself.
151 config("external_config") { 140 config("external_config") {
152 if (is_component_build) { 141 if (is_component_build) {
153 defines = [ "USING_V8_SHARED" ] 142 defines = [ "USING_V8_SHARED" ]
154 } 143 }
155 include_dirs = [ "include" ] 144 include_dirs = [ "include" ]
156 if (v8_enable_inspector_override) { 145 if (v8_enable_inspector_override) {
157 include_dirs += [ "$target_gen_dir/include" ] 146 include_dirs += [ "$target_gen_dir/include" ]
158 } 147 }
148 libs = []
149 if (is_android && current_toolchain != host_toolchain) {
150 libs += [ "log" ]
151 }
159 } 152 }
160 153
161 # This config should only be applied to code that needs to be explicitly 154 # This config should only be applied to code that needs to be explicitly
162 # aware of whether we are using startup data or not. 155 # aware of whether we are using startup data or not.
163 config("external_startup_data") { 156 config("external_startup_data") {
164 if (v8_use_external_startup_data) { 157 if (v8_use_external_startup_data) {
165 defines = [ "V8_USE_EXTERNAL_STARTUP_DATA" ] 158 defines = [ "V8_USE_EXTERNAL_STARTUP_DATA" ]
166 } 159 }
167 } 160 }
168 161
(...skipping 1980 matching lines...) Expand 10 before | Expand all | Expand 10 after
2149 if (v8_postmortem_support) { 2142 if (v8_postmortem_support) {
2150 sources += [ "$target_gen_dir/debug-support.cc" ] 2143 sources += [ "$target_gen_dir/debug-support.cc" ]
2151 deps += [ ":postmortem-metadata" ] 2144 deps += [ ":postmortem-metadata" ]
2152 } 2145 }
2153 2146
2154 if (v8_enable_inspector_override) { 2147 if (v8_enable_inspector_override) {
2155 deps += [ "src/inspector:inspector" ] 2148 deps += [ "src/inspector:inspector" ]
2156 } 2149 }
2157 } 2150 }
2158 2151
2159 v8_component("v8_libbase") { 2152 v8_source_set("v8_libbase") {
2153 visibility = [ ":*" ] # Only targets in this file can depend on this.
2154
2160 sources = [ 2155 sources = [
2161 "src/base/adapters.h", 2156 "src/base/adapters.h",
2162 "src/base/atomic-utils.h", 2157 "src/base/atomic-utils.h",
2163 "src/base/atomicops.h", 2158 "src/base/atomicops.h",
2164 "src/base/atomicops_internals_arm64_gcc.h", 2159 "src/base/atomicops_internals_arm64_gcc.h",
2165 "src/base/atomicops_internals_arm_gcc.h", 2160 "src/base/atomicops_internals_arm_gcc.h",
2166 "src/base/atomicops_internals_atomicword_compat.h", 2161 "src/base/atomicops_internals_atomicword_compat.h",
2167 "src/base/atomicops_internals_mac.h", 2162 "src/base/atomicops_internals_mac.h",
2168 "src/base/atomicops_internals_mips64_gcc.h", 2163 "src/base/atomicops_internals_mips64_gcc.h",
2169 "src/base/atomicops_internals_mips_gcc.h", 2164 "src/base/atomicops_internals_mips_gcc.h",
2170 "src/base/atomicops_internals_s390_gcc.h", 2165 "src/base/atomicops_internals_s390_gcc.h",
2171 "src/base/atomicops_internals_tsan.h", 2166 "src/base/atomicops_internals_tsan.h",
2172 "src/base/atomicops_internals_x86_gcc.cc", 2167 "src/base/atomicops_internals_x86_gcc.cc",
2173 "src/base/atomicops_internals_x86_gcc.h", 2168 "src/base/atomicops_internals_x86_gcc.h",
2174 "src/base/atomicops_internals_x86_msvc.h", 2169 "src/base/atomicops_internals_x86_msvc.h",
2175 "src/base/base-export.h",
2176 "src/base/bits.cc", 2170 "src/base/bits.cc",
2177 "src/base/bits.h", 2171 "src/base/bits.h",
2178 "src/base/build_config.h", 2172 "src/base/build_config.h",
2179 "src/base/compiler-specific.h", 2173 "src/base/compiler-specific.h",
2180 "src/base/cpu.cc", 2174 "src/base/cpu.cc",
2181 "src/base/cpu.h", 2175 "src/base/cpu.h",
2182 "src/base/debug/stack_trace.cc", 2176 "src/base/debug/stack_trace.cc",
2183 "src/base/debug/stack_trace.h", 2177 "src/base/debug/stack_trace.h",
2184 "src/base/division-by-constant.cc", 2178 "src/base/division-by-constant.cc",
2185 "src/base/division-by-constant.h", 2179 "src/base/division-by-constant.h",
(...skipping 30 matching lines...) Expand all
2216 "src/base/safe_math.h", 2210 "src/base/safe_math.h",
2217 "src/base/safe_math_impl.h", 2211 "src/base/safe_math_impl.h",
2218 "src/base/sys-info.cc", 2212 "src/base/sys-info.cc",
2219 "src/base/sys-info.h", 2213 "src/base/sys-info.h",
2220 "src/base/utils/random-number-generator.cc", 2214 "src/base/utils/random-number-generator.cc",
2221 "src/base/utils/random-number-generator.h", 2215 "src/base/utils/random-number-generator.h",
2222 ] 2216 ]
2223 2217
2224 configs = [ ":internal_config_base" ] 2218 configs = [ ":internal_config_base" ]
2225 2219
2226 public_configs = [ ":libbase_config" ]
2227
2228 defines = [] 2220 defines = []
2229 2221
2230 if (is_component_build) {
2231 defines = [ "BUILDING_V8_BASE_SHARED" ]
2232 }
2233
2234 if (is_posix) { 2222 if (is_posix) {
2235 sources += [ "src/base/platform/platform-posix.cc" ] 2223 sources += [ "src/base/platform/platform-posix.cc" ]
2236 } 2224 }
2237 2225
2238 if (is_linux) { 2226 if (is_linux) {
2239 sources += [ 2227 sources += [
2240 "src/base/debug/stack_trace_posix.cc", 2228 "src/base/debug/stack_trace_posix.cc",
2241 "src/base/platform/platform-linux.cc", 2229 "src/base/platform/platform-linux.cc",
2242 ] 2230 ]
2243 2231
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
2367 "test/fuzzer/fuzzer-support.h", 2355 "test/fuzzer/fuzzer-support.h",
2368 ] 2356 ]
2369 2357
2370 configs = [ ":internal_config_base" ] 2358 configs = [ ":internal_config_base" ]
2371 2359
2372 deps = [ 2360 deps = [
2373 ":v8_maybe_snapshot", 2361 ":v8_maybe_snapshot",
2374 ] 2362 ]
2375 2363
2376 public_deps = [ 2364 public_deps = [
2377 ":v8_libbase",
2378 ":v8_libplatform", 2365 ":v8_libplatform",
2379 ] 2366 ]
2380 } 2367 }
2381 2368
2382 v8_source_set("simple_fuzzer") { 2369 v8_source_set("simple_fuzzer") {
2383 sources = [ 2370 sources = [
2384 "test/fuzzer/fuzzer.cc", 2371 "test/fuzzer/fuzzer.cc",
2385 ] 2372 ]
2386 2373
2387 configs = [ ":internal_config_base" ] 2374 configs = [ ":internal_config_base" ]
2388 } 2375 }
2389 2376
2390 ############################################################################### 2377 ###############################################################################
2391 # Executables 2378 # Executables
2392 # 2379 #
2393 2380
2394 if (current_toolchain == v8_snapshot_toolchain) { 2381 if (current_toolchain == v8_snapshot_toolchain) {
2395 v8_executable("mksnapshot") { 2382 v8_executable("mksnapshot") {
2396 visibility = [ ":*" ] # Only targets in this file can depend on this. 2383 visibility = [ ":*" ] # Only targets in this file can depend on this.
2397 2384
2398 sources = [ 2385 sources = [
2399 "src/snapshot/mksnapshot.cc", 2386 "src/snapshot/mksnapshot.cc",
2400 ] 2387 ]
2401 2388
2402 configs = [ ":internal_config" ] 2389 configs = [ ":internal_config" ]
2403 2390
2404 deps = [ 2391 deps = [
2405 ":v8_base", 2392 ":v8_base",
2406 ":v8_libbase",
2407 ":v8_libplatform", 2393 ":v8_libplatform",
2408 ":v8_nosnapshot", 2394 ":v8_nosnapshot",
2409 "//build/config/sanitizers:deps", 2395 "//build/config/sanitizers:deps",
2410 "//build/win:default_exe_manifest", 2396 "//build/win:default_exe_manifest",
2411 ] 2397 ]
2412 } 2398 }
2413 } 2399 }
2414 2400
2415 v8_executable("mkpeephole") { 2401 v8_executable("mkpeephole") {
2416 # mkpeephole needs to be built for the build host so the peephole lookup 2402 # mkpeephole needs to be built for the build host so the peephole lookup
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
2519 configs = [ 2505 configs = [
2520 # Note: don't use :internal_config here because this target will get 2506 # Note: don't use :internal_config here because this target will get
2521 # the :external_config applied to it by virtue of depending on :v8, and 2507 # the :external_config applied to it by virtue of depending on :v8, and
2522 # you can't have both applied to the same target. 2508 # you can't have both applied to the same target.
2523 ":internal_config_base", 2509 ":internal_config_base",
2524 ] 2510 ]
2525 2511
2526 deps = [ 2512 deps = [
2527 ":d8_js2c", 2513 ":d8_js2c",
2528 ":v8", 2514 ":v8",
2529 ":v8_libbase",
2530 ":v8_libplatform", 2515 ":v8_libplatform",
2531 "//build/config/sanitizers:deps", 2516 "//build/config/sanitizers:deps",
2532 "//build/win:default_exe_manifest", 2517 "//build/win:default_exe_manifest",
2533 ] 2518 ]
2534 2519
2535 # TODO(jochen): Add support for vtunejit. 2520 # TODO(jochen): Add support for vtunejit.
2536 2521
2537 if (is_posix) { 2522 if (is_posix) {
2538 sources += [ "src/d8-posix.cc" ] 2523 sources += [ "src/d8-posix.cc" ]
2539 } else if (is_win) { 2524 } else if (is_win) {
(...skipping 20 matching lines...) Expand all
2560 2545
2561 configs = [ 2546 configs = [
2562 # Note: don't use :internal_config here because this target will get 2547 # Note: don't use :internal_config here because this target will get
2563 # the :external_config applied to it by virtue of depending on :v8, and 2548 # the :external_config applied to it by virtue of depending on :v8, and
2564 # you can't have both applied to the same target. 2549 # you can't have both applied to the same target.
2565 ":internal_config_base", 2550 ":internal_config_base",
2566 ] 2551 ]
2567 2552
2568 deps = [ 2553 deps = [
2569 ":v8", 2554 ":v8",
2570 ":v8_libbase",
2571 ":v8_libplatform", 2555 ":v8_libplatform",
2572 "//build/config/sanitizers:deps", 2556 "//build/config/sanitizers:deps",
2573 "//build/win:default_exe_manifest", 2557 "//build/win:default_exe_manifest",
2574 ] 2558 ]
2575 2559
2576 if (v8_enable_i18n_support) { 2560 if (v8_enable_i18n_support) {
2577 deps += [ "//third_party/icu" ] 2561 deps += [ "//third_party/icu" ]
2578 } 2562 }
2579 } 2563 }
2580 2564
2581 v8_executable("v8_sample_process") { 2565 v8_executable("v8_sample_process") {
2582 sources = [ 2566 sources = [
2583 "samples/process.cc", 2567 "samples/process.cc",
2584 ] 2568 ]
2585 2569
2586 configs = [ 2570 configs = [
2587 # Note: don't use :internal_config here because this target will get 2571 # Note: don't use :internal_config here because this target will get
2588 # the :external_config applied to it by virtue of depending on :v8, and 2572 # the :external_config applied to it by virtue of depending on :v8, and
2589 # you can't have both applied to the same target. 2573 # you can't have both applied to the same target.
2590 ":internal_config_base", 2574 ":internal_config_base",
2591 ] 2575 ]
2592 2576
2593 deps = [ 2577 deps = [
2594 ":v8", 2578 ":v8",
2595 ":v8_libbase",
2596 ":v8_libplatform", 2579 ":v8_libplatform",
2597 "//build/config/sanitizers:deps", 2580 "//build/config/sanitizers:deps",
2598 "//build/win:default_exe_manifest", 2581 "//build/win:default_exe_manifest",
2599 ] 2582 ]
2600 2583
2601 if (v8_enable_i18n_support) { 2584 if (v8_enable_i18n_support) {
2602 deps += [ "//third_party/icu" ] 2585 deps += [ "//third_party/icu" ]
2603 } 2586 }
2604 } 2587 }
2605 2588
2606 v8_executable("v8_parser_shell") { 2589 v8_executable("v8_parser_shell") {
2607 sources = [ 2590 sources = [
2608 "tools/parser-shell.cc", 2591 "tools/parser-shell.cc",
2609 "tools/shell-utils.h", 2592 "tools/shell-utils.h",
2610 ] 2593 ]
2611 2594
2612 configs = [ 2595 configs = [
2613 ":external_config", 2596 ":external_config",
2614 ":internal_config_base", 2597 ":internal_config_base",
2615 ] 2598 ]
2616 2599
2617 deps = [ 2600 deps = [
2618 ":v8_libbase",
2619 ":v8_libplatform", 2601 ":v8_libplatform",
2620 "//build/config/sanitizers:deps", 2602 "//build/config/sanitizers:deps",
2621 "//build/win:default_exe_manifest", 2603 "//build/win:default_exe_manifest",
2622 ] 2604 ]
2623 2605
2624 if (is_component_build) { 2606 if (is_component_build) {
2625 # v8_parser_shell can't be built against a shared library, so we 2607 # v8_parser_shell can't be built against a shared library, so we
2626 # need to depend on the underlying static target in that case. 2608 # need to depend on the underlying static target in that case.
2627 deps += [ ":v8_maybe_snapshot" ] 2609 deps += [ ":v8_maybe_snapshot" ]
2628 } else { 2610 } else {
(...skipping 23 matching lines...) Expand all
2652 2634
2653 configs = [ 2635 configs = [
2654 # Note: don't use :internal_config here because this target will get 2636 # Note: don't use :internal_config here because this target will get
2655 # the :external_config applied to it by virtue of depending on :v8, and 2637 # the :external_config applied to it by virtue of depending on :v8, and
2656 # you can't have both applied to the same target. 2638 # you can't have both applied to the same target.
2657 ":internal_config_base", 2639 ":internal_config_base",
2658 ] 2640 ]
2659 2641
2660 deps = [ 2642 deps = [
2661 ":v8", 2643 ":v8",
2662 ":v8_libbase",
2663 ":v8_libplatform", 2644 ":v8_libplatform",
2664 "//build/config/sanitizers:deps", 2645 "//build/config/sanitizers:deps",
2665 "//build/win:default_exe_manifest", 2646 "//build/win:default_exe_manifest",
2666 ] 2647 ]
2667 2648
2668 if (v8_enable_i18n_support) { 2649 if (v8_enable_i18n_support) {
2669 deps += [ "//third_party/icu" ] 2650 deps += [ "//third_party/icu" ]
2670 } 2651 }
2671 } 2652 }
2672 } 2653 }
(...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after
2952 ] 2933 ]
2953 2934
2954 configs = [ 2935 configs = [
2955 ":external_config", 2936 ":external_config",
2956 ":internal_config_base", 2937 ":internal_config_base",
2957 ] 2938 ]
2958 } 2939 }
2959 2940
2960 v8_fuzzer("wasm_data_section_fuzzer") { 2941 v8_fuzzer("wasm_data_section_fuzzer") {
2961 } 2942 }
OLDNEW
« no previous file with comments | « no previous file | samples/samples.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698