Auto merge of #39770 - alexcrichton:configure-clean, r=brson
Delete more swaths of the configure script This PR deletes more swaths of the `./configure` script which are either no longer necessary or already available in rustbuild (where an implementation is preferred)
This commit is contained in:
commit
d9cf601ae8
3 changed files with 26 additions and 351 deletions
|
|
@ -296,8 +296,10 @@ class RustBuild(object):
|
|||
|
||||
def get_mk(self, key):
|
||||
for line in iter(self.config_mk.splitlines()):
|
||||
if line.startswith(key):
|
||||
return line[line.find(':=') + 2:].strip()
|
||||
if line.startswith(key + ' '):
|
||||
var = line[line.find(':=') + 2:].strip()
|
||||
if var != '':
|
||||
return var
|
||||
return None
|
||||
|
||||
def cargo(self):
|
||||
|
|
@ -438,6 +440,8 @@ class RustBuild(object):
|
|||
sys.exit(err)
|
||||
elif ostype == 'Darwin':
|
||||
ostype = 'apple-darwin'
|
||||
elif ostype == 'Haiku':
|
||||
ostype = 'unknown-haiku'
|
||||
elif ostype.startswith('MINGW'):
|
||||
# msys' `uname` does not print gcc configuration, but prints msys
|
||||
# configuration. so we cannot believe `uname -m`:
|
||||
|
|
@ -465,9 +469,12 @@ class RustBuild(object):
|
|||
cputype = 'i686'
|
||||
elif cputype in {'xscale', 'arm'}:
|
||||
cputype = 'arm'
|
||||
elif cputype in {'armv7l', 'armv8l'}:
|
||||
elif cputype in {'armv6l', 'armv7l', 'armv8l'}:
|
||||
cputype = 'arm'
|
||||
ostype += 'eabihf'
|
||||
elif cputype == 'armv7l':
|
||||
cputype = 'armv7'
|
||||
ostype += 'eabihf'
|
||||
elif cputype == 'aarch64':
|
||||
cputype = 'aarch64'
|
||||
elif cputype == 'arm64':
|
||||
|
|
@ -488,12 +495,20 @@ class RustBuild(object):
|
|||
raise ValueError('unknown byteorder: ' + sys.byteorder)
|
||||
# only the n64 ABI is supported, indicate it
|
||||
ostype += 'abi64'
|
||||
elif cputype in {'powerpc', 'ppc', 'ppc64'}:
|
||||
elif cputype in {'powerpc', 'ppc'}:
|
||||
cputype = 'powerpc'
|
||||
elif cputype in {'powerpc64', 'ppc64'}:
|
||||
cputype = 'powerpc64'
|
||||
elif cputype in {'powerpc64le', 'ppc64le'}:
|
||||
cputype = 'powerpc64le'
|
||||
elif cputype == 'sparcv9':
|
||||
pass
|
||||
elif cputype in {'amd64', 'x86_64', 'x86-64', 'x64'}:
|
||||
cputype = 'x86_64'
|
||||
elif cputype == 's390x':
|
||||
cputype = 's390x'
|
||||
elif cputype == 'BePC':
|
||||
cputype = 'i686'
|
||||
else:
|
||||
err = "unknown cpu type: " + cputype
|
||||
if self.verbose:
|
||||
|
|
|
|||
|
|
@ -463,14 +463,13 @@ impl Config {
|
|||
}
|
||||
|
||||
match key {
|
||||
"CFG_BUILD" => self.build = value.to_string(),
|
||||
"CFG_HOST" => {
|
||||
self.host = value.split(" ").map(|s| s.to_string())
|
||||
.collect();
|
||||
"CFG_BUILD" if value.len() > 0 => self.build = value.to_string(),
|
||||
"CFG_HOST" if value.len() > 0 => {
|
||||
self.host.extend(value.split(" ").map(|s| s.to_string()));
|
||||
|
||||
}
|
||||
"CFG_TARGET" => {
|
||||
self.target = value.split(" ").map(|s| s.to_string())
|
||||
.collect();
|
||||
"CFG_TARGET" if value.len() > 0 => {
|
||||
self.target.extend(value.split(" ").map(|s| s.to_string()));
|
||||
}
|
||||
"CFG_MUSL_ROOT" if value.len() > 0 => {
|
||||
self.musl_root = Some(parse_configure_path(value));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue