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