Skip to content

Print the full arguments passed to ./configure in CI #112176

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 4, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 10 additions & 3 deletions src/bootstrap/configure.py
Original file line number Diff line number Diff line change
@@ -45,7 +45,6 @@ def v(*args):
o("llvm-link-shared", "llvm.link-shared", "prefer shared linking to LLVM (llvm-config --link-shared)")
o("rpath", "rust.rpath", "build rpaths into rustc itself")
o("codegen-tests", "rust.codegen-tests", "run the tests/codegen tests")
o("option-checking", None, "complain about unrecognized options in this configure script")
o("ninja", "llvm.ninja", "build LLVM using the Ninja generator (for MSVC, requires building in the correct environment)")
o("locked-deps", "build.locked-deps", "force Cargo.lock to be up to date")
o("vendor", "build.vendor", "enable usage of vendored Rust crates")
@@ -170,6 +169,9 @@ def v(*args):
v("host", None, "List of GNUs ./configure syntax LLVM host triples")
v("target", None, "List of GNUs ./configure syntax LLVM target triples")

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


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

VERBOSE = False

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

global VERBOSE
VERBOSE = 'verbose-configure' in known_args

config = {}

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

s = "{:20} := {}".format(key, value)
if len(s) < 70:
if len(s) < 70 or VERBOSE:
p(s)
else:
p(s[:70] + " ...")
@@ -371,7 +378,7 @@ def apply_args(known_args, option_checking, config):
set('rust.lld', True, config)
set('rust.llvm-tools', True, config)
set('build.extended', True, config)
elif option.name == 'option-checking':
elif option.name in ['option-checking', 'verbose-configure']:
# this was handled above
pass
elif option.name == 'dist-compression-formats':
1 change: 1 addition & 0 deletions src/ci/run.sh
Original file line number Diff line number Diff line change
@@ -53,6 +53,7 @@ if ! isCI || isCiBranch auto || isCiBranch beta || isCiBranch try || isCiBranch
HAS_METRICS=1
fi

RUST_CONFIGURE_ARGS="$RUST_CONFIGURE_ARGS --enable-verbose-configure"
RUST_CONFIGURE_ARGS="$RUST_CONFIGURE_ARGS --enable-sccache"
RUST_CONFIGURE_ARGS="$RUST_CONFIGURE_ARGS --disable-manage-submodules"
RUST_CONFIGURE_ARGS="$RUST_CONFIGURE_ARGS --enable-locked-deps"