559
559
default = False ,
560
560
help = 'build V8 using GN instead of gyp' )
561
561
562
- parser .add_option ('--verbose' ,
563
- action = 'store_true' ,
564
- dest = 'verbose' ,
565
- default = False ,
566
- help = 'get more output from this script' )
567
-
568
562
# Create compile_commands.json in out/Debug and out/Release.
569
563
parser .add_option ('-C' ,
570
564
action = 'store_true' ,
@@ -593,14 +587,6 @@ def warn(msg):
593
587
# track if warnings occurred
594
588
warn .warned = False
595
589
596
- def print_verbose (x ):
597
- if not options .verbose :
598
- return
599
- if type (x ) is str :
600
- print x
601
- else :
602
- pprint .pprint (x , indent = 2 )
603
-
604
590
def b (value ):
605
591
"""Returns the string 'true' if value is truthy, 'false' otherwise."""
606
592
if value :
@@ -1213,7 +1199,7 @@ def without_ssl_error(option):
1213
1199
def configure_static (o ):
1214
1200
if options .fully_static or options .partly_static :
1215
1201
if flavor == 'mac' :
1216
- warn ("Generation of static executable will not work on OSX "
1202
+ print ("Generation of static executable will not work on OSX "
1217
1203
"when using the default compilation environment" )
1218
1204
return
1219
1205
@@ -1226,9 +1212,9 @@ def configure_static(o):
1226
1212
1227
1213
1228
1214
def write (filename , data ):
1229
- print_verbose ('creating %s' % filename )
1230
- with open (filename , 'w+' ) as f :
1231
- f .write (data )
1215
+ print ('creating %s' % filename )
1216
+ f = open (filename , 'w+' )
1217
+ f .write (data )
1232
1218
1233
1219
do_not_edit = '# Do not edit. Generated by the configure script.\n '
1234
1220
@@ -1246,7 +1232,7 @@ def glob_to_var(dir_base, dir_sub, patch_dir):
1246
1232
patchfile = '%s/%s/%s' % (dir_base , patch_dir , file )
1247
1233
if os .path .isfile (patchfile ):
1248
1234
srcfile = '%s/%s' % (patch_dir , file )
1249
- warn ('Using floating patch "%s" from "%s" ' % ( patchfile , dir_base ) )
1235
+ print ('Using version-specific floating patch %s ' % patchfile )
1250
1236
list .append (srcfile )
1251
1237
break
1252
1238
return list
@@ -1280,8 +1266,8 @@ def icu_download(path):
1280
1266
if (md5 == gotmd5 ):
1281
1267
return targetfile
1282
1268
else :
1283
- error ('Expected: %s *MISMATCH*' % md5 )
1284
- error ('\n ** Corrupted ZIP? Delete %s to retry download.\n ' % targetfile )
1269
+ print ('Expected: %s *MISMATCH*' % md5 )
1270
+ print ('\n ** Corrupted ZIP? Delete %s to retry download.\n ' % targetfile )
1285
1271
return None
1286
1272
icu_config = {
1287
1273
'variables' : {}
@@ -1382,7 +1368,7 @@ def write_config(data, name):
1382
1368
# --with-icu-source processing
1383
1369
# now, check that they didn't pass --with-icu-source=deps/icu
1384
1370
elif with_icu_source and os .path .abspath (icu_full_path ) == os .path .abspath (with_icu_source ):
1385
- warn ('Ignoring redundant --with-icu-source=%s' % with_icu_source )
1371
+ print ('Ignoring redundant --with-icu-source=%s' % with_icu_source )
1386
1372
with_icu_source = None
1387
1373
# if with_icu_source is still set, try to use it.
1388
1374
if with_icu_source :
@@ -1425,7 +1411,7 @@ def write_config(data, name):
1425
1411
# ICU source dir relative to tools/icu (for .gyp file)
1426
1412
o ['variables' ]['icu_path' ] = icu_full_path
1427
1413
if not os .path .isdir (icu_full_path ):
1428
- warn ('* ECMA-402 (Intl) support didn\' t find ICU in %s..' % icu_full_path )
1414
+ print ('* ECMA-402 (Intl) support didn\' t find ICU in %s..' % icu_full_path )
1429
1415
# can we download (or find) a zipfile?
1430
1416
localzip = icu_download (icu_full_path )
1431
1417
if localzip :
@@ -1434,7 +1420,7 @@ def write_config(data, name):
1434
1420
error ('''Cannot build Intl without ICU in %s.
1435
1421
Fix, or disable with "--with-intl=none"''' % icu_full_path )
1436
1422
else :
1437
- print_verbose ('* Using ICU in %s' % icu_full_path )
1423
+ print ('* Using ICU in %s' % icu_full_path )
1438
1424
# Now, what version of ICU is it? We just need the "major", such as 54.
1439
1425
# uvernum.h contains it as a #define.
1440
1426
uvernum_h = os .path .join (icu_full_path , 'source/common/unicode/uvernum.h' )
@@ -1597,7 +1583,7 @@ def make_bin_override():
1597
1583
if make_global_settings :
1598
1584
output ['make_global_settings' ] = make_global_settings
1599
1585
1600
- print_verbose (output )
1586
+ pprint . pprint (output , indent = 2 )
1601
1587
1602
1588
write ('config.gypi' , do_not_edit +
1603
1589
pprint .pformat (output , indent = 2 ) + '\n ' )
@@ -1636,11 +1622,9 @@ def make_bin_override():
1636
1622
if options .compile_commands_json :
1637
1623
gyp_args += ['-f' , 'compile_commands_json' ]
1638
1624
1639
- # pass the leftover positional arguments to GYP
1640
1625
gyp_args += args
1641
1626
1642
- if warn .warned and not options . verbose :
1627
+ if warn .warned :
1643
1628
warn ('warnings were emitted in the configure phase' )
1644
1629
1645
- print_verbose ("running: \n " + " " .join (['python' , 'tools/gyp_node.py' ] + gyp_args ))
1646
1630
run_gyp (gyp_args )
0 commit comments