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

Side by Side Diff: BUILD.gn

Issue 2519053003: Add a GN override to make building fuzzer targets optional. (Closed)
Patch Set: Created 4 years, 1 month 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 | build_overrides/v8.gni » ('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 2368 matching lines...) Expand 10 before | Expand all | Expand 10 after
2379 2379
2380 configs = [ ":internal_config_base" ] 2380 configs = [ ":internal_config_base" ]
2381 2381
2382 public_configs = [ ":libsampler_config" ] 2382 public_configs = [ ":libsampler_config" ]
2383 2383
2384 deps = [ 2384 deps = [
2385 ":v8_libbase", 2385 ":v8_libbase",
2386 ] 2386 ]
2387 } 2387 }
2388 2388
2389 v8_source_set("fuzzer_support") { 2389 if (v8_enable_fuzzers) {
2390 visibility = [ ":*" ] # Only targets in this file can depend on this. 2390 v8_source_set("fuzzer_support") {
2391 visibility = [ ":*" ] # Only targets in this file can depend on this.
2391 2392
2392 sources = [ 2393 sources = [
2393 "test/fuzzer/fuzzer-support.cc", 2394 "test/fuzzer/fuzzer-support.cc",
2394 "test/fuzzer/fuzzer-support.h", 2395 "test/fuzzer/fuzzer-support.h",
2395 ] 2396 ]
2396 2397
2397 configs = [ ":internal_config_base" ] 2398 configs = [ ":internal_config_base" ]
2398 2399
2399 deps = [ 2400 deps = [
2400 ":v8", 2401 ":v8",
2401 ] 2402 ]
2402 2403
2403 public_deps = [ 2404 public_deps = [
2404 ":v8_libbase", 2405 ":v8_libbase",
2405 ":v8_libplatform", 2406 ":v8_libplatform",
2406 ] 2407 ]
2407 2408
2408 if (v8_enable_i18n_support) { 2409 if (v8_enable_i18n_support) {
2409 deps += [ "//third_party/icu" ] 2410 deps += [ "//third_party/icu" ]
2411 }
2412 }
2413
2414 v8_source_set("simple_fuzzer") {
2415 sources = [
2416 "test/fuzzer/fuzzer.cc",
2417 ]
2418
2419 configs = [ ":internal_config_base" ]
2410 } 2420 }
2411 } 2421 }
2412 2422
2413 v8_source_set("simple_fuzzer") {
2414 sources = [
2415 "test/fuzzer/fuzzer.cc",
2416 ]
2417
2418 configs = [ ":internal_config_base" ]
2419 }
2420
2421 ############################################################################### 2423 ###############################################################################
2422 # Executables 2424 # Executables
2423 # 2425 #
2424 2426
2425 if (current_toolchain == v8_snapshot_toolchain) { 2427 if (current_toolchain == v8_snapshot_toolchain) {
2426 v8_executable("mksnapshot") { 2428 v8_executable("mksnapshot") {
2427 visibility = [ ":*" ] # Only targets in this file can depend on this. 2429 visibility = [ ":*" ] # Only targets in this file can depend on this.
2428 2430
2429 sources = [ 2431 sources = [
2430 "src/snapshot/mksnapshot.cc", 2432 "src/snapshot/mksnapshot.cc",
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
2482 (current_toolchain != host_toolchain && v8_toolset_for_shell == "target") 2484 (current_toolchain != host_toolchain && v8_toolset_for_shell == "target")
2483 2485
2484 group("gn_all") { 2486 group("gn_all") {
2485 testonly = true 2487 testonly = true
2486 2488
2487 deps = [ 2489 deps = [
2488 ":d8", 2490 ":d8",
2489 ":v8_hello_world", 2491 ":v8_hello_world",
2490 ":v8_parser_shell", 2492 ":v8_parser_shell",
2491 ":v8_sample_process", 2493 ":v8_sample_process",
2492 ":v8_simple_json_fuzzer",
2493 ":v8_simple_parser_fuzzer",
2494 ":v8_simple_regexp_fuzzer",
2495 ":v8_simple_wasm_asmjs_fuzzer",
2496 ":v8_simple_wasm_fuzzer",
2497 "test:gn_all", 2494 "test:gn_all",
2498 "tools:gn_all", 2495 "tools:gn_all",
2499 ] 2496 ]
2500 2497
2498 if (v8_enable_fuzzers) {
2499 deps += [
2500 ":v8_simple_json_fuzzer",
2501 ":v8_simple_parser_fuzzer",
2502 ":v8_simple_regexp_fuzzer",
2503 ":v8_simple_wasm_asmjs_fuzzer",
2504 ":v8_simple_wasm_fuzzer",
2505 ]
2506 }
2507
2501 if (want_v8_shell) { 2508 if (want_v8_shell) {
2502 deps += [ ":v8_shell" ] 2509 deps += [ ":v8_shell" ]
2503 } 2510 }
2504 2511
2505 if (v8_test_isolation_mode != "noop") { 2512 if (v8_test_isolation_mode != "noop") {
2506 deps += [ ":d8_run" ] 2513 deps += [ ":d8_run" ]
2507 } 2514 }
2508 } 2515 }
2509 2516
2510 if (is_component_build) { 2517 if (is_component_build) {
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
2683 "//build/config/sanitizers:deps", 2690 "//build/config/sanitizers:deps",
2684 "//build/win:default_exe_manifest", 2691 "//build/win:default_exe_manifest",
2685 ] 2692 ]
2686 2693
2687 if (v8_enable_i18n_support) { 2694 if (v8_enable_i18n_support) {
2688 deps += [ "//third_party/icu" ] 2695 deps += [ "//third_party/icu" ]
2689 } 2696 }
2690 } 2697 }
2691 } 2698 }
2692 2699
2693 template("v8_fuzzer") { 2700 v8_source_set("wasm_module_runner") {
2694 name = target_name
2695 forward_variables_from(invoker, "*")
2696 v8_executable("v8_simple_" + name) {
2697 deps = [
2698 ":" + name,
2699 ":simple_fuzzer",
2700 "//build/win:default_exe_manifest",
2701 ]
2702
2703 configs = [ ":external_config" ]
2704 }
2705 }
2706
2707 v8_source_set("json_fuzzer") {
2708 sources = [ 2701 sources = [
2709 "test/fuzzer/json.cc", 2702 "test/common/wasm/wasm-module-runner.cc",
2710 ] 2703 "test/common/wasm/wasm-module-runner.h",
2711
2712 deps = [
2713 ":fuzzer_support",
2714 ] 2704 ]
2715 2705
2716 configs = [ 2706 configs = [
2717 ":external_config", 2707 ":external_config",
2718 ":internal_config_base", 2708 ":internal_config_base",
2719 ] 2709 ]
2720 } 2710 }
2721 2711
2722 v8_fuzzer("json_fuzzer") { 2712 v8_source_set("wasm_test_signatures") {
2723 }
2724
2725 v8_source_set("parser_fuzzer") {
2726 sources = [ 2713 sources = [
2727 "test/fuzzer/parser.cc", 2714 "test/common/wasm/test-signatures.h",
2728 ]
2729
2730 deps = [
2731 ":fuzzer_support",
2732 ] 2715 ]
2733 2716
2734 configs = [ 2717 configs = [
2735 ":external_config", 2718 ":external_config",
2736 ":internal_config_base", 2719 ":internal_config_base",
2737 ] 2720 ]
2738 } 2721 }
2739 2722
2740 v8_fuzzer("parser_fuzzer") { 2723 if (v8_enable_fuzzers) {
2724 template("v8_fuzzer") {
2725 name = target_name
2726 forward_variables_from(invoker, "*")
2727 v8_executable("v8_simple_" + name) {
2728 deps = [
2729 ":" + name,
2730 ":simple_fuzzer",
2731 "//build/win:default_exe_manifest",
2732 ]
2733
2734 configs = [ ":external_config" ]
2735 }
2736 }
2737
2738 v8_source_set("json_fuzzer") {
2739 sources = [
2740 "test/fuzzer/json.cc",
2741 ]
2742
2743 deps = [
2744 ":fuzzer_support",
2745 ]
2746
2747 configs = [
2748 ":external_config",
2749 ":internal_config_base",
2750 ]
2751 }
2752
2753 v8_fuzzer("json_fuzzer") {
2754 }
2755
2756 v8_source_set("parser_fuzzer") {
2757 sources = [
2758 "test/fuzzer/parser.cc",
2759 ]
2760
2761 deps = [
2762 ":fuzzer_support",
2763 ]
2764
2765 configs = [
2766 ":external_config",
2767 ":internal_config_base",
2768 ]
2769 }
2770
2771 v8_fuzzer("parser_fuzzer") {
2772 }
2773
2774 v8_source_set("regexp_fuzzer") {
2775 sources = [
2776 "test/fuzzer/regexp.cc",
2777 ]
2778
2779 deps = [
2780 ":fuzzer_support",
2781 ]
2782
2783 configs = [
2784 ":external_config",
2785 ":internal_config_base",
2786 ]
2787 }
2788
2789 v8_fuzzer("regexp_fuzzer") {
2790 }
2791
2792 v8_source_set("wasm_fuzzer") {
2793 sources = [
2794 "test/fuzzer/wasm.cc",
2795 ]
2796
2797 deps = [
2798 ":fuzzer_support",
2799 ":wasm_module_runner",
2800 ]
2801
2802 configs = [
2803 ":external_config",
2804 ":internal_config_base",
2805 ]
2806 }
2807
2808 v8_fuzzer("wasm_fuzzer") {
2809 }
2810
2811 v8_source_set("wasm_asmjs_fuzzer") {
2812 sources = [
2813 "test/fuzzer/wasm-asmjs.cc",
2814 ]
2815
2816 deps = [
2817 ":fuzzer_support",
2818 ":wasm_module_runner",
2819 ]
2820
2821 configs = [
2822 ":external_config",
2823 ":internal_config_base",
2824 ]
2825 }
2826
2827 v8_fuzzer("wasm_asmjs_fuzzer") {
2828 }
2829
2830 v8_source_set("wasm_code_fuzzer") {
2831 sources = [
2832 "test/fuzzer/wasm-code.cc",
2833 ]
2834
2835 deps = [
2836 ":fuzzer_support",
2837 ":wasm_module_runner",
2838 ":wasm_test_signatures",
2839 ]
2840
2841 configs = [
2842 ":external_config",
2843 ":internal_config_base",
2844 ]
2845 }
2846
2847 v8_fuzzer("wasm_code_fuzzer") {
2848 }
2849
2850 v8_source_set("wasm_call_fuzzer") {
2851 sources = [
2852 "test/fuzzer/wasm-call.cc",
2853 ]
2854
2855 deps = [
2856 ":fuzzer_support",
2857 ":wasm_module_runner",
2858 ":wasm_test_signatures",
2859 ]
2860
2861 configs = [
2862 ":external_config",
2863 ":internal_config_base",
2864 ]
2865 }
2866
2867 v8_fuzzer("wasm_call_fuzzer") {
2868 }
2869
2870 v8_source_set("lib_wasm_section_fuzzer") {
2871 sources = [
2872 "test/fuzzer/wasm-section-fuzzers.cc",
2873 "test/fuzzer/wasm-section-fuzzers.h",
2874 ]
2875
2876 configs = [
2877 ":external_config",
2878 ":internal_config_base",
2879 ]
2880 }
2881
2882 v8_source_set("wasm_types_section_fuzzer") {
2883 sources = [
2884 "test/fuzzer/wasm-types-section.cc",
2885 ]
2886
2887 deps = [
2888 ":fuzzer_support",
2889 ":lib_wasm_section_fuzzer",
2890 ":wasm_module_runner",
2891 ]
2892
2893 configs = [
2894 ":external_config",
2895 ":internal_config_base",
2896 ]
2897 }
2898
2899 v8_fuzzer("wasm_types_section_fuzzer") {
2900 }
2901
2902 v8_source_set("wasm_names_section_fuzzer") {
2903 sources = [
2904 "test/fuzzer/wasm-names-section.cc",
2905 ]
2906
2907 deps = [
2908 ":fuzzer_support",
2909 ":lib_wasm_section_fuzzer",
2910 ":wasm_module_runner",
2911 ]
2912
2913 configs = [
2914 ":external_config",
2915 ":internal_config_base",
2916 ]
2917 }
2918
2919 v8_fuzzer("wasm_names_section_fuzzer") {
2920 }
2921
2922 v8_source_set("wasm_globals_section_fuzzer") {
2923 sources = [
2924 "test/fuzzer/wasm-globals-section.cc",
2925 ]
2926
2927 deps = [
2928 ":fuzzer_support",
2929 ":lib_wasm_section_fuzzer",
2930 ":wasm_module_runner",
2931 ]
2932
2933 configs = [
2934 ":external_config",
2935 ":internal_config_base",
2936 ]
2937 }
2938
2939 v8_fuzzer("wasm_globals_section_fuzzer") {
2940 }
2941
2942 v8_source_set("wasm_imports_section_fuzzer") {
2943 sources = [
2944 "test/fuzzer/wasm-imports-section.cc",
2945 ]
2946
2947 deps = [
2948 ":fuzzer_support",
2949 ":lib_wasm_section_fuzzer",
2950 ":wasm_module_runner",
2951 ]
2952
2953 configs = [
2954 ":external_config",
2955 ":internal_config_base",
2956 ]
2957 }
2958
2959 v8_fuzzer("wasm_imports_section_fuzzer") {
2960 }
2961
2962 v8_source_set("wasm_function_sigs_section_fuzzer") {
2963 sources = [
2964 "test/fuzzer/wasm-function-sigs-section.cc",
2965 ]
2966
2967 deps = [
2968 ":fuzzer_support",
2969 ":lib_wasm_section_fuzzer",
2970 ":wasm_module_runner",
2971 ]
2972
2973 configs = [
2974 ":external_config",
2975 ":internal_config_base",
2976 ]
2977 }
2978
2979 v8_fuzzer("wasm_function_sigs_section_fuzzer") {
2980 }
2981
2982 v8_source_set("wasm_memory_section_fuzzer") {
2983 sources = [
2984 "test/fuzzer/wasm-memory-section.cc",
2985 ]
2986
2987 deps = [
2988 ":fuzzer_support",
2989 ":lib_wasm_section_fuzzer",
2990 ":wasm_module_runner",
2991 ]
2992
2993 configs = [
2994 ":external_config",
2995 ":internal_config_base",
2996 ]
2997 }
2998
2999 v8_fuzzer("wasm_memory_section_fuzzer") {
3000 }
3001
3002 v8_source_set("wasm_data_section_fuzzer") {
3003 sources = [
3004 "test/fuzzer/wasm-data-section.cc",
3005 ]
3006
3007 deps = [
3008 ":fuzzer_support",
3009 ":lib_wasm_section_fuzzer",
3010 ":wasm_module_runner",
3011 ]
3012
3013 configs = [
3014 ":external_config",
3015 ":internal_config_base",
3016 ]
3017 }
3018
3019 v8_fuzzer("wasm_data_section_fuzzer") {
3020 }
2741 } 3021 }
2742
2743 v8_source_set("regexp_fuzzer") {
2744 sources = [
2745 "test/fuzzer/regexp.cc",
2746 ]
2747
2748 deps = [
2749 ":fuzzer_support",
2750 ]
2751
2752 configs = [
2753 ":external_config",
2754 ":internal_config_base",
2755 ]
2756 }
2757
2758 v8_fuzzer("regexp_fuzzer") {
2759 }
2760
2761 v8_source_set("wasm_module_runner") {
2762 sources = [
2763 "test/common/wasm/wasm-module-runner.cc",
2764 "test/common/wasm/wasm-module-runner.h",
2765 ]
2766
2767 configs = [
2768 ":external_config",
2769 ":internal_config_base",
2770 ]
2771 }
2772
2773 v8_source_set("wasm_test_signatures") {
2774 sources = [
2775 "test/common/wasm/test-signatures.h",
2776 ]
2777
2778 configs = [
2779 ":external_config",
2780 ":internal_config_base",
2781 ]
2782 }
2783
2784 v8_source_set("wasm_fuzzer") {
2785 sources = [
2786 "test/fuzzer/wasm.cc",
2787 ]
2788
2789 deps = [
2790 ":fuzzer_support",
2791 ":wasm_module_runner",
2792 ]
2793
2794 configs = [
2795 ":external_config",
2796 ":internal_config_base",
2797 ]
2798 }
2799
2800 v8_fuzzer("wasm_fuzzer") {
2801 }
2802
2803 v8_source_set("wasm_asmjs_fuzzer") {
2804 sources = [
2805 "test/fuzzer/wasm-asmjs.cc",
2806 ]
2807
2808 deps = [
2809 ":fuzzer_support",
2810 ":wasm_module_runner",
2811 ]
2812
2813 configs = [
2814 ":external_config",
2815 ":internal_config_base",
2816 ]
2817 }
2818
2819 v8_fuzzer("wasm_asmjs_fuzzer") {
2820 }
2821
2822 v8_source_set("wasm_code_fuzzer") {
2823 sources = [
2824 "test/fuzzer/wasm-code.cc",
2825 ]
2826
2827 deps = [
2828 ":fuzzer_support",
2829 ":wasm_module_runner",
2830 ":wasm_test_signatures",
2831 ]
2832
2833 configs = [
2834 ":external_config",
2835 ":internal_config_base",
2836 ]
2837 }
2838
2839 v8_fuzzer("wasm_code_fuzzer") {
2840 }
2841
2842 v8_source_set("wasm_call_fuzzer") {
2843 sources = [
2844 "test/fuzzer/wasm-call.cc",
2845 ]
2846
2847 deps = [
2848 ":fuzzer_support",
2849 ":wasm_module_runner",
2850 ":wasm_test_signatures",
2851 ]
2852
2853 configs = [
2854 ":external_config",
2855 ":internal_config_base",
2856 ]
2857 }
2858
2859 v8_fuzzer("wasm_call_fuzzer") {
2860 }
2861
2862 v8_source_set("lib_wasm_section_fuzzer") {
2863 sources = [
2864 "test/fuzzer/wasm-section-fuzzers.cc",
2865 "test/fuzzer/wasm-section-fuzzers.h",
2866 ]
2867
2868 configs = [
2869 ":external_config",
2870 ":internal_config_base",
2871 ]
2872 }
2873
2874 v8_source_set("wasm_types_section_fuzzer") {
2875 sources = [
2876 "test/fuzzer/wasm-types-section.cc",
2877 ]
2878
2879 deps = [
2880 ":fuzzer_support",
2881 ":lib_wasm_section_fuzzer",
2882 ":wasm_module_runner",
2883 ]
2884
2885 configs = [
2886 ":external_config",
2887 ":internal_config_base",
2888 ]
2889 }
2890
2891 v8_fuzzer("wasm_types_section_fuzzer") {
2892 }
2893
2894 v8_source_set("wasm_names_section_fuzzer") {
2895 sources = [
2896 "test/fuzzer/wasm-names-section.cc",
2897 ]
2898
2899 deps = [
2900 ":fuzzer_support",
2901 ":lib_wasm_section_fuzzer",
2902 ":wasm_module_runner",
2903 ]
2904
2905 configs = [
2906 ":external_config",
2907 ":internal_config_base",
2908 ]
2909 }
2910
2911 v8_fuzzer("wasm_names_section_fuzzer") {
2912 }
2913
2914 v8_source_set("wasm_globals_section_fuzzer") {
2915 sources = [
2916 "test/fuzzer/wasm-globals-section.cc",
2917 ]
2918
2919 deps = [
2920 ":fuzzer_support",
2921 ":lib_wasm_section_fuzzer",
2922 ":wasm_module_runner",
2923 ]
2924
2925 configs = [
2926 ":external_config",
2927 ":internal_config_base",
2928 ]
2929 }
2930
2931 v8_fuzzer("wasm_globals_section_fuzzer") {
2932 }
2933
2934 v8_source_set("wasm_imports_section_fuzzer") {
2935 sources = [
2936 "test/fuzzer/wasm-imports-section.cc",
2937 ]
2938
2939 deps = [
2940 ":fuzzer_support",
2941 ":lib_wasm_section_fuzzer",
2942 ":wasm_module_runner",
2943 ]
2944
2945 configs = [
2946 ":external_config",
2947 ":internal_config_base",
2948 ]
2949 }
2950
2951 v8_fuzzer("wasm_imports_section_fuzzer") {
2952 }
2953
2954 v8_source_set("wasm_function_sigs_section_fuzzer") {
2955 sources = [
2956 "test/fuzzer/wasm-function-sigs-section.cc",
2957 ]
2958
2959 deps = [
2960 ":fuzzer_support",
2961 ":lib_wasm_section_fuzzer",
2962 ":wasm_module_runner",
2963 ]
2964
2965 configs = [
2966 ":external_config",
2967 ":internal_config_base",
2968 ]
2969 }
2970
2971 v8_fuzzer("wasm_function_sigs_section_fuzzer") {
2972 }
2973
2974 v8_source_set("wasm_memory_section_fuzzer") {
2975 sources = [
2976 "test/fuzzer/wasm-memory-section.cc",
2977 ]
2978
2979 deps = [
2980 ":fuzzer_support",
2981 ":lib_wasm_section_fuzzer",
2982 ":wasm_module_runner",
2983 ]
2984
2985 configs = [
2986 ":external_config",
2987 ":internal_config_base",
2988 ]
2989 }
2990
2991 v8_fuzzer("wasm_memory_section_fuzzer") {
2992 }
2993
2994 v8_source_set("wasm_data_section_fuzzer") {
2995 sources = [
2996 "test/fuzzer/wasm-data-section.cc",
2997 ]
2998
2999 deps = [
3000 ":fuzzer_support",
3001 ":lib_wasm_section_fuzzer",
3002 ":wasm_module_runner",
3003 ]
3004
3005 configs = [
3006 ":external_config",
3007 ":internal_config_base",
3008 ]
3009 }
3010
3011 v8_fuzzer("wasm_data_section_fuzzer") {
3012 }
OLDNEW
« no previous file with comments | « no previous file | build_overrides/v8.gni » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698