Skip to content

Commit 3591a12

Browse files
committed
Allow disabling truncation for long config lines
1 parent 871b595 commit 3591a12

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

src/bootstrap/configure.py

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@ def v(*args):
4545
o("llvm-link-shared", "llvm.link-shared", "prefer shared linking to LLVM (llvm-config --link-shared)")
4646
o("rpath", "rust.rpath", "build rpaths into rustc itself")
4747
o("codegen-tests", "rust.codegen-tests", "run the tests/codegen tests")
48-
o("option-checking", None, "complain about unrecognized options in this configure script")
4948
o("ninja", "llvm.ninja", "build LLVM using the Ninja generator (for MSVC, requires building in the correct environment)")
5049
o("locked-deps", "build.locked-deps", "force Cargo.lock to be up to date")
5150
o("vendor", "build.vendor", "enable usage of vendored Rust crates")
@@ -170,6 +169,9 @@ def v(*args):
170169
v("host", None, "List of GNUs ./configure syntax LLVM host triples")
171170
v("target", None, "List of GNUs ./configure syntax LLVM target triples")
172171

172+
# Options specific to this configure script
173+
o("option-checking", None, "complain about unrecognized options in this configure script")
174+
o("verbose-configure", None, "don't truncate options when printing them in this configure script")
173175
v("set", None, "set arbitrary key/value pairs in TOML configuration")
174176

175177

@@ -211,6 +213,8 @@ def is_value_list(key):
211213
print('be passed with `--disable-foo` to forcibly disable the option')
212214
sys.exit(0)
213215

216+
VERBOSE = False
217+
214218
# Parse all command line arguments into one of these three lists, handling
215219
# boolean and value-based options separately
216220
def parse_args(args):
@@ -271,6 +275,9 @@ def parse_args(args):
271275
if len(need_value_args) > 0:
272276
err("Option '{0}' needs a value ({0}=val)".format(need_value_args[0]))
273277

278+
global VERBOSE
279+
VERBOSE = 'verbose-configure' in known_args
280+
274281
config = {}
275282

276283
set('build.configure-args', sys.argv[1:], config)
@@ -290,7 +297,7 @@ def set(key, value, config):
290297
value = [v for v in value if v]
291298

292299
s = "{:20} := {}".format(key, value)
293-
if len(s) < 70:
300+
if len(s) < 70 or VERBOSE:
294301
p(s)
295302
else:
296303
p(s[:70] + " ...")
@@ -371,7 +378,7 @@ def apply_args(known_args, option_checking, config):
371378
set('rust.lld', True, config)
372379
set('rust.llvm-tools', True, config)
373380
set('build.extended', True, config)
374-
elif option.name == 'option-checking':
381+
elif option.name in ['option-checking', 'verbose-configure']:
375382
# this was handled above
376383
pass
377384
elif option.name == 'dist-compression-formats':

0 commit comments

Comments
 (0)