Skip to content

Commit d16486b

Browse files
committed
Revert "build: add --verbose to ./configure"
This reverts commit 62a3f9b. The change should have been semver-major. PR-URL: #23313
1 parent 7c0d6ac commit d16486b

File tree

1 file changed

+12
-28
lines changed

1 file changed

+12
-28
lines changed

configure.py

+12-28
Original file line numberDiff line numberDiff line change
@@ -559,12 +559,6 @@
559559
default=False,
560560
help='build V8 using GN instead of gyp')
561561

562-
parser.add_option('--verbose',
563-
action='store_true',
564-
dest='verbose',
565-
default=False,
566-
help='get more output from this script')
567-
568562
# Create compile_commands.json in out/Debug and out/Release.
569563
parser.add_option('-C',
570564
action='store_true',
@@ -593,14 +587,6 @@ def warn(msg):
593587
# track if warnings occurred
594588
warn.warned = False
595589

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-
604590
def b(value):
605591
"""Returns the string 'true' if value is truthy, 'false' otherwise."""
606592
if value:
@@ -1213,7 +1199,7 @@ def without_ssl_error(option):
12131199
def configure_static(o):
12141200
if options.fully_static or options.partly_static:
12151201
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 "
12171203
"when using the default compilation environment")
12181204
return
12191205

@@ -1226,9 +1212,9 @@ def configure_static(o):
12261212

12271213

12281214
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)
12321218

12331219
do_not_edit = '# Do not edit. Generated by the configure script.\n'
12341220

@@ -1246,7 +1232,7 @@ def glob_to_var(dir_base, dir_sub, patch_dir):
12461232
patchfile = '%s/%s/%s' % (dir_base, patch_dir, file)
12471233
if os.path.isfile(patchfile):
12481234
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)
12501236
list.append(srcfile)
12511237
break
12521238
return list
@@ -1280,8 +1266,8 @@ def icu_download(path):
12801266
if (md5 == gotmd5):
12811267
return targetfile
12821268
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)
12851271
return None
12861272
icu_config = {
12871273
'variables': {}
@@ -1382,7 +1368,7 @@ def write_config(data, name):
13821368
# --with-icu-source processing
13831369
# now, check that they didn't pass --with-icu-source=deps/icu
13841370
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)
13861372
with_icu_source = None
13871373
# if with_icu_source is still set, try to use it.
13881374
if with_icu_source:
@@ -1425,7 +1411,7 @@ def write_config(data, name):
14251411
# ICU source dir relative to tools/icu (for .gyp file)
14261412
o['variables']['icu_path'] = icu_full_path
14271413
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)
14291415
# can we download (or find) a zipfile?
14301416
localzip = icu_download(icu_full_path)
14311417
if localzip:
@@ -1434,7 +1420,7 @@ def write_config(data, name):
14341420
error('''Cannot build Intl without ICU in %s.
14351421
Fix, or disable with "--with-intl=none"''' % icu_full_path)
14361422
else:
1437-
print_verbose('* Using ICU in %s' % icu_full_path)
1423+
print('* Using ICU in %s' % icu_full_path)
14381424
# Now, what version of ICU is it? We just need the "major", such as 54.
14391425
# uvernum.h contains it as a #define.
14401426
uvernum_h = os.path.join(icu_full_path, 'source/common/unicode/uvernum.h')
@@ -1597,7 +1583,7 @@ def make_bin_override():
15971583
if make_global_settings:
15981584
output['make_global_settings'] = make_global_settings
15991585

1600-
print_verbose(output)
1586+
pprint.pprint(output, indent=2)
16011587

16021588
write('config.gypi', do_not_edit +
16031589
pprint.pformat(output, indent=2) + '\n')
@@ -1636,11 +1622,9 @@ def make_bin_override():
16361622
if options.compile_commands_json:
16371623
gyp_args += ['-f', 'compile_commands_json']
16381624

1639-
# pass the leftover positional arguments to GYP
16401625
gyp_args += args
16411626

1642-
if warn.warned and not options.verbose:
1627+
if warn.warned:
16431628
warn('warnings were emitted in the configure phase')
16441629

1645-
print_verbose("running: \n " + " ".join(['python', 'tools/gyp_node.py'] + gyp_args))
16461630
run_gyp(gyp_args)

0 commit comments

Comments
 (0)