about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2023-09-18 13:02:18 +0200
committerGitHub <noreply@github.com>2023-09-18 13:02:18 +0200
commitc843ac2ad9368f71f86ac8aad4319e60ae989b3d (patch)
tree6a90ad9e8f5de50deab367a98c6c5658af757cc0 /src
parent5a8e8e5577f07d264f78aa9eec2d92136f1280d6 (diff)
parent122d1cc8c332b4dd176e1475a063688e73d95168 (diff)
downloadrust-c843ac2ad9368f71f86ac8aad4319e60ae989b3d.tar.gz
rust-c843ac2ad9368f71f86ac8aad4319e60ae989b3d.zip
Rollup merge of #115811 - bzEq:make-aix-known, r=Mark-Simulacrum
Make AIX known by bootstrap

Use `x.py` to build rustc on AIX directly is failing
```
unknown OS type: AIX
Build completed unsuccessfully in 0:00:00
```
If kernel is `AIX`, we should return default triple `powerpc64-ibm-aix` for current rustc.
Diffstat (limited to 'src')
-rw-r--r--src/bootstrap/bootstrap.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/bootstrap/bootstrap.py b/src/bootstrap/bootstrap.py
index e4c76226454..a9aa7524e8b 100644
--- a/src/bootstrap/bootstrap.py
+++ b/src/bootstrap/bootstrap.py
@@ -312,6 +312,14 @@ def default_build_triple(verbose):
         # non-standard string (e.g. gnuwin32 tools returns `windows32`). In
         # these cases, fall back to using sys.platform.
         return 'x86_64-pc-windows-msvc'
+    elif kernel == 'AIX':
+        # `uname -m` returns the machine ID rather than machine hardware on AIX,
+        # so we are unable to use cputype to form triple. AIX 7.2 and
+        # above supports 32-bit and 64-bit mode simultaneously and `uname -p`
+        # returns `powerpc`, however we only supports `powerpc64-ibm-aix` in
+        # rust on AIX. For above reasons, kerneltype_mapper and cputype_mapper
+        # are not used to infer AIX's triple.
+        return 'powerpc64-ibm-aix'
     else:
         err = "unknown OS type: {}".format(kernel)
         sys.exit(err)