Skip to content

Commit ef8b5b4

Browse files
refacktargos
authored andcommitted
deps,v8: fix gypfile bug
PR-URL: #23704 Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com>
1 parent e7133f1 commit ef8b5b4

File tree

3 files changed

+115
-166
lines changed

3 files changed

+115
-166
lines changed

common.gypi

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030

3131
# Reset this number to 0 on major V8 upgrades.
3232
# Increment by one for each non-official patch applied to deps/v8.
33-
'v8_embedder_string': '-node.7',
33+
'v8_embedder_string': '-node.8',
3434

3535
# Enable disassembler for `--print-code` v8 options
3636
'v8_enable_disassembler': 1,

deps/v8/gypfiles/toolchain.gypi

+110-148
Original file line numberDiff line numberDiff line change
@@ -1134,121 +1134,7 @@
11341134
}],
11351135
], # conditions
11361136
'configurations': {
1137-
# Abstract configuration for v8_optimized_debug == 0.
1138-
'DebugBase0': {
1139-
'abstract': 1,
1140-
'msvs_settings': {
1141-
'VCCLCompilerTool': {
1142-
'Optimization': '0',
1143-
'conditions': [
1144-
['component=="shared_library" or force_dynamic_crt==1', {
1145-
'RuntimeLibrary': '3', # /MDd
1146-
}, {
1147-
'RuntimeLibrary': '1', # /MTd
1148-
}],
1149-
],
1150-
},
1151-
'VCLinkerTool': {
1152-
'LinkIncremental': '2',
1153-
},
1154-
},
1155-
'variables': {
1156-
'v8_enable_slow_dchecks%': 1,
1157-
},
1158-
'conditions': [
1159-
['OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="netbsd" or \
1160-
OS=="qnx" or OS=="aix"', {
1161-
'cflags!': [
1162-
'-O3',
1163-
'-O2',
1164-
'-O1',
1165-
'-Os',
1166-
],
1167-
'cflags': [
1168-
'-fdata-sections',
1169-
'-ffunction-sections',
1170-
],
1171-
}],
1172-
['OS=="mac"', {
1173-
'xcode_settings': {
1174-
'GCC_OPTIMIZATION_LEVEL': '0', # -O0
1175-
},
1176-
}],
1177-
['v8_enable_slow_dchecks==1', {
1178-
'defines': [
1179-
'ENABLE_SLOW_DCHECKS',
1180-
],
1181-
}],
1182-
],
1183-
}, # DebugBase0
1184-
# Abstract configuration for v8_optimized_debug == 1.
1185-
'DebugBase1': {
1186-
'abstract': 1,
1187-
'msvs_settings': {
1188-
'VCCLCompilerTool': {
1189-
'Optimization': '2',
1190-
'InlineFunctionExpansion': '2',
1191-
'EnableIntrinsicFunctions': 'true',
1192-
'FavorSizeOrSpeed': '0',
1193-
'StringPooling': 'true',
1194-
'BasicRuntimeChecks': '0',
1195-
'conditions': [
1196-
['component=="shared_library" or force_dynamic_crt==1', {
1197-
'RuntimeLibrary': '3', #/MDd
1198-
}, {
1199-
'RuntimeLibrary': '1', #/MTd
1200-
}],
1201-
],
1202-
},
1203-
'VCLinkerTool': {
1204-
'LinkIncremental': '1',
1205-
'OptimizeReferences': '2',
1206-
'EnableCOMDATFolding': '2',
1207-
},
1208-
},
1209-
'variables': {
1210-
'v8_enable_slow_dchecks%': 0,
1211-
},
1212-
'conditions': [
1213-
['OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="netbsd" or \
1214-
OS=="qnx" or OS=="aix"', {
1215-
'cflags!': [
1216-
'-O0',
1217-
'-O1',
1218-
'-Os',
1219-
],
1220-
'cflags': [
1221-
'-fdata-sections',
1222-
'-ffunction-sections',
1223-
],
1224-
'conditions': [
1225-
# Don't use -O3 with sanitizers.
1226-
['asan==0 and msan==0 and lsan==0 \
1227-
and tsan==0 and ubsan==0 and ubsan_vptr==0', {
1228-
'cflags': ['-O3'],
1229-
'cflags!': ['-O2'],
1230-
}, {
1231-
'cflags': ['-O2'],
1232-
'cflags!': ['-O3'],
1233-
}],
1234-
],
1235-
}],
1236-
['OS=="mac"', {
1237-
'xcode_settings': {
1238-
'GCC_OPTIMIZATION_LEVEL': '3', # -O3
1239-
'GCC_STRICT_ALIASING': 'YES',
1240-
},
1241-
}],
1242-
['v8_enable_slow_dchecks==1', {
1243-
'defines': [
1244-
'ENABLE_SLOW_DCHECKS',
1245-
],
1246-
}],
1247-
],
1248-
}, # DebugBase1
1249-
# Common settings for the Debug configuration.
1250-
'DebugBaseCommon': {
1251-
'abstract': 1,
1137+
'Debug': {
12521138
'defines': [
12531139
'ENABLE_DISASSEMBLER',
12541140
'V8_ENABLE_CHECKS',
@@ -1311,27 +1197,126 @@
13111197
}],
13121198
],
13131199
}],
1314-
],
1315-
}, # DebugBaseCommon
1316-
'Debug': {
1317-
'inherit_from': ['DebugBaseCommon'],
1318-
'conditions': [
13191200
['v8_optimized_debug==0', {
1320-
'inherit_from': ['DebugBase0'],
1201+
'msvs_settings': {
1202+
'VCCLCompilerTool': {
1203+
'Optimization': '0',
1204+
'conditions': [
1205+
['component=="shared_library" or force_dynamic_crt==1', {
1206+
'RuntimeLibrary': '3', # /MDd
1207+
}, {
1208+
'RuntimeLibrary': '1', # /MTd
1209+
}],
1210+
],
1211+
},
1212+
'VCLinkerTool': {
1213+
'LinkIncremental': '2',
1214+
},
1215+
},
1216+
'variables': {
1217+
'v8_enable_slow_dchecks%': 1,
1218+
},
1219+
'conditions': [
1220+
['OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="netbsd" or \
1221+
OS=="qnx" or OS=="aix"', {
1222+
'cflags!': [
1223+
'-O3',
1224+
'-O2',
1225+
'-O1',
1226+
'-Os',
1227+
],
1228+
'cflags': [
1229+
'-fdata-sections',
1230+
'-ffunction-sections',
1231+
],
1232+
}],
1233+
['OS=="mac"', {
1234+
'xcode_settings': {
1235+
'GCC_OPTIMIZATION_LEVEL': '0', # -O0
1236+
},
1237+
}],
1238+
['v8_enable_slow_dchecks==1', {
1239+
'defines': [
1240+
'ENABLE_SLOW_DCHECKS',
1241+
],
1242+
}],
1243+
],
13211244
}, {
1322-
'inherit_from': ['DebugBase1'],
1245+
'msvs_settings': {
1246+
'VCCLCompilerTool': {
1247+
'Optimization': '2',
1248+
'InlineFunctionExpansion': '2',
1249+
'EnableIntrinsicFunctions': 'true',
1250+
'FavorSizeOrSpeed': '0',
1251+
'StringPooling': 'true',
1252+
'BasicRuntimeChecks': '0',
1253+
'conditions': [
1254+
['component=="shared_library" or force_dynamic_crt==1', {
1255+
'RuntimeLibrary': '3', #/MDd
1256+
}, {
1257+
'RuntimeLibrary': '1', #/MTd
1258+
}],
1259+
],
1260+
},
1261+
'VCLinkerTool': {
1262+
'LinkIncremental': '1',
1263+
'OptimizeReferences': '2',
1264+
'EnableCOMDATFolding': '2',
1265+
},
1266+
},
1267+
'variables': {
1268+
'v8_enable_slow_dchecks%': 0,
1269+
},
1270+
'conditions': [
1271+
['OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="netbsd" or \
1272+
OS=="qnx" or OS=="aix"', {
1273+
'cflags!': [
1274+
'-O0',
1275+
'-O1',
1276+
'-Os',
1277+
],
1278+
'cflags': [
1279+
'-fdata-sections',
1280+
'-ffunction-sections',
1281+
],
1282+
'conditions': [
1283+
# Don't use -O3 with sanitizers.
1284+
['asan==0 and msan==0 and lsan==0 \
1285+
and tsan==0 and ubsan==0 and ubsan_vptr==0', {
1286+
'cflags': ['-O3'],
1287+
'cflags!': ['-O2'],
1288+
}, {
1289+
'cflags': ['-O2'],
1290+
'cflags!': ['-O3'],
1291+
}],
1292+
],
1293+
}],
1294+
['OS=="mac"', {
1295+
'xcode_settings': {
1296+
'GCC_OPTIMIZATION_LEVEL': '3', # -O3
1297+
'GCC_STRICT_ALIASING': 'YES',
1298+
},
1299+
}],
1300+
['v8_enable_slow_dchecks==1', {
1301+
'defines': [
1302+
'ENABLE_SLOW_DCHECKS',
1303+
],
1304+
}],
1305+
],
13231306
}],
13241307
# Temporary refs: https://github.com/nodejs/node/pull/23801
13251308
['v8_enable_handle_zapping==1', {
13261309
'defines': ['ENABLE_HANDLE_ZAPPING',],
13271310
}],
13281311
],
1329-
}, # Debug
1330-
'ReleaseBase': {
1331-
'abstract': 1,
1312+
1313+
}, # DebugBaseCommon
1314+
'Release': {
13321315
'variables': {
13331316
'v8_enable_slow_dchecks%': 0,
13341317
},
1318+
# Temporary refs: https://github.com/nodejs/node/pull/23801
1319+
'defines!': ['ENABLE_HANDLE_ZAPPING',],
13351320
'conditions': [
13361321
['OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="netbsd" \
13371322
or OS=="aix"', {
@@ -1407,29 +1392,6 @@
14071392
}],
14081393
], # conditions
14091394
}, # Release
1410-
'Release': {
1411-
'inherit_from': ['ReleaseBase'],
1412-
# Temporary refs: https://github.com/nodejs/node/pull/23801
1413-
'defines!': ['ENABLE_HANDLE_ZAPPING',],
1414-
}, # Debug
1415-
'conditions': [
1416-
[ 'OS=="win"', {
1417-
# TODO(bradnelson): add a gyp mechanism to make this more graceful.
1418-
'Debug_x64': {
1419-
'inherit_from': ['DebugBaseCommon'],
1420-
'conditions': [
1421-
['v8_optimized_debug==0', {
1422-
'inherit_from': ['DebugBase0'],
1423-
}, {
1424-
'inherit_from': ['DebugBase1'],
1425-
}],
1426-
],
1427-
},
1428-
'Release_x64': {
1429-
'inherit_from': ['ReleaseBase'],
1430-
},
1431-
}],
1432-
],
14331395
}, # configurations
14341396
'msvs_disabled_warnings': [
14351397
4245, # Conversion with signed/unsigned mismatch.

deps/v8/gypfiles/v8.gyp

+4-17
Original file line numberDiff line numberDiff line change
@@ -2539,23 +2539,10 @@
25392539
'_HAS_EXCEPTIONS=0',
25402540
'BUILDING_V8_SHARED=1',
25412541
],
2542-
# This is defined trough `configurations` for GYP+ninja compatibility
2543-
'configurations': {
2544-
'Debug': {
2545-
'msvs_settings': {
2546-
'VCCLCompilerTool': {
2547-
'RuntimeTypeInfo': 'true',
2548-
'ExceptionHandling': 1,
2549-
},
2550-
}
2551-
},
2552-
'Release': {
2553-
'msvs_settings': {
2554-
'VCCLCompilerTool': {
2555-
'RuntimeTypeInfo': 'true',
2556-
'ExceptionHandling': 1,
2557-
},
2558-
}
2542+
'msvs_settings': {
2543+
'VCCLCompilerTool': {
2544+
'RuntimeTypeInfo': 'true',
2545+
'ExceptionHandling': 1,
25592546
},
25602547
},
25612548
'sources': [

0 commit comments

Comments
 (0)