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