Skip to content
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

configure's config.mk ignores some fields during parsing #42255

Closed
Mark-Simulacrum opened this issue May 27, 2017 · 5 comments
Closed

configure's config.mk ignores some fields during parsing #42255

Mark-Simulacrum opened this issue May 27, 2017 · 5 comments
Labels
C-enhancement Category: An issue proposing an enhancement or a PR with one. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue.

Comments

@Mark-Simulacrum
Copy link
Member

Mark-Simulacrum commented May 27, 2017

grepping for CFG_ in config.mk after running ./configure yields the following, after removing those that rustbuild currently looks for. The rest should either be removed from configure itself (since creating them is pointless) or parsed into rustbuild.

cc @rust-lang/infra

CFG_LOCALSTATEDIR
CFG_DATADIR
CFG_INFODIR
CFG_ANDROID_CROSS_PATH
CFG_NACL_CROSS_PATH
CFG_EXTRA_FILENAME
CFG_CURL
CFG_DISABLE_VALGRIND_RPASS
CFG_SRC_DIR_RELATIVE
CFG_BUILD_DIR
CFG_OSTYPE
CFG_CPUTYPE
CFG_NACL_CROSS_PATH
CFG_USING_LIBCPP
@Mark-Simulacrum Mark-Simulacrum added T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue. labels May 27, 2017
@cuviper
Copy link
Member

cuviper commented May 31, 2017

yields the following, after removing those that rustbuild currently looks for.

A lot of those remaining in your list are parsed here.

@Mark-Simulacrum
Copy link
Member Author

Ah.. yeah. I'm not sure what went wrong; I've updated the list in the original comment. I suspect I started deleting things that I should've kept and keeping things that should've been deleted.

The current list was produced with this command:

for l in `rg CFG_ config.mk | awk '{ print $1 }'`; do rg -q $l src/bootstrap/ || echo "$l" ; done

@Mark-Simulacrum
Copy link
Member Author

Nominating this for discussion at the infra meeting -- I want to decide on a direction here. Do we need a deprecation cycle for options to configure?

@cuviper
Copy link
Member

cuviper commented Jun 21, 2017

For Fedora, I use --disable-option-checking because the rpm %configure macro sets a lot of options that aren't known here. So at least from that perspective, changing some options from "known but useless" to "unknown and ignored" doesn't make any difference. :)

@aidanhs
Copy link
Member

aidanhs commented Jun 21, 2017

There are others like --dist-host-only which aren't on your list but (last time I checked) had their meaning lost in a refactoring while the makefiles still existed.

@Mark-Simulacrum Mark-Simulacrum added the C-enhancement Category: An issue proposing an enhancement or a PR with one. label Jul 27, 2017
bors added a commit that referenced this issue Aug 28, 2017
…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
bors added a commit that referenced this issue Aug 28, 2017
…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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-enhancement Category: An issue proposing an enhancement or a PR with one. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

3 participants