Skip to content

Commit

Permalink
Auto merge of #44107 - alexcrichton:no-shell-configure, r=Mark-Simula…
Browse files Browse the repository at this point in the history
…crum

rustbuild: Rewrite the configure script in Python

This commit rewrites our ancient `./configure` script from shell into Python.
The impetus for this change is to remove `config.mk` which is just a vestige of
the old makefile build system at this point. Instead all configuration is now
solely done through `config.toml`.

The python script allows us to more flexibly program (aka we can use loops
easily) and create a `config.toml` which is based off `config.toml.example`.
This way we can preserve comments and munge various values as we see fit.

It is intended that the configure script here is a drop-in replacement for the
previous configure script, no functional change is intended. Also note that the
rationale for this is also because our build system requires Python, so having a
python script a bit earlier shouldn't cause too many problems.

Closes #40730
Closes #43295
Closes #42255
Closes #38058
Closes #32176
  • Loading branch information
bors committed Aug 28, 2017
2 parents e266888 + a9b0a7b commit a0c3bd2
Show file tree
Hide file tree
Showing 8 changed files with 653 additions and 1,217 deletions.
31 changes: 31 additions & 0 deletions config.toml.example
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,10 @@
# controlled by rustbuild's -j parameter.
#link-jobs = 0

# When invoking `llvm-config` this configures whether the `--shared` argument is
# passed to prefer linking to shared libraries.
#link-shared = false

# =============================================================================
# General build configuration options
# =============================================================================
Expand Down Expand Up @@ -166,6 +170,15 @@
# to +10 on Unix platforms, and by using a "low priority" job object on Windows.
#low-priority = false

# Arguments passed to the `./configure` script, used during distcheck. You
# probably won't fill this in but rather it's filled in by the `./configure`
# script.
#configure-args = []

# Indicates that a local rebuild is ocurring instead of a full bootstrap,
# essentially skipping stage0 as the local compiler is recompiling itself again.
#local-rebuild = false

# =============================================================================
# General install configuration options
# =============================================================================
Expand Down Expand Up @@ -195,6 +208,13 @@
# =============================================================================
[rust]

# Indicates that the build should be optimized for debugging Rust. Note that
# this is typically not what you want as it takes an incredibly large amount of
# time to have a debug-mode rustc compile any code (notably libstd). If this
# value is set to `true` it will affect a number of configuration options below
# as well, if unconfigured.
#debug = false

# Whether or not to optimize the compiler and standard library
# Note: the slowness of the non optimized compiler compiling itself usually
# outweighs the time gains in not doing optimizations, therefore a
Expand Down Expand Up @@ -249,6 +269,10 @@
# desired in distributions, for example.
#rpath = true

# Suppresses extraneous output from tests to ensure the output of the test
# harness is relatively clean.
#quiet-tests = false

# Flag indicating whether tests are compiled with optimizations (the -O flag) or
# with debuginfo (the -g flag)
#optimize-tests = true
Expand All @@ -261,6 +285,9 @@
# Flag indicating whether git info will be retrieved from .git automatically.
#ignore-git = false

# When creating source tarballs whether or not to create a source tarball.
#dist-src = false

# =============================================================================
# Options for specific targets
#
Expand Down Expand Up @@ -304,6 +331,10 @@
# linked binaries
#musl-root = "..."

# Used in testing for configuring where the QEMU images are located, you
# probably don't want to use this.
#qemu-rootfs = "..."

# =============================================================================
# Distribution options
#
Expand Down
Loading

0 comments on commit a0c3bd2

Please sign in to comment.