diff options
| author | clubby789 <jamie@hill-daniel.co.uk> | 2023-06-26 20:17:08 +0000 |
|---|---|---|
| committer | clubby789 <jamie@hill-daniel.co.uk> | 2023-06-26 22:54:47 +0000 |
| commit | 85c4ea0138fcca2e8cf4515a063cd3b762d64aec (patch) | |
| tree | a5c9843279acbf237b25b5bdeecda579cc833aec /src/bootstrap/bootstrap.py | |
| parent | 6f8c27ae89dfd32895419d7ef5b89844bcad1bcd (diff) | |
| download | rust-85c4ea0138fcca2e8cf4515a063cd3b762d64aec.tar.gz rust-85c4ea0138fcca2e8cf4515a063cd3b762d64aec.zip | |
bootstrap: rename 'user' profile to 'dist'
Diffstat (limited to 'src/bootstrap/bootstrap.py')
| -rw-r--r-- | src/bootstrap/bootstrap.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/bootstrap/bootstrap.py b/src/bootstrap/bootstrap.py index 5351c80eab9..149350e62a0 100644 --- a/src/bootstrap/bootstrap.py +++ b/src/bootstrap/bootstrap.py @@ -1052,7 +1052,13 @@ def bootstrap(args): profile = RustBuild.get_toml_static(config_toml, 'profile') if profile is not None: - include_file = 'config.{}.toml'.format(profile) + # Allows creating alias for profile names, allowing + # profiles to be renamed while maintaining back compatibility + # Keep in sync with `profile_aliases` in config.rs + profile_aliases = { + "user": "dist" + } + include_file = 'config.{}.toml'.format(profile_aliases.get(profile) or profile) include_dir = os.path.join(rust_root, 'src', 'bootstrap', 'defaults') include_path = os.path.join(include_dir, include_file) # HACK: This works because `self.get_toml()` returns the first match it finds for a |
