Skip to content

Commit c843ac2

Browse files
authored
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.
2 parents 5a8e8e5 + 122d1cc commit c843ac2

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/bootstrap/bootstrap.py

+8
Original file line numberDiff line numberDiff line change
@@ -312,6 +312,14 @@ def default_build_triple(verbose):
312312
# non-standard string (e.g. gnuwin32 tools returns `windows32`). In
313313
# these cases, fall back to using sys.platform.
314314
return 'x86_64-pc-windows-msvc'
315+
elif kernel == 'AIX':
316+
# `uname -m` returns the machine ID rather than machine hardware on AIX,
317+
# so we are unable to use cputype to form triple. AIX 7.2 and
318+
# above supports 32-bit and 64-bit mode simultaneously and `uname -p`
319+
# returns `powerpc`, however we only supports `powerpc64-ibm-aix` in
320+
# rust on AIX. For above reasons, kerneltype_mapper and cputype_mapper
321+
# are not used to infer AIX's triple.
322+
return 'powerpc64-ibm-aix'
315323
else:
316324
err = "unknown OS type: {}".format(kernel)
317325
sys.exit(err)

0 commit comments

Comments
 (0)