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

Side by Side Diff: build/toolchain.gypi

Issue 846653002: Introduce a gyp variable to control whether or not slow dchecks are on (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 11 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 | « Makefile ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2013 the V8 project authors. All rights reserved. 1 # Copyright 2013 the V8 project authors. All rights reserved.
2 # Redistribution and use in source and binary forms, with or without 2 # Redistribution and use in source and binary forms, with or without
3 # modification, are permitted provided that the following conditions are 3 # modification, are permitted provided that the following conditions are
4 # met: 4 # met:
5 # 5 #
6 # * Redistributions of source code must retain the above copyright 6 # * Redistributions of source code must retain the above copyright
7 # notice, this list of conditions and the following disclaimer. 7 # notice, this list of conditions and the following disclaimer.
8 # * Redistributions in binary form must reproduce the above 8 # * Redistributions in binary form must reproduce the above
9 # copyright notice, this list of conditions and the following 9 # copyright notice, this list of conditions and the following
10 # disclaimer in the documentation and/or other materials provided 10 # disclaimer in the documentation and/or other materials provided
(...skipping 865 matching lines...) Expand 10 before | Expand all | Expand 10 after
876 'RuntimeLibrary': '3', # /MDd 876 'RuntimeLibrary': '3', # /MDd
877 }, { 877 }, {
878 'RuntimeLibrary': '1', # /MTd 878 'RuntimeLibrary': '1', # /MTd
879 }], 879 }],
880 ], 880 ],
881 }, 881 },
882 'VCLinkerTool': { 882 'VCLinkerTool': {
883 'LinkIncremental': '2', 883 'LinkIncremental': '2',
884 }, 884 },
885 }, 885 },
886 'variables': {
887 'v8_enable_slow_dchecks%': 1,
888 },
886 'conditions': [ 889 'conditions': [
887 ['OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="netbsd" or \ 890 ['OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="netbsd" or \
888 OS=="qnx"', { 891 OS=="qnx"', {
889 'cflags!': [ 892 'cflags!': [
890 '-O3', 893 '-O3',
891 '-O2', 894 '-O2',
892 '-O1', 895 '-O1',
893 '-Os', 896 '-Os',
894 ], 897 ],
895 'cflags': [ 898 'cflags': [
896 '-fdata-sections', 899 '-fdata-sections',
897 '-ffunction-sections', 900 '-ffunction-sections',
898 ], 901 ],
899 }], 902 }],
900 ['OS=="mac"', { 903 ['OS=="mac"', {
901 'xcode_settings': { 904 'xcode_settings': {
902 'GCC_OPTIMIZATION_LEVEL': '0', # -O0 905 'GCC_OPTIMIZATION_LEVEL': '0', # -O0
903 }, 906 },
904 }], 907 }],
905 ], 908 ['v8_enable_slow_dchecks==1', {
906 'defines': [ 909 'defines': [
907 'ENABLE_SLOW_DCHECKS', 910 'ENABLE_SLOW_DCHECKS',
911 ],
912 }],
908 ], 913 ],
909 }, # DebugBase0 914 }, # DebugBase0
910 # Abstract configuration for v8_optimized_debug == 1. 915 # Abstract configuration for v8_optimized_debug == 1.
911 'DebugBase1': { 916 'DebugBase1': {
912 'abstract': 1, 917 'abstract': 1,
913 'msvs_settings': { 918 'msvs_settings': {
914 'VCCLCompilerTool': { 919 'VCCLCompilerTool': {
915 'Optimization': '1', 920 'Optimization': '1',
916 'InlineFunctionExpansion': '2', 921 'InlineFunctionExpansion': '2',
917 'EnableIntrinsicFunctions': 'true', 922 'EnableIntrinsicFunctions': 'true',
918 'FavorSizeOrSpeed': '0', 923 'FavorSizeOrSpeed': '0',
919 'StringPooling': 'true', 924 'StringPooling': 'true',
920 'BasicRuntimeChecks': '0', 925 'BasicRuntimeChecks': '0',
921 'conditions': [ 926 'conditions': [
922 ['component=="shared_library"', { 927 ['component=="shared_library"', {
923 'RuntimeLibrary': '3', # /MDd 928 'RuntimeLibrary': '3', # /MDd
924 }, { 929 }, {
925 'RuntimeLibrary': '1', # /MTd 930 'RuntimeLibrary': '1', # /MTd
926 }], 931 }],
927 ], 932 ],
928 }, 933 },
929 'VCLinkerTool': { 934 'VCLinkerTool': {
930 'LinkIncremental': '2', 935 'LinkIncremental': '2',
931 }, 936 },
932 }, 937 },
933 'defines': [ 938 'variables': {
934 'ENABLE_SLOW_DCHECKS', 939 'v8_enable_slow_dchecks%': 1,
935 ], 940 },
936 'conditions': [ 941 'conditions': [
937 ['OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="netbsd" or \ 942 ['OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="netbsd" or \
938 OS=="qnx"', { 943 OS=="qnx"', {
939 'cflags!': [ 944 'cflags!': [
940 '-O0', 945 '-O0',
941 '-O3', # TODO(2807) should be -O1. 946 '-O3', # TODO(2807) should be -O1.
942 '-O2', 947 '-O2',
943 '-Os', 948 '-Os',
944 ], 949 ],
945 'cflags': [ 950 'cflags': [
946 '-fdata-sections', 951 '-fdata-sections',
947 '-ffunction-sections', 952 '-ffunction-sections',
948 '-O1', # TODO(2807) should be -O3. 953 '-O1', # TODO(2807) should be -O3.
949 ], 954 ],
950 }], 955 }],
951 ['OS=="mac"', { 956 ['OS=="mac"', {
952 'xcode_settings': { 957 'xcode_settings': {
953 'GCC_OPTIMIZATION_LEVEL': '3', # -O3 958 'GCC_OPTIMIZATION_LEVEL': '3', # -O3
954 'GCC_STRICT_ALIASING': 'YES', 959 'GCC_STRICT_ALIASING': 'YES',
955 }, 960 },
956 }], 961 }],
962 ['v8_enable_slow_dchecks==1', {
963 'defines': [
964 'ENABLE_SLOW_DCHECKS',
965 ],
966 }],
957 ], 967 ],
958 }, # DebugBase1 968 }, # DebugBase1
959 # Abstract configuration for v8_optimized_debug == 2. 969 # Abstract configuration for v8_optimized_debug == 2.
960 'DebugBase2': { 970 'DebugBase2': {
961 'abstract': 1, 971 'abstract': 1,
962 'msvs_settings': { 972 'msvs_settings': {
963 'VCCLCompilerTool': { 973 'VCCLCompilerTool': {
964 'Optimization': '2', 974 'Optimization': '2',
965 'InlineFunctionExpansion': '2', 975 'InlineFunctionExpansion': '2',
966 'EnableIntrinsicFunctions': 'true', 976 'EnableIntrinsicFunctions': 'true',
967 'FavorSizeOrSpeed': '0', 977 'FavorSizeOrSpeed': '0',
968 'StringPooling': 'true', 978 'StringPooling': 'true',
969 'BasicRuntimeChecks': '0', 979 'BasicRuntimeChecks': '0',
970 'conditions': [ 980 'conditions': [
971 ['component=="shared_library"', { 981 ['component=="shared_library"', {
972 'RuntimeLibrary': '3', #/MDd 982 'RuntimeLibrary': '3', #/MDd
973 }, { 983 }, {
974 'RuntimeLibrary': '1', #/MTd 984 'RuntimeLibrary': '1', #/MTd
975 }], 985 }],
976 ], 986 ],
977 }, 987 },
978 'VCLinkerTool': { 988 'VCLinkerTool': {
979 'LinkIncremental': '1', 989 'LinkIncremental': '1',
980 'OptimizeReferences': '2', 990 'OptimizeReferences': '2',
981 'EnableCOMDATFolding': '2', 991 'EnableCOMDATFolding': '2',
982 }, 992 },
983 }, 993 },
994 'variables': {
995 'v8_enable_slow_dchecks%': 0,
996 },
984 'conditions': [ 997 'conditions': [
985 ['OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="netbsd" or \ 998 ['OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="netbsd" or \
986 OS=="qnx"', { 999 OS=="qnx"', {
987 'cflags!': [ 1000 'cflags!': [
988 '-O0', 1001 '-O0',
989 '-O1', 1002 '-O1',
990 '-Os', 1003 '-Os',
991 ], 1004 ],
992 'cflags': [ 1005 'cflags': [
993 '-fdata-sections', 1006 '-fdata-sections',
994 '-ffunction-sections', 1007 '-ffunction-sections',
995 ], 1008 ],
996 'conditions': [ 1009 'conditions': [
997 # TODO(crbug.com/272548): Avoid -O3 in NaCl 1010 # TODO(crbug.com/272548): Avoid -O3 in NaCl
998 ['nacl_target_arch=="none"', { 1011 ['nacl_target_arch=="none"', {
999 'cflags': ['-O3'], 1012 'cflags': ['-O3'],
1000 'cflags!': ['-O2'], 1013 'cflags!': ['-O2'],
1001 }, { 1014 }, {
1002 'cflags': ['-O2'], 1015 'cflags': ['-O2'],
1003 'cflags!': ['-O3'], 1016 'cflags!': ['-O3'],
1004 }], 1017 }],
1005 ], 1018 ],
1006 }], 1019 }],
1007 ['OS=="mac"', { 1020 ['OS=="mac"', {
1008 'xcode_settings': { 1021 'xcode_settings': {
1009 'GCC_OPTIMIZATION_LEVEL': '3', # -O3 1022 'GCC_OPTIMIZATION_LEVEL': '3', # -O3
1010 'GCC_STRICT_ALIASING': 'YES', 1023 'GCC_STRICT_ALIASING': 'YES',
1011 }, 1024 },
1012 }], 1025 }],
1026 ['v8_enable_slow_dchecks==1', {
1027 'defines': [
1028 'ENABLE_SLOW_DCHECKS',
1029 ],
1030 }],
1013 ], 1031 ],
1014 }, # DebugBase2 1032 }, # DebugBase2
1015 # Common settings for the Debug configuration. 1033 # Common settings for the Debug configuration.
1016 'DebugBaseCommon': { 1034 'DebugBaseCommon': {
1017 'abstract': 1, 1035 'abstract': 1,
1018 'defines': [ 1036 'defines': [
1019 'ENABLE_DISASSEMBLER', 1037 'ENABLE_DISASSEMBLER',
1020 'V8_ENABLE_CHECKS', 1038 'V8_ENABLE_CHECKS',
1021 'OBJECT_PRINT', 1039 'OBJECT_PRINT',
1022 'VERIFY_HEAP', 1040 'VERIFY_HEAP',
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
1057 }], 1075 }],
1058 ['v8_optimized_debug==1', { 1076 ['v8_optimized_debug==1', {
1059 'inherit_from': ['DebugBase1'], 1077 'inherit_from': ['DebugBase1'],
1060 }], 1078 }],
1061 ['v8_optimized_debug==2', { 1079 ['v8_optimized_debug==2', {
1062 'inherit_from': ['DebugBase2'], 1080 'inherit_from': ['DebugBase2'],
1063 }], 1081 }],
1064 ], 1082 ],
1065 }, # Debug 1083 }, # Debug
1066 'Release': { 1084 'Release': {
1085 'variables': {
1086 'v8_enable_slow_dchecks%': 0,
1087 },
1067 'conditions': [ 1088 'conditions': [
1068 ['OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="netbsd"', { 1089 ['OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="netbsd"', {
1069 'cflags!': [ 1090 'cflags!': [
1070 '-Os', 1091 '-Os',
1071 ], 1092 ],
1072 'cflags': [ 1093 'cflags': [
1073 '-fdata-sections', 1094 '-fdata-sections',
1074 '-ffunction-sections', 1095 '-ffunction-sections',
1075 '<(wno_array_bounds)', 1096 '<(wno_array_bounds)',
1076 ], 1097 ],
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
1123 }], 1144 }],
1124 ], 1145 ],
1125 }, 1146 },
1126 'VCLinkerTool': { 1147 'VCLinkerTool': {
1127 'LinkIncremental': '1', 1148 'LinkIncremental': '1',
1128 'OptimizeReferences': '2', 1149 'OptimizeReferences': '2',
1129 'EnableCOMDATFolding': '2', 1150 'EnableCOMDATFolding': '2',
1130 }, 1151 },
1131 }, 1152 },
1132 }], # OS=="win" 1153 }], # OS=="win"
1154 ['v8_enable_slow_dchecks==1', {
1155 'defines': [
1156 'ENABLE_SLOW_DCHECKS',
1157 ],
1158 }],
1133 ], # conditions 1159 ], # conditions
1134 }, # Release 1160 }, # Release
1135 }, # configurations 1161 }, # configurations
1136 }, # target_defaults 1162 }, # target_defaults
1137 } 1163 }
OLDNEW
« no previous file with comments | « Makefile ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698