about summary refs log tree commit diff
path: root/src/bootstrap/bootstrap.py
diff options
context:
space:
mode:
authorclubby789 <jamie@hill-daniel.co.uk>2023-06-26 20:17:08 +0000
committerclubby789 <jamie@hill-daniel.co.uk>2023-06-26 22:54:47 +0000
commit85c4ea0138fcca2e8cf4515a063cd3b762d64aec (patch)
treea5c9843279acbf237b25b5bdeecda579cc833aec /src/bootstrap/bootstrap.py
parent6f8c27ae89dfd32895419d7ef5b89844bcad1bcd (diff)
downloadrust-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.py8
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