From 6985d3502547c6fe2922debbf0d6db0fde26de2e Mon Sep 17 00:00:00 2001 From: Michael Baumgartner Date: Sat, 27 Jun 2026 15:58:24 +0200 Subject: [PATCH 01/29] Ignore EditorConfig violations in external repos --- .ecformat_ignore | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 .ecformat_ignore diff --git a/.ecformat_ignore b/.ecformat_ignore new file mode 100644 index 0000000000000..b211d4d8bf9b9 --- /dev/null +++ b/.ecformat_ignore @@ -0,0 +1,27 @@ +# Ignore external repositories as checking for EditorConfig violations there +# is their responsibility and out of scope for here. See also: +# https://github.com/rust-lang/rustc-dev-guide/blob/main/src/external-repos.md +# Subtrees +src/tools/clippy +src/tools/miri +library/portable-simd +src/tools/rustfmt +src/tools/rust-analyzer +compiler/rustc_codegen_cranelift +compiler/rustc_codegen_gcc +src/doc/rustc-dev-guide +library/compiler-builtins +library/stdarch +# Submodules +src/doc/nomicon +src/tools/cargo +src/doc/reference +src/doc/book +src/doc/rust-by-example +src/doc/edition-guide +src/llvm-project +src/doc/embedded-book +library/backtrace +src/tools/rustc-perf +src/tools/enzyme +src/gcc From 671da61976b8f77529ed6169b393b0a09a09968f Mon Sep 17 00:00:00 2001 From: Michael Baumgartner Date: Sat, 27 Jun 2026 16:01:03 +0200 Subject: [PATCH 02/29] Ignore EditorConfig violations in binary files --- .ecformat_ignore | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.ecformat_ignore b/.ecformat_ignore index b211d4d8bf9b9..04a224a965751 100644 --- a/.ecformat_ignore +++ b/.ecformat_ignore @@ -25,3 +25,10 @@ library/backtrace src/tools/rustc-perf src/tools/enzyme src/gcc + +# Ignore binary files +src/etc/installer/gfx/* +*.png +*.ico +*.woff +*.woff2 From 57b945ae3981d89028924e8fc9fe24fd83a3d814 Mon Sep 17 00:00:00 2001 From: Michael Baumgartner Date: Sat, 27 Jun 2026 16:27:27 +0200 Subject: [PATCH 03/29] Handle indentation in Markdown files --- .ecformat_ignore | 4 ++++ .editorconfig | 6 ++++++ 2 files changed, 10 insertions(+) diff --git a/.ecformat_ignore b/.ecformat_ignore index 04a224a965751..a6b3945d00979 100644 --- a/.ecformat_ignore +++ b/.ecformat_ignore @@ -32,3 +32,7 @@ src/etc/installer/gfx/* *.ico *.woff *.woff2 + +# Some special cases cannot be handled: +# Markdown file (space indentation) with 'make' code (tab indentation) +src/doc/rustc/src/jobserver.md diff --git a/.editorconfig b/.editorconfig index d2d788d2172f7..37edf15f3767c 100644 --- a/.editorconfig +++ b/.editorconfig @@ -36,6 +36,12 @@ max_line_length = 100 # double whitespace at end of line # denotes a line break in Markdown trim_trailing_whitespace = false +# Markdown has heavily context specific indentations. +# For example, the indentation in lists depend on the length of the list marker +# (such as '- ' or '100. '), at least in the GitHub Markdown flavor: +# https://docs.github.com/en/get-started/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax#nested-lists +# Therefore, pressing tab should insert a single space to encourage situative accurate indentations. +indent_size = 1 [*.yml] indent_size = 2 From 9a092e061454671afc44249b8c04b662fada48b9 Mon Sep 17 00:00:00 2001 From: Michael Baumgartner Date: Sat, 27 Jun 2026 17:52:46 +0200 Subject: [PATCH 04/29] Handle charset and end_of_line in test files --- .ecformat_ignore | 17 +++++++++++++++++ .editorconfig | 10 ++++++++++ 2 files changed, 27 insertions(+) diff --git a/.ecformat_ignore b/.ecformat_ignore index a6b3945d00979..b3f0dc07cbe21 100644 --- a/.ecformat_ignore +++ b/.ecformat_ignore @@ -32,7 +32,24 @@ src/etc/installer/gfx/* *.ico *.woff *.woff2 +tests/ui/macros/not-utf8.bin # Some special cases cannot be handled: # Markdown file (space indentation) with 'make' code (tab indentation) src/doc/rustc/src/jobserver.md +# Test file with different line endings and indentations +tests/pretty/block-comment-wchar.rs +# Test file for normalize some CRFL line endings to LF +tests/ui/asm/normalize-offsets-for-crlf.s +# Test file with CR in frontmatter +tests/ui/frontmatter/content-cr.rs +# Test file which uses CRLF line endings but only inside strings +tests/ui/lexer/crlf-in-byte-string-literal.rs +# Test files with CR line ending but only in some doc comments +tests/ui/lexer/lex-bare-cr-* +tests/ui/parser/several-carriage-returns-in-doc-comment.rs +# Test file with tab indentation and one CR line ending +tests/ui/parser/bad-char-literals.rs +# Test file with CR line ending inside string +tests/ui/parser/raw/raw-byte-string-literals.rs +tests/ui/parser/trailing-carriage-return-in-string.rs diff --git a/.editorconfig b/.editorconfig index 37edf15f3767c..c8837a2385982 100644 --- a/.editorconfig +++ b/.editorconfig @@ -24,6 +24,16 @@ trim_trailing_whitespace = true # these specific source files need to have trailing whitespace. [tests/ui/{frontmatter/frontmatter-whitespace-3.rs,parser/shebang/shebang-space.rs}] trim_trailing_whitespace = false +# these specific files have an UTF-8 BOM to test with that charset +[tests/ui/codemap_tests/utf8-bom.rs] +charset = utf-8-bom +# these specific files have CRLF line endings to test on them +[tests/{rustdoc-ui/intra-doc/warning-crlf.rs,ui/{frontmatter/frontmatter-crlf.rs,lexer/lexer-crlf-*.rs}}] +end_of_line = crlf +# these specific files have an UTF-8 BOM and CRLF line endings to test on these +[tests/ui/{include-macros/data.bin,json/json-bom-plus-crlf*.rs}] +charset = utf-8-bom +end_of_line = crlf [src/llvm-project] indent_style = unset From 1447b076c52ff33882197c3134af375607b103b0 Mon Sep 17 00:00:00 2001 From: Michael Baumgartner Date: Sat, 27 Jun 2026 17:56:13 +0200 Subject: [PATCH 05/29] Align EditorConfig lock formats As Cargo.lock and yarn.lock are normally created automatically, we do not want using a different format when editing it manually. --- .editorconfig | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.editorconfig b/.editorconfig index c8837a2385982..fc7db3f32cf01 100644 --- a/.editorconfig +++ b/.editorconfig @@ -56,5 +56,12 @@ indent_size = 1 [*.yml] indent_size = 2 +# You should NOT modify these files with your editor, +# but if you do it anyway use the correct formatting. +[Cargo.lock] +indent_size = 1 +[yarn.lock] +indent_size = 2 + [Makefile] indent_style = tab From d2e89b52c69266c032b87f421e45b7b2e06353a9 Mon Sep 17 00:00:00 2001 From: Michael Baumgartner Date: Sat, 27 Jun 2026 18:09:19 +0200 Subject: [PATCH 06/29] Unset EditorConfig for license texts --- .editorconfig | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/.editorconfig b/.editorconfig index fc7db3f32cf01..5d9bc11e0acef 100644 --- a/.editorconfig +++ b/.editorconfig @@ -65,3 +65,14 @@ indent_size = 2 [Makefile] indent_style = tab + +# The license texts should NEVER be modified. +# Therefore disable everything to avoid accidental changes on save. +[**{LICENSE,COPY{ING,RIGHT}}**] +charset = unset +indent_style = unset +indent_size = unset +tab_width = unset +trim_trailing_whitespace = unset +insert_final_newline = unset +spelling_language = unset From f286e4672870a0e0a9bff1d55a92dc6171721fd4 Mon Sep 17 00:00:00 2001 From: Michael Baumgartner Date: Sat, 27 Jun 2026 18:43:37 +0200 Subject: [PATCH 07/29] Fix EditorConfig Violations in rust-installer --- src/tools/rust-installer/install-template.sh | 4 ++-- src/tools/rust-installer/rust-installer-version | 2 +- src/tools/rust-installer/test.sh | 12 ++++++------ src/tools/rust-installer/test/image1/bin/bad-bin | 2 +- src/tools/rust-installer/test/image1/bin/program | 2 +- src/tools/rust-installer/test/image1/bin/program2 | 2 +- src/tools/rust-installer/test/image2/bin/oldprogram | 2 +- src/tools/rust-installer/test/image3/bin/cargo | 2 +- 8 files changed, 14 insertions(+), 14 deletions(-) diff --git a/src/tools/rust-installer/install-template.sh b/src/tools/rust-installer/install-template.sh index 7079e29eefff9..a9754a57d11af 100644 --- a/src/tools/rust-installer/install-template.sh +++ b/src/tools/rust-installer/install-template.sh @@ -219,7 +219,7 @@ opt() { op="$op=<$META>" fi printf " --%-30s %s\n" "$flag-$op" "$doc" - fi + fi } flag() { @@ -247,7 +247,7 @@ flag() { op="$op=<$META>" fi printf " --%-30s %s\n" "$op" "$doc" - fi + fi } validate_opt () { diff --git a/src/tools/rust-installer/rust-installer-version b/src/tools/rust-installer/rust-installer-version index e440e5c842586..00750edc07d64 100644 --- a/src/tools/rust-installer/rust-installer-version +++ b/src/tools/rust-installer/rust-installer-version @@ -1 +1 @@ -3 \ No newline at end of file +3 diff --git a/src/tools/rust-installer/test.sh b/src/tools/rust-installer/test.sh index 7b3e745600629..11a41b4763338 100755 --- a/src/tools/rust-installer/test.sh +++ b/src/tools/rust-installer/test.sh @@ -1043,18 +1043,18 @@ runtest destdir_no_trailing_slash disable_verify_noop() { # Obsolete --disable-verify flag doesn't generate error try sh "$S/gen-installer.sh" \ - --image-dir="$TEST_DIR/image1" \ - --work-dir="$WORK_DIR" \ - --output-dir="$OUT_DIR" + --image-dir="$TEST_DIR/image1" \ + --work-dir="$WORK_DIR" \ + --output-dir="$OUT_DIR" try "$WORK_DIR/package/install.sh" --prefix="$PREFIX_DIR" --disable-verify } runtest disable_verify_noop create_log() { try sh "$S/gen-installer.sh" \ - --image-dir="$TEST_DIR/image1" \ - --work-dir="$WORK_DIR" \ - --output-dir="$OUT_DIR" + --image-dir="$TEST_DIR/image1" \ + --work-dir="$WORK_DIR" \ + --output-dir="$OUT_DIR" try "$WORK_DIR/package/install.sh" --prefix="$PREFIX_DIR" try test -e "$PREFIX_DIR/lib/packagelib/install.log" local _log="$(cat "$PREFIX_DIR/lib/packagelib/install.log")" diff --git a/src/tools/rust-installer/test/image1/bin/bad-bin b/src/tools/rust-installer/test/image1/bin/bad-bin index b5b0e3234b424..191310a057bd9 100644 --- a/src/tools/rust-installer/test/image1/bin/bad-bin +++ b/src/tools/rust-installer/test/image1/bin/bad-bin @@ -1 +1 @@ -#!/bin/bogus \ No newline at end of file +#!/bin/bogus diff --git a/src/tools/rust-installer/test/image1/bin/program b/src/tools/rust-installer/test/image1/bin/program index 96b4b06ad4163..1a2485251c33a 100755 --- a/src/tools/rust-installer/test/image1/bin/program +++ b/src/tools/rust-installer/test/image1/bin/program @@ -1 +1 @@ -#!/bin/sh \ No newline at end of file +#!/bin/sh diff --git a/src/tools/rust-installer/test/image1/bin/program2 b/src/tools/rust-installer/test/image1/bin/program2 index 96b4b06ad4163..1a2485251c33a 100755 --- a/src/tools/rust-installer/test/image1/bin/program2 +++ b/src/tools/rust-installer/test/image1/bin/program2 @@ -1 +1 @@ -#!/bin/sh \ No newline at end of file +#!/bin/sh diff --git a/src/tools/rust-installer/test/image2/bin/oldprogram b/src/tools/rust-installer/test/image2/bin/oldprogram index 96b4b06ad4163..1a2485251c33a 100755 --- a/src/tools/rust-installer/test/image2/bin/oldprogram +++ b/src/tools/rust-installer/test/image2/bin/oldprogram @@ -1 +1 @@ -#!/bin/sh \ No newline at end of file +#!/bin/sh diff --git a/src/tools/rust-installer/test/image3/bin/cargo b/src/tools/rust-installer/test/image3/bin/cargo index 96b4b06ad4163..1a2485251c33a 100755 --- a/src/tools/rust-installer/test/image3/bin/cargo +++ b/src/tools/rust-installer/test/image3/bin/cargo @@ -1 +1 @@ -#!/bin/sh \ No newline at end of file +#!/bin/sh From d0029c84ba7d850efc568f17e9d100f740750186 Mon Sep 17 00:00:00 2001 From: Michael Baumgartner Date: Sat, 27 Jun 2026 18:54:40 +0200 Subject: [PATCH 08/29] Ignore EditorConfig violations in auxv The auxiliary vector files are binary files. --- .ecformat_ignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.ecformat_ignore b/.ecformat_ignore index b3f0dc07cbe21..d9e9d6e8643c0 100644 --- a/.ecformat_ignore +++ b/.ecformat_ignore @@ -28,6 +28,7 @@ src/gcc # Ignore binary files src/etc/installer/gfx/* +*.auxv *.png *.ico *.woff From 0ec17ff982372678771724698e0e3495217341ec Mon Sep 17 00:00:00 2001 From: Michael Baumgartner Date: Sat, 27 Jun 2026 19:18:03 +0200 Subject: [PATCH 09/29] Address EditorConfig violations in natvis files They use all two spaces for indentation. The intrinsic.natvis differed in two ways from the others: - It had a UTF-8 BOM. - It had two multiline comments in a different format. (No new line after - + @@ -218,8 +220,10 @@ - + From 9d66e58be9e40fe54f25f26d3425f373750eacc7 Mon Sep 17 00:00:00 2001 From: Michael Baumgartner Date: Sat, 27 Jun 2026 19:22:39 +0200 Subject: [PATCH 10/29] Harmonize EditorConfig for YAML files There are two file extensions for YAML and the '.yaml' currently also use two spaces for indentation. --- .editorconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.editorconfig b/.editorconfig index b63c9384f209d..3289d9c5c514d 100644 --- a/.editorconfig +++ b/.editorconfig @@ -53,7 +53,7 @@ trim_trailing_whitespace = false # Therefore, pressing tab should insert a single space to encourage situative accurate indentations. indent_size = 1 -[*.{yml,natvis}] +[*.{yml,yaml,natvis}] indent_size = 2 # You should NOT modify these files with your editor, From 8774270a910851f84304736705b025cba6321fed Mon Sep 17 00:00:00 2001 From: Michael Baumgartner Date: Sat, 27 Jun 2026 19:30:24 +0200 Subject: [PATCH 11/29] Fix EditorConfig for JSON and JSON5 All JSON and JSON5 files in the repostiory use two spaces for indentation. --- .editorconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.editorconfig b/.editorconfig index 3289d9c5c514d..70bc3f2f500bc 100644 --- a/.editorconfig +++ b/.editorconfig @@ -53,7 +53,7 @@ trim_trailing_whitespace = false # Therefore, pressing tab should insert a single space to encourage situative accurate indentations. indent_size = 1 -[*.{yml,yaml,natvis}] +[*.{json,json5,yml,yaml,natvis}] indent_size = 2 # You should NOT modify these files with your editor, From f01fc325dcfb5d3993f1fcd522fe491f1aaa5395 Mon Sep 17 00:00:00 2001 From: Michael Baumgartner Date: Sat, 27 Jun 2026 19:44:25 +0200 Subject: [PATCH 12/29] Fix EditorConfig violations in XML files --- compiler/rustc/Windows Manifest.xml | 6 +++--- src/etc/installer/pkg/Distribution.xml | 20 ++++++++++---------- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/compiler/rustc/Windows Manifest.xml b/compiler/rustc/Windows Manifest.xml index b37a2fd4c76d5..b6f0e70277e22 100644 --- a/compiler/rustc/Windows Manifest.xml +++ b/compiler/rustc/Windows Manifest.xml @@ -5,13 +5,13 @@ See: https://docs.microsoft.com/en-us/windows/win32/sbscs/application-manifests --> - - + + - + diff --git a/src/etc/installer/pkg/Distribution.xml b/src/etc/installer/pkg/Distribution.xml index 85c26ec499343..125bcb51fcf9b 100644 --- a/src/etc/installer/pkg/Distribution.xml +++ b/src/etc/installer/pkg/Distribution.xml @@ -11,21 +11,21 @@ - - - - - - - - - + + + + + + + + + + --> Date: Sun, 28 Jun 2026 07:58:38 +0200 Subject: [PATCH 13/29] Add license information for .ecformat_ignore --- REUSE.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/REUSE.toml b/REUSE.toml index 5ee913426a142..f60d939eaacf9 100644 --- a/REUSE.toml +++ b/REUSE.toml @@ -43,6 +43,7 @@ path = [ "x.ps1", "x.py", ".clang-format", + ".ecformat_ignore", ".editorconfig", ".git-blame-ignore-revs", ".gitattributes", From 667b0e3201e0feea54008daf7345eb0aca01f88d Mon Sep 17 00:00:00 2001 From: Michael Baumgartner Date: Sun, 28 Jun 2026 08:45:09 +0200 Subject: [PATCH 14/29] Address trailing whitespace characters --- .editorconfig | 2 +- library/std/src/sys/pal/sgx/abi/entry.S | 2 +- src/etc/rust-gdb | 2 +- src/librustdoc/html/static/js/stringdex.d.ts | 6 +++--- src/tools/nix-dev-shell/envrc-flake | 4 ++-- src/tools/nix-dev-shell/envrc-shell | 6 +++--- 6 files changed, 11 insertions(+), 11 deletions(-) diff --git a/.editorconfig b/.editorconfig index 70bc3f2f500bc..3e18d0f5ba2db 100644 --- a/.editorconfig +++ b/.editorconfig @@ -22,7 +22,7 @@ trim_trailing_whitespace = false [tests/**.{rs,js}] trim_trailing_whitespace = true # these specific source files need to have trailing whitespace. -[tests/ui/{frontmatter/frontmatter-whitespace-3.rs,parser/shebang/shebang-space.rs}] +[tests/ui/{frontmatter/{fence-whitespace-trailing-1.rs,frontmatter-whitespace-3.rs},parser/shebang/shebang-space.rs}] trim_trailing_whitespace = false # these specific files have an UTF-8 BOM to test with that charset [tests/ui/codemap_tests/utf8-bom.rs] diff --git a/library/std/src/sys/pal/sgx/abi/entry.S b/library/std/src/sys/pal/sgx/abi/entry.S index 8a063b65dac50..253b3974737dd 100644 --- a/library/std/src/sys/pal/sgx/abi/entry.S +++ b/library/std/src/sys/pal/sgx/abi/entry.S @@ -131,7 +131,7 @@ elf_entry: sub %rax,%rdx /* all chars written? */ jnz .Lelf_entry_call -.Lelf_exit: +.Lelf_exit: movq $60,%rax /* exit() syscall */ movq $1,%rdi /* exit code 1 */ syscall diff --git a/src/etc/rust-gdb b/src/etc/rust-gdb index 9abed30ea6f73..56068a3191f58 100755 --- a/src/etc/rust-gdb +++ b/src/etc/rust-gdb @@ -25,4 +25,4 @@ PYTHONPATH="$PYTHONPATH:$GDB_PYTHON_MODULE_DIRECTORY" exec ${RUST_GDB} \ -iex "add-auto-load-safe-path $GDB_PYTHON_MODULE_DIRECTORY" \ -iex "set substitute-path /rustc/$RUSTC_COMMIT_HASH $RUSTC_SYSROOT/lib/rustlib/src/rust" \ "$@" - + diff --git a/src/librustdoc/html/static/js/stringdex.d.ts b/src/librustdoc/html/static/js/stringdex.d.ts index 71c6bfdf48145..64ac7eaaa959f 100644 --- a/src/librustdoc/html/static/js/stringdex.d.ts +++ b/src/librustdoc/html/static/js/stringdex.d.ts @@ -101,10 +101,10 @@ declare namespace stringdex { loadRoot: function(Callbacks); /** * Load a subtree file from the search index. - * + * * If this function succeeds, call `rn_` on the callbacks * object. If it fails, call `err_rn_(hashHex, error)`. - * + * * @param {string} hashHex */ loadTreeByHash: function(string); @@ -153,4 +153,4 @@ declare global { RoaringBitmap: Class; StringdexOnload: Array?; }; -} \ No newline at end of file +} diff --git a/src/tools/nix-dev-shell/envrc-flake b/src/tools/nix-dev-shell/envrc-flake index 2feac5ac56992..de2e2abe3dbd2 100644 --- a/src/tools/nix-dev-shell/envrc-flake +++ b/src/tools/nix-dev-shell/envrc-flake @@ -1,6 +1,6 @@ -# If you want to use this as an .envrc file to create a shell with necessary components +# If you want to use this as an .envrc file to create a shell with necessary components # to develop rustc, use the following command in the root of the rust checkout: -# +# # ln -s ./src/tools/nix-dev-shell/envrc-flake ./.envrc && nix flake update --flake ./src/tools/nix-dev-shell if nix flake show path:./src/tools/nix-dev-shell &> /dev/null; then diff --git a/src/tools/nix-dev-shell/envrc-shell b/src/tools/nix-dev-shell/envrc-shell index 047da54c1f145..43c6394d0816e 100644 --- a/src/tools/nix-dev-shell/envrc-shell +++ b/src/tools/nix-dev-shell/envrc-shell @@ -1,7 +1,7 @@ -# If you want to use this as an .envrc file to create a shell with necessary components +# If you want to use this as an .envrc file to create a shell with necessary components # to develop rustc, use the following command in the root of the rust checkout: -# +# # ln -s ./src/tools/nix-dev-shell/envrc-shell ./.envrc use nix ./src/tools/nix-dev-shell/shell.nix - + From d4b618ebc1de09549243b8cef1015b99db447736 Mon Sep 17 00:00:00 2001 From: Michael Baumgartner Date: Sun, 28 Jun 2026 09:26:53 +0200 Subject: [PATCH 15/29] Fix EditorConfig violations in Dockerfile Mostly fixing the indentation size (use 4 spaces everywhere and not in some file 2 and some 4 for the same situations). Furthermore, insert final newline for one of them. --- .../host-aarch64/aarch64-gnu-debug/Dockerfile | 60 ++++---- .../aarch64-gnu-llvm-21/Dockerfile | 64 ++++----- .../host-aarch64/aarch64-gnu/Dockerfile | 38 +++--- .../dist-aarch64-freebsd/Dockerfile | 34 ++--- .../dist-aarch64-linux/Dockerfile | 84 ++++++------ .../docker/host-x86_64/arm-android/Dockerfile | 16 +-- .../docker/host-x86_64/armhf-gnu/Dockerfile | 70 +++++----- .../disabled/dist-aarch64-android/Dockerfile | 6 +- .../disabled/dist-armv7-android/Dockerfile | 8 +- .../disabled/dist-i686-android/Dockerfile | 8 +- .../disabled/dist-m68k-linux/Dockerfile | 28 ++-- .../disabled/dist-powerpcspe-linux/Dockerfile | 30 ++-- .../disabled/dist-sparc64-linux/Dockerfile | 30 ++-- .../disabled/dist-x86_64-android/Dockerfile | 6 +- .../disabled/dist-x86_64-dragonfly/Dockerfile | 32 ++--- .../disabled/dist-x86_64-haiku/Dockerfile | 54 ++++---- .../disabled/riscv64gc-gnu/Dockerfile | 60 ++++---- .../host-x86_64/dist-android/Dockerfile | 6 +- .../dist-arm-linux-gnueabi/Dockerfile | 6 +- .../dist-arm-linux-musl/Dockerfile | 10 +- .../dist-i586-gnu-i586-i686-musl/Dockerfile | 36 ++--- .../host-x86_64/dist-i686-linux/Dockerfile | 66 ++++----- .../dist-loongarch64-linux/Dockerfile | 14 +- .../dist-loongarch64-musl/Dockerfile | 18 +-- .../host-x86_64/dist-various-1/Dockerfile | 84 ++++++------ .../host-x86_64/dist-various-2/Dockerfile | 42 +++--- .../dist-x86_64-freebsd/Dockerfile | 34 ++--- .../host-x86_64/dist-x86_64-linux/Dockerfile | 84 ++++++------ .../host-x86_64/dist-x86_64-musl/Dockerfile | 50 +++---- .../host-x86_64/i686-gnu-nopt/Dockerfile | 30 ++-- src/ci/docker/host-x86_64/i686-gnu/Dockerfile | 32 ++--- .../Dockerfile | 46 +++---- .../docker/host-x86_64/pr-check-1/Dockerfile | 74 +++++----- .../docker/host-x86_64/pr-check-2/Dockerfile | 38 +++--- .../host-x86_64/test-various/Dockerfile | 86 ++++++------ src/ci/docker/host-x86_64/tidy/Dockerfile | 42 +++--- .../host-x86_64/x86_64-fuchsia/Dockerfile | 62 ++++----- .../host-x86_64/x86_64-gnu-aux/Dockerfile | 38 +++--- .../host-x86_64/x86_64-gnu-debug/Dockerfile | 64 ++++----- .../x86_64-gnu-distcheck/Dockerfile | 30 ++-- .../x86_64-gnu-gcc-core-tests/Dockerfile | 62 ++++----- .../host-x86_64/x86_64-gnu-gcc/Dockerfile | 80 +++++------ .../host-x86_64/x86_64-gnu-llvm-21/Dockerfile | 66 ++++----- .../host-x86_64/x86_64-gnu-llvm-22/Dockerfile | 68 +++++----- .../host-x86_64/x86_64-gnu-miri/Dockerfile | 48 +++---- .../Dockerfile | 32 ++--- .../host-x86_64/x86_64-gnu-nopt/Dockerfile | 36 ++--- .../host-x86_64/x86_64-gnu-tools/Dockerfile | 128 +++++++++--------- .../docker/host-x86_64/x86_64-gnu/Dockerfile | 52 +++---- .../x86_64-rust-for-linux/Dockerfile | 44 +++--- 50 files changed, 1118 insertions(+), 1118 deletions(-) diff --git a/src/ci/docker/host-aarch64/aarch64-gnu-debug/Dockerfile b/src/ci/docker/host-aarch64/aarch64-gnu-debug/Dockerfile index 7bc91243a5e2f..a877701fc553a 100644 --- a/src/ci/docker/host-aarch64/aarch64-gnu-debug/Dockerfile +++ b/src/ci/docker/host-aarch64/aarch64-gnu-debug/Dockerfile @@ -2,29 +2,29 @@ FROM ubuntu:25.10 ARG DEBIAN_FRONTEND=noninteractive RUN apt-get update && apt-get install -y --no-install-recommends \ - g++ \ - make \ - ninja-build \ - file \ - curl \ - ca-certificates \ - python3 \ - python3-dev \ - libxml2-dev \ - libncurses-dev \ - libedit-dev \ - swig \ - doxygen \ - git \ - cmake \ - sudo \ - gdb \ - libssl-dev \ - pkg-config \ - xz-utils \ - lld \ - clang \ - && rm -rf /var/lib/apt/lists/* + g++ \ + make \ + ninja-build \ + file \ + curl \ + ca-certificates \ + python3 \ + python3-dev \ + libxml2-dev \ + libncurses-dev \ + libedit-dev \ + swig \ + doxygen \ + git \ + cmake \ + sudo \ + gdb \ + libssl-dev \ + pkg-config \ + xz-utils \ + lld \ + clang \ + && rm -rf /var/lib/apt/lists/* COPY scripts/sccache.sh /scripts/ RUN sh /scripts/sccache.sh @@ -35,12 +35,12 @@ ENV RUSTBUILD_FORCE_CLANG_BASED_TESTS="1" ENV NO_DOWNLOAD_CI_LLVM="1" ENV RUST_CONFIGURE_ARGS="--build=aarch64-unknown-linux-gnu \ - --enable-debug \ - --enable-lld \ - --set llvm.use-linker=lld \ - --set target.aarch64-unknown-linux-gnu.linker=clang \ - --set target.aarch64-unknown-linux-gnu.cc=clang \ - --set target.aarch64-unknown-linux-gnu.cxx=clang++" + --enable-debug \ + --enable-lld \ + --set llvm.use-linker=lld \ + --set target.aarch64-unknown-linux-gnu.linker=clang \ + --set target.aarch64-unknown-linux-gnu.cc=clang \ + --set target.aarch64-unknown-linux-gnu.cxx=clang++" # This job appears to be checking two separate things: # - That we can build the compiler with `--enable-debug` @@ -52,4 +52,4 @@ ENV RUST_CONFIGURE_ARGS="--build=aarch64-unknown-linux-gnu \ # - See also FIXME(#132034) ENV SCRIPT="python3 ../x.py --stage 2 build && \ - python3 ../x.py --stage 2 test tests/run-make tests/run-make-cargo" + python3 ../x.py --stage 2 test tests/run-make tests/run-make-cargo" diff --git a/src/ci/docker/host-aarch64/aarch64-gnu-llvm-21/Dockerfile b/src/ci/docker/host-aarch64/aarch64-gnu-llvm-21/Dockerfile index c364ac27aaa52..156269151978e 100644 --- a/src/ci/docker/host-aarch64/aarch64-gnu-llvm-21/Dockerfile +++ b/src/ci/docker/host-aarch64/aarch64-gnu-llvm-21/Dockerfile @@ -3,34 +3,34 @@ FROM ubuntu:25.10 ARG DEBIAN_FRONTEND=noninteractive RUN apt-get update && apt-get install -y --no-install-recommends \ - bzip2 \ - g++ \ - make \ - ninja-build \ - file \ - curl \ - ca-certificates \ - python3 \ - git \ - cmake \ - sudo \ - gdb \ - llvm-21-tools \ - llvm-21-dev \ - libedit-dev \ - libssl-dev \ - pkg-config \ - zlib1g-dev \ - xz-utils \ - nodejs \ - mingw-w64 \ - # libgccjit dependencies - flex \ - libmpfr-dev \ - libgmp-dev \ - libmpc3 \ - libmpc-dev \ - && rm -rf /var/lib/apt/lists/* + bzip2 \ + g++ \ + make \ + ninja-build \ + file \ + curl \ + ca-certificates \ + python3 \ + git \ + cmake \ + sudo \ + gdb \ + llvm-21-tools \ + llvm-21-dev \ + libedit-dev \ + libssl-dev \ + pkg-config \ + zlib1g-dev \ + xz-utils \ + nodejs \ + mingw-w64 \ + # libgccjit dependencies + flex \ + libmpfr-dev \ + libgmp-dev \ + libmpc3 \ + libmpc-dev \ + && rm -rf /var/lib/apt/lists/* COPY scripts/sccache.sh /scripts/ RUN sh /scripts/sccache.sh @@ -42,10 +42,10 @@ ENV EXTERNAL_LLVM="1" # Using llvm-link-shared due to libffi issues -- see #34486 ENV RUST_CONFIGURE_ARGS="--build=aarch64-unknown-linux-gnu \ - --llvm-root=/usr/lib/llvm-21 \ - --enable-llvm-link-shared \ - --set rust.randomize-layout=true \ - --set rust.thin-lto-import-instr-limit=10" + --llvm-root=/usr/lib/llvm-21 \ + --enable-llvm-link-shared \ + --set rust.randomize-layout=true \ + --set rust.thin-lto-import-instr-limit=10" COPY scripts/shared.sh /scripts/ diff --git a/src/ci/docker/host-aarch64/aarch64-gnu/Dockerfile b/src/ci/docker/host-aarch64/aarch64-gnu/Dockerfile index 87bfc0766fbd9..f35c02e1ff3d9 100644 --- a/src/ci/docker/host-aarch64/aarch64-gnu/Dockerfile +++ b/src/ci/docker/host-aarch64/aarch64-gnu/Dockerfile @@ -2,28 +2,28 @@ FROM ubuntu:25.10 ARG DEBIAN_FRONTEND=noninteractive RUN apt-get update && apt-get install -y --no-install-recommends \ - g++ \ - make \ - ninja-build \ - file \ - curl \ - ca-certificates \ - python3 \ - git \ - cmake \ - sudo \ - gdb \ - libssl-dev \ - pkg-config \ - xz-utils \ - && rm -rf /var/lib/apt/lists/* + g++ \ + make \ + ninja-build \ + file \ + curl \ + ca-certificates \ + python3 \ + git \ + cmake \ + sudo \ + gdb \ + libssl-dev \ + pkg-config \ + xz-utils \ + && rm -rf /var/lib/apt/lists/* COPY scripts/sccache.sh /scripts/ RUN sh /scripts/sccache.sh ENV RUST_CONFIGURE_ARGS="--build=aarch64-unknown-linux-gnu \ - --enable-sanitizers \ - --enable-profiler \ - --enable-compiler-docs" + --enable-sanitizers \ + --enable-profiler \ + --enable-compiler-docs" ENV SCRIPT="python3 ../x.py --stage 2 test && \ - python3 ../x.py --stage 2 test src/tools/cargo" + python3 ../x.py --stage 2 test src/tools/cargo" diff --git a/src/ci/docker/host-aarch64/dist-aarch64-freebsd/Dockerfile b/src/ci/docker/host-aarch64/dist-aarch64-freebsd/Dockerfile index ca597acb72c5c..08e6fe3ff43b5 100644 --- a/src/ci/docker/host-aarch64/dist-aarch64-freebsd/Dockerfile +++ b/src/ci/docker/host-aarch64/dist-aarch64-freebsd/Dockerfile @@ -1,23 +1,23 @@ FROM ubuntu:26.04 RUN apt-get update && apt-get install -y --no-install-recommends \ - clang \ - make \ - ninja-build \ - file \ - curl \ - ca-certificates \ - python3 \ - git \ - cmake \ - sudo \ - bzip2 \ - xz-utils \ - texinfo \ - wget \ - libssl-dev \ - pkg-config \ - && rm -rf /var/lib/apt/lists/* + clang \ + make \ + ninja-build \ + file \ + curl \ + ca-certificates \ + python3 \ + git \ + cmake \ + sudo \ + bzip2 \ + xz-utils \ + texinfo \ + wget \ + libssl-dev \ + pkg-config \ + && rm -rf /var/lib/apt/lists/* COPY scripts/freebsd-toolchain.sh /tmp/ RUN /tmp/freebsd-toolchain.sh aarch64 diff --git a/src/ci/docker/host-aarch64/dist-aarch64-linux/Dockerfile b/src/ci/docker/host-aarch64/dist-aarch64-linux/Dockerfile index 750cafaca0b2c..e2314ddafa16b 100644 --- a/src/ci/docker/host-aarch64/dist-aarch64-linux/Dockerfile +++ b/src/ci/docker/host-aarch64/dist-aarch64-linux/Dockerfile @@ -8,34 +8,34 @@ WORKDIR /build # CentOS 7 EOL is June 30, 2024, but the repos remain in the vault. RUN sed -i /etc/yum.repos.d/*.repo -e 's!^mirrorlist!#mirrorlist!' \ - -e 's!^#baseurl=http://mirror.centos.org/!baseurl=https://vault.centos.org/!' + -e 's!^#baseurl=http://mirror.centos.org/!baseurl=https://vault.centos.org/!' RUN sed -i 's/enabled=1/enabled=0/' /etc/yum/pluginconf.d/fastestmirror.conf RUN yum upgrade -y && \ yum install -y \ - automake \ - bzip2 \ - file \ - gcc \ - gcc-c++ \ - git \ - glibc-devel \ - glibc-static \ - libedit-devel \ - libstdc++-devel \ - make \ - ncurses-devel \ - openssl-devel \ - patch \ - perl \ - perl-core \ - pkgconfig \ - python3 \ - unzip \ - wget \ - xz \ - zlib-devel \ - && yum clean all + automake \ + bzip2 \ + file \ + gcc \ + gcc-c++ \ + git \ + glibc-devel \ + glibc-static \ + libedit-devel \ + libstdc++-devel \ + make \ + ncurses-devel \ + openssl-devel \ + patch \ + perl \ + perl-core \ + pkgconfig \ + python3 \ + unzip \ + wget \ + xz \ + zlib-devel \ + && yum clean all RUN mkdir -p /rustroot/bin @@ -77,26 +77,26 @@ ENV HOSTS=aarch64-unknown-linux-gnu ENV CPATH=/usr/include/aarch64-linux-gnu/:$CPATH ENV RUST_CONFIGURE_ARGS="--build=aarch64-unknown-linux-gnu \ - --enable-full-tools \ - --enable-profiler \ - --enable-sanitizers \ - --enable-compiler-docs \ - --set target.aarch64-unknown-linux-gnu.linker=clang \ - --set target.aarch64-unknown-linux-gnu.ar=/rustroot/bin/llvm-ar \ - --set target.aarch64-unknown-linux-gnu.ranlib=/rustroot/bin/llvm-ranlib \ - --set llvm.link-shared=true \ - --set llvm.thin-lto=true \ - --set llvm.libzstd=true \ - --set llvm.ninja=false \ - --set rust.debug-assertions=false \ - --set rust.jemalloc \ - --set rust.bootstrap-override-lld=true \ - --set rust.lto=thin \ - --set rust.codegen-units=1" + --enable-full-tools \ + --enable-profiler \ + --enable-sanitizers \ + --enable-compiler-docs \ + --set target.aarch64-unknown-linux-gnu.linker=clang \ + --set target.aarch64-unknown-linux-gnu.ar=/rustroot/bin/llvm-ar \ + --set target.aarch64-unknown-linux-gnu.ranlib=/rustroot/bin/llvm-ranlib \ + --set llvm.link-shared=true \ + --set llvm.thin-lto=true \ + --set llvm.libzstd=true \ + --set llvm.ninja=false \ + --set rust.debug-assertions=false \ + --set rust.jemalloc \ + --set rust.bootstrap-override-lld=true \ + --set rust.lto=thin \ + --set rust.codegen-units=1" ENV SCRIPT="python3 ../x.py build --set rust.debug=true opt-dist && \ - ./build/$HOSTS/stage1-tools-bin/opt-dist linux-ci -- python3 ../x.py dist \ - --host $HOSTS --target $HOSTS --include-default-paths build-manifest bootstrap enzyme" + ./build/$HOSTS/stage1-tools-bin/opt-dist linux-ci -- python3 ../x.py dist \ + --host $HOSTS --target $HOSTS --include-default-paths build-manifest bootstrap enzyme" ENV CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER=clang ENV LIBCURL_NO_PKG_CONFIG="1" diff --git a/src/ci/docker/host-x86_64/arm-android/Dockerfile b/src/ci/docker/host-x86_64/arm-android/Dockerfile index 21f038bffe592..244f1e5e680fc 100644 --- a/src/ci/docker/host-x86_64/arm-android/Dockerfile +++ b/src/ci/docker/host-x86_64/arm-android/Dockerfile @@ -11,14 +11,14 @@ RUN . /scripts/android-ndk.sh && \ RUN dpkg --add-architecture i386 && \ apt-get update && \ apt-get install -y --no-install-recommends \ - libgl1 \ - libglx-mesa0 \ - libpulse0 \ - libstdc++6:i386 \ - openjdk-8-jre-headless \ - tzdata \ - wget \ - python3 + libgl1 \ + libglx-mesa0 \ + libpulse0 \ + libstdc++6:i386 \ + openjdk-8-jre-headless \ + tzdata \ + wget \ + python3 COPY scripts/android-sdk.sh /scripts/ COPY scripts/android-sdk-manager.py /scripts/ diff --git a/src/ci/docker/host-x86_64/armhf-gnu/Dockerfile b/src/ci/docker/host-x86_64/armhf-gnu/Dockerfile index 9a3545dbad8d1..aaaac619e9cb9 100644 --- a/src/ci/docker/host-x86_64/armhf-gnu/Dockerfile +++ b/src/ci/docker/host-x86_64/armhf-gnu/Dockerfile @@ -2,24 +2,24 @@ FROM ubuntu:22.04 ARG DEBIAN_FRONTEND=noninteractive RUN apt-get update -y && apt-get install -y --no-install-recommends \ - bc \ - bzip2 \ - ca-certificates \ - cmake \ - cpio \ - curl \ - file \ - g++ \ - g++-arm-linux-gnueabihf \ - git \ - libc6-dev \ - libc6-dev-armhf-cross \ - libssl-dev \ - make \ - ninja-build \ - python3 \ - qemu-system-arm \ - xz-utils + bc \ + bzip2 \ + ca-certificates \ + cmake \ + cpio \ + curl \ + file \ + g++ \ + g++-arm-linux-gnueabihf \ + git \ + libc6-dev \ + libc6-dev-armhf-cross \ + libssl-dev \ + make \ + ninja-build \ + python3 \ + qemu-system-arm \ + xz-utils ENV ARCH=arm \ CROSS_COMPILE=arm-linux-gnueabihf- @@ -36,33 +36,33 @@ WORKDIR /build # followed by `make menuconfig` and then enabling the IPv6 protocol page. COPY host-x86_64/armhf-gnu/vexpress_config /build/.config RUN curl https://cdn.kernel.org/pub/linux/kernel/v4.x/linux-4.14.320.tar.xz | \ - tar xJf - && \ - cd /build/linux-4.14.320 && \ - cp /build/.config . && \ - make -j$(nproc) all && \ - cp arch/arm/boot/zImage /tmp && \ - cd /build && \ - rm -rf linux-4.14.320 + tar xJf - && \ + cd /build/linux-4.14.320 && \ + cp /build/.config . && \ + make -j$(nproc) all && \ + cp arch/arm/boot/zImage /tmp && \ + cd /build && \ + rm -rf linux-4.14.320 # Compile an instance of busybox as this provides a lightweight system and init # binary which we will boot into. Only trick here is configuring busybox to # build static binaries. RUN curl https://www.busybox.net/downloads/busybox-1.32.1.tar.bz2 | tar xjf - && \ - cd busybox-1.32.1 && \ - make defconfig && \ - sed -i 's/.*CONFIG_STATIC.*/CONFIG_STATIC=y/' .config && \ - make -j$(nproc) && \ - make install && \ - mv _install /tmp/rootfs && \ - cd /build && \ - rm -rf busybox-1.32.1 + cd busybox-1.32.1 && \ + make defconfig && \ + sed -i 's/.*CONFIG_STATIC.*/CONFIG_STATIC=y/' .config && \ + make -j$(nproc) && \ + make install && \ + mv _install /tmp/rootfs && \ + cd /build && \ + rm -rf busybox-1.32.1 # Download the ubuntu rootfs, which we'll use as a chroot for all our tests. WORKDIR /tmp RUN mkdir rootfs/ubuntu RUN curl https://cdimage.ubuntu.com/ubuntu-base/releases/22.04/release/ubuntu-base-22.04.2-base-armhf.tar.gz | \ - tar xzf - -C rootfs/ubuntu && \ - cd rootfs && mkdir proc sys dev etc etc/init.d + tar xzf - -C rootfs/ubuntu && \ + cd rootfs && mkdir proc sys dev etc etc/init.d # Copy over our init script, which starts up our test server and also a few # other misc tasks. diff --git a/src/ci/docker/host-x86_64/disabled/dist-aarch64-android/Dockerfile b/src/ci/docker/host-x86_64/disabled/dist-aarch64-android/Dockerfile index b3c46d5590f09..ac93e977ac3f5 100644 --- a/src/ci/docker/host-x86_64/disabled/dist-aarch64-android/Dockerfile +++ b/src/ci/docker/host-x86_64/disabled/dist-aarch64-android/Dockerfile @@ -14,9 +14,9 @@ ENV DEP_Z_ROOT=/android/ndk/arm64-21/sysroot/usr/ ENV HOSTS=aarch64-linux-android ENV RUST_CONFIGURE_ARGS="--aarch64-linux-android-ndk=/android/ndk/arm64-21 \ - --disable-rpath \ - --enable-extended \ - --enable-cargo-openssl-static" + --disable-rpath \ + --enable-extended \ + --enable-cargo-openssl-static" ENV SCRIPT="python3 ../x.py dist --target $HOSTS --host $HOSTS" diff --git a/src/ci/docker/host-x86_64/disabled/dist-armv7-android/Dockerfile b/src/ci/docker/host-x86_64/disabled/dist-armv7-android/Dockerfile index 4403611f2f047..a79000d77e4db 100644 --- a/src/ci/docker/host-x86_64/disabled/dist-armv7-android/Dockerfile +++ b/src/ci/docker/host-x86_64/disabled/dist-armv7-android/Dockerfile @@ -20,9 +20,9 @@ ENV DEP_Z_ROOT=/android/ndk/arm-14/sysroot/usr/ ENV HOSTS=armv7-linux-androideabi ENV RUST_CONFIGURE_ARGS="--armv7-linux-androideabi-ndk=/android/ndk/arm \ - --disable-rpath \ - --enable-extended \ - --enable-cargo-openssl-static" + --disable-rpath \ + --enable-extended \ + --enable-cargo-openssl-static" # We support api level 14, but api level 21 is required to build llvm. To # overcome this problem we use a ndk with api level 21 to build llvm and then @@ -32,7 +32,7 @@ ENV RUST_CONFIGURE_ARGS="--armv7-linux-androideabi-ndk=/android/ndk/arm \ # build to finish we use --warn-unresolved-symbols. Note that the missing # symbols does not affect std, only the compiler (llvm) and cargo (openssl). ENV SCRIPT="python3 ../x.py --stage 2 build src/llvm --host $HOSTS --target $HOSTS && \ - (export RUSTFLAGS=\"-C link-arg=-Wl,--warn-unresolved-symbols\"; \ + (export RUSTFLAGS=\"-C link-arg=-Wl,--warn-unresolved-symbols\"; \ rm /android/ndk/arm && \ ln -s /android/ndk/arm-14 /android/ndk/arm && \ python3 ../x.py dist --host $HOSTS --target $HOSTS)" diff --git a/src/ci/docker/host-x86_64/disabled/dist-i686-android/Dockerfile b/src/ci/docker/host-x86_64/disabled/dist-i686-android/Dockerfile index f36901794b9cd..82a59fc798a9b 100644 --- a/src/ci/docker/host-x86_64/disabled/dist-i686-android/Dockerfile +++ b/src/ci/docker/host-x86_64/disabled/dist-i686-android/Dockerfile @@ -20,9 +20,9 @@ ENV DEP_Z_ROOT=/android/ndk/x86-14/sysroot/usr/ ENV HOSTS=i686-linux-android ENV RUST_CONFIGURE_ARGS="--i686-linux-android-ndk=/android/ndk/x86 \ - --disable-rpath \ - --enable-extended \ - --enable-cargo-openssl-static" + --disable-rpath \ + --enable-extended \ + --enable-cargo-openssl-static" # We support api level 14, but api level 21 is required to build llvm. To # overcome this problem we use a ndk with api level 21 to build llvm and then @@ -32,7 +32,7 @@ ENV RUST_CONFIGURE_ARGS="--i686-linux-android-ndk=/android/ndk/x86 \ # build to finish we use --warn-unresolved-symbols. Note that the missing # symbols does not affect std, only the compiler (llvm) and cargo (openssl). ENV SCRIPT="python3 ../x.py --stage 2 build src/llvm --host $HOSTS --target $HOSTS && \ - (export RUSTFLAGS=\"-C link-arg=-Wl,--warn-unresolved-symbols\"; \ + (export RUSTFLAGS=\"-C link-arg=-Wl,--warn-unresolved-symbols\"; \ rm /android/ndk/x86 && \ ln -s /android/ndk/x86-14 /android/ndk/x86 && \ python3 ../x.py dist --host $HOSTS --target $HOSTS)" diff --git a/src/ci/docker/host-x86_64/disabled/dist-m68k-linux/Dockerfile b/src/ci/docker/host-x86_64/disabled/dist-m68k-linux/Dockerfile index 8444e94b2a286..8913879028559 100644 --- a/src/ci/docker/host-x86_64/disabled/dist-m68k-linux/Dockerfile +++ b/src/ci/docker/host-x86_64/disabled/dist-m68k-linux/Dockerfile @@ -1,20 +1,20 @@ FROM ubuntu:20.04 RUN apt-get update && apt-get install -y --no-install-recommends \ - g++ \ - make \ - file \ - curl \ - ca-certificates \ - python2.7 \ - git \ - cmake \ - sudo \ - gdb \ - xz-utils \ - g++-m68k-linux-gnu \ - libssl-dev \ - pkg-config + g++ \ + make \ + file \ + curl \ + ca-certificates \ + python2.7 \ + git \ + cmake \ + sudo \ + gdb \ + xz-utils \ + g++-m68k-linux-gnu \ + libssl-dev \ + pkg-config COPY scripts/cmake.sh /scripts/ RUN /scripts/cmake.sh diff --git a/src/ci/docker/host-x86_64/disabled/dist-powerpcspe-linux/Dockerfile b/src/ci/docker/host-x86_64/disabled/dist-powerpcspe-linux/Dockerfile index 2dd10d30a070f..3882de35cffde 100644 --- a/src/ci/docker/host-x86_64/disabled/dist-powerpcspe-linux/Dockerfile +++ b/src/ci/docker/host-x86_64/disabled/dist-powerpcspe-linux/Dockerfile @@ -1,21 +1,21 @@ FROM ubuntu:16.04 RUN apt-get update && apt-get install -y --no-install-recommends \ - g++ \ - make \ - ninja-build \ - file \ - curl \ - ca-certificates \ - python3 \ - git \ - cmake \ - sudo \ - gdb \ - xz-utils \ - g++-powerpc-linux-gnuspe \ - libssl-dev \ - pkg-config + g++ \ + make \ + ninja-build \ + file \ + curl \ + ca-certificates \ + python3 \ + git \ + cmake \ + sudo \ + gdb \ + xz-utils \ + g++-powerpc-linux-gnuspe \ + libssl-dev \ + pkg-config COPY scripts/sccache.sh /scripts/ diff --git a/src/ci/docker/host-x86_64/disabled/dist-sparc64-linux/Dockerfile b/src/ci/docker/host-x86_64/disabled/dist-sparc64-linux/Dockerfile index e61251cbe047c..3051d2ddcdd95 100644 --- a/src/ci/docker/host-x86_64/disabled/dist-sparc64-linux/Dockerfile +++ b/src/ci/docker/host-x86_64/disabled/dist-sparc64-linux/Dockerfile @@ -1,21 +1,21 @@ FROM ubuntu:16.04 RUN apt-get update && apt-get install -y --no-install-recommends \ - g++ \ - make \ - ninja-build \ - file \ - curl \ - ca-certificates \ - python3 \ - git \ - cmake \ - sudo \ - gdb \ - xz-utils \ - g++-sparc64-linux-gnu \ - libssl-dev \ - pkg-config + g++ \ + make \ + ninja-build \ + file \ + curl \ + ca-certificates \ + python3 \ + git \ + cmake \ + sudo \ + gdb \ + xz-utils \ + g++-sparc64-linux-gnu \ + libssl-dev \ + pkg-config COPY scripts/sccache.sh /scripts/ diff --git a/src/ci/docker/host-x86_64/disabled/dist-x86_64-android/Dockerfile b/src/ci/docker/host-x86_64/disabled/dist-x86_64-android/Dockerfile index b92d5729cbb88..d27a4246eeec4 100644 --- a/src/ci/docker/host-x86_64/disabled/dist-x86_64-android/Dockerfile +++ b/src/ci/docker/host-x86_64/disabled/dist-x86_64-android/Dockerfile @@ -14,9 +14,9 @@ ENV DEP_Z_ROOT=/android/ndk/x86_64-21/sysroot/usr/ ENV HOSTS=x86_64-linux-android ENV RUST_CONFIGURE_ARGS="--x86_64-linux-android-ndk=/android/ndk/x86_64-21 \ - --disable-rpath \ - --enable-extended \ - --enable-cargo-openssl-static" + --disable-rpath \ + --enable-extended \ + --enable-cargo-openssl-static" ENV SCRIPT="python3 ../x.py dist --target $HOSTS --host $HOSTS" diff --git a/src/ci/docker/host-x86_64/disabled/dist-x86_64-dragonfly/Dockerfile b/src/ci/docker/host-x86_64/disabled/dist-x86_64-dragonfly/Dockerfile index 7839c8d9494f7..d7037f82c1582 100644 --- a/src/ci/docker/host-x86_64/disabled/dist-x86_64-dragonfly/Dockerfile +++ b/src/ci/docker/host-x86_64/disabled/dist-x86_64-dragonfly/Dockerfile @@ -1,22 +1,22 @@ FROM ubuntu:16.04 RUN apt-get update && apt-get install -y --no-install-recommends \ - g++ \ - make \ - ninja-build \ - file \ - curl \ - ca-certificates \ - python3 \ - git \ - cmake \ - sudo \ - bzip2 \ - xz-utils \ - wget \ - libssl-dev \ - bsdtar \ - pkg-config + g++ \ + make \ + ninja-build \ + file \ + curl \ + ca-certificates \ + python3 \ + git \ + cmake \ + sudo \ + bzip2 \ + xz-utils \ + wget \ + libssl-dev \ + bsdtar \ + pkg-config COPY host-x86_64/dist-x86_64-dragonfly/build-toolchain.sh /tmp/ diff --git a/src/ci/docker/host-x86_64/disabled/dist-x86_64-haiku/Dockerfile b/src/ci/docker/host-x86_64/disabled/dist-x86_64-haiku/Dockerfile index 6692e82847c32..80b1241fa121b 100644 --- a/src/ci/docker/host-x86_64/disabled/dist-x86_64-haiku/Dockerfile +++ b/src/ci/docker/host-x86_64/disabled/dist-x86_64-haiku/Dockerfile @@ -1,30 +1,30 @@ FROM ubuntu:16.04 RUN apt-get update && apt-get install -y --no-install-recommends \ - autoconf \ - automake \ - bison \ - bzip2 \ - ca-certificates \ - cmake \ - curl \ - file \ - flex \ - g++ \ - gawk \ - git \ - libcurl4-openssl-dev \ - libssl-dev \ - make \ - ninja-build \ - nasm \ - pkg-config \ - python3 \ - sudo \ - texinfo \ - wget \ - xz-utils \ - zlib1g-dev + autoconf \ + automake \ + bison \ + bzip2 \ + ca-certificates \ + cmake \ + curl \ + file \ + flex \ + g++ \ + gawk \ + git \ + libcurl4-openssl-dev \ + libssl-dev \ + make \ + ninja-build \ + nasm \ + pkg-config \ + python3 \ + sudo \ + texinfo \ + wget \ + xz-utils \ + zlib1g-dev COPY host-x86_64/dist-x86_64-haiku/llvm-config.sh /bin/llvm-config-haiku @@ -44,9 +44,9 @@ ENV HOST=x86_64-unknown-haiku ENV TARGET=target.$HOST ENV RUST_CONFIGURE_ARGS="--disable-jemalloc \ - --set=$TARGET.cc=x86_64-unknown-haiku-gcc \ - --set=$TARGET.cxx=x86_64-unknown-haiku-g++ \ - --set=$TARGET.llvm-config=/bin/llvm-config-haiku" + --set=$TARGET.cc=x86_64-unknown-haiku-gcc \ + --set=$TARGET.cxx=x86_64-unknown-haiku-g++ \ + --set=$TARGET.llvm-config=/bin/llvm-config-haiku" ENV EXTERNAL_LLVM="1" ENV SCRIPT="python3 ../x.py dist --host=$HOST --target=$HOST" diff --git a/src/ci/docker/host-x86_64/disabled/riscv64gc-gnu/Dockerfile b/src/ci/docker/host-x86_64/disabled/riscv64gc-gnu/Dockerfile index fb647dedbc217..8a0dff4fc3799 100644 --- a/src/ci/docker/host-x86_64/disabled/riscv64gc-gnu/Dockerfile +++ b/src/ci/docker/host-x86_64/disabled/riscv64gc-gnu/Dockerfile @@ -3,26 +3,26 @@ FROM ubuntu:22.04 ARG DEBIAN_FRONTEND=noninteractive RUN apt-get update -y && apt-get install -y --no-install-recommends \ - bc \ - bzip2 \ - ca-certificates \ - cmake \ - cpio \ - curl \ - file \ - flex \ - bison \ - g++ \ - g++-riscv64-linux-gnu \ - git \ - libc6-dev \ - libc6-dev-riscv64-cross \ - libssl-dev \ - make \ - ninja-build \ - python3 \ - qemu-system-riscv64 \ - xz-utils + bc \ + bzip2 \ + ca-certificates \ + cmake \ + cpio \ + curl \ + file \ + flex \ + bison \ + g++ \ + g++-riscv64-linux-gnu \ + git \ + libc6-dev \ + libc6-dev-riscv64-cross \ + libssl-dev \ + make \ + ninja-build \ + python3 \ + qemu-system-riscv64 \ + xz-utils ENV ARCH=riscv \ CROSS_COMPILE=riscv64-linux-gnu- @@ -47,21 +47,21 @@ RUN curl https://cdn.kernel.org/pub/linux/kernel/v5.x/linux-5.6.16.tar.xz | tar # binary which we will boot into. Only trick here is configuring busybox to # build static binaries. RUN curl https://www.busybox.net/downloads/busybox-1.32.1.tar.bz2 | tar xjf - && \ - cd busybox-1.32.1 && \ - make defconfig && \ - sed -i 's/.*CONFIG_STATIC.*/CONFIG_STATIC=y/' .config && \ - make -j$(nproc) && \ - make install && \ - mv _install /tmp/rootfs && \ - cd /build && \ - rm -rf busybox-1.32.1 + cd busybox-1.32.1 && \ + make defconfig && \ + sed -i 's/.*CONFIG_STATIC.*/CONFIG_STATIC=y/' .config && \ + make -j$(nproc) && \ + make install && \ + mv _install /tmp/rootfs && \ + cd /build && \ + rm -rf busybox-1.32.1 # Download the ubuntu rootfs, which we'll use as a chroot for all our tests. WORKDIR /tmp RUN mkdir rootfs/ubuntu RUN curl https://cdimage.ubuntu.com/ubuntu-base/releases/22.04/release/ubuntu-base-22.04.2-base-riscv64.tar.gz | \ - tar xzf - -C rootfs/ubuntu && \ - cd rootfs && mkdir proc sys dev etc etc/init.d + tar xzf - -C rootfs/ubuntu && \ + cd rootfs && mkdir proc sys dev etc etc/init.d # Copy over our init script, which starts up our test server and also a few other # misc tasks diff --git a/src/ci/docker/host-x86_64/dist-android/Dockerfile b/src/ci/docker/host-x86_64/dist-android/Dockerfile index 25565564e8dae..7ab57b0672d03 100644 --- a/src/ci/docker/host-x86_64/dist-android/Dockerfile +++ b/src/ci/docker/host-x86_64/dist-android/Dockerfile @@ -17,9 +17,9 @@ ENV TARGETS=$TARGETS,aarch64-linux-android ENV TARGETS=$TARGETS,x86_64-linux-android ENV RUST_CONFIGURE_ARGS="--enable-extended \ - --enable-profiler \ - --android-ndk=/android/ndk/ \ - --disable-docs" + --enable-profiler \ + --android-ndk=/android/ndk/ \ + --disable-docs" ENV PATH=$PATH:/android/ndk/toolchains/llvm/prebuilt/linux-x86_64/bin diff --git a/src/ci/docker/host-x86_64/dist-arm-linux-gnueabi/Dockerfile b/src/ci/docker/host-x86_64/dist-arm-linux-gnueabi/Dockerfile index f0d54b0d33d60..9dd3145a97d18 100644 --- a/src/ci/docker/host-x86_64/dist-arm-linux-gnueabi/Dockerfile +++ b/src/ci/docker/host-x86_64/dist-arm-linux-gnueabi/Dockerfile @@ -28,7 +28,7 @@ ENV CC_arm_unknown_linux_gnueabi=arm-unknown-linux-gnueabi-gcc \ ENV HOSTS=arm-unknown-linux-gnueabi ENV RUST_CONFIGURE_ARGS="--enable-full-tools \ - --disable-docs \ - --enable-sanitizers \ - --enable-profiler" + --disable-docs \ + --enable-sanitizers \ + --enable-profiler" ENV SCRIPT="python3 ../x.py dist --host $HOSTS --target $HOSTS" diff --git a/src/ci/docker/host-x86_64/dist-arm-linux-musl/Dockerfile b/src/ci/docker/host-x86_64/dist-arm-linux-musl/Dockerfile index a34b97d9b3b7a..3c7a04da0920e 100644 --- a/src/ci/docker/host-x86_64/dist-arm-linux-musl/Dockerfile +++ b/src/ci/docker/host-x86_64/dist-arm-linux-musl/Dockerfile @@ -21,9 +21,9 @@ RUN sh /scripts/sccache.sh ENV HOSTS=aarch64-unknown-linux-musl ENV RUST_CONFIGURE_ARGS="--enable-full-tools \ - --disable-docs \ - --musl-root-aarch64=/usr/local/aarch64-linux-musl \ - --enable-sanitizers \ - --enable-profiler \ - --set target.aarch64-unknown-linux-musl.crt-static=false" + --disable-docs \ + --musl-root-aarch64=/usr/local/aarch64-linux-musl \ + --enable-sanitizers \ + --enable-profiler \ + --set target.aarch64-unknown-linux-musl.crt-static=false" ENV SCRIPT="python3 ../x.py dist --host $HOSTS --target $HOSTS" diff --git a/src/ci/docker/host-x86_64/dist-i586-gnu-i586-i686-musl/Dockerfile b/src/ci/docker/host-x86_64/dist-i586-gnu-i586-i686-musl/Dockerfile index cf8ff07a5b07f..de409aa465197 100644 --- a/src/ci/docker/host-x86_64/dist-i586-gnu-i586-i686-musl/Dockerfile +++ b/src/ci/docker/host-x86_64/dist-i586-gnu-i586-i686-musl/Dockerfile @@ -2,21 +2,21 @@ FROM ubuntu:22.04 ARG DEBIAN_FRONTEND=noninteractive RUN apt-get update && apt-get install -y --no-install-recommends \ - g++-multilib \ - make \ - ninja-build \ - file \ - curl \ - ca-certificates \ - python3 \ - git \ - cmake \ - xz-utils \ - sudo \ - gdb \ - patch \ - libssl-dev \ - pkg-config + g++-multilib \ + make \ + ninja-build \ + file \ + curl \ + ca-certificates \ + python3 \ + git \ + cmake \ + xz-utils \ + sudo \ + gdb \ + patch \ + libssl-dev \ + pkg-config COPY scripts/cross-apt-packages.sh /scripts/ RUN sh /scripts/cross-apt-packages.sh @@ -60,8 +60,8 @@ COPY scripts/sccache.sh /scripts/ RUN sh /scripts/sccache.sh ENV RUST_CONFIGURE_ARGS="--musl-root-i586=/musl-i586 \ - --musl-root-i686=/musl-i686 \ - --disable-docs" + --musl-root-i686=/musl-i686 \ + --disable-docs" # Newer binutils broke things on some vms/distros (i.e., linking against # unknown relocs disabled by the following flag), so we need to go out of our @@ -75,4 +75,4 @@ ENV CFLAGS_i586_unknown_linux_musl=-Wa,-mrelax-relocations=no ENV TARGETS=i586-unknown-linux-gnu,i686-unknown-linux-musl ENV SCRIPT="python3 ../x.py --stage 2 test --host= --target $TARGETS && \ - python3 ../x.py dist --host= --target $TARGETS,i586-unknown-linux-musl" + python3 ../x.py dist --host= --target $TARGETS,i586-unknown-linux-musl" diff --git a/src/ci/docker/host-x86_64/dist-i686-linux/Dockerfile b/src/ci/docker/host-x86_64/dist-i686-linux/Dockerfile index 8165258cc49f2..f2dbd4f5e2a8c 100644 --- a/src/ci/docker/host-x86_64/dist-i686-linux/Dockerfile +++ b/src/ci/docker/host-x86_64/dist-i686-linux/Dockerfile @@ -8,37 +8,37 @@ WORKDIR /build # CentOS 7 EOL is June 30, 2024, but the repos remain in the vault. RUN sed -i /etc/yum.repos.d/*.repo -e 's!^mirrorlist!#mirrorlist!' \ - -e 's!^#baseurl=http://mirror.centos.org/!baseurl=https://vault.centos.org/!' + -e 's!^#baseurl=http://mirror.centos.org/!baseurl=https://vault.centos.org/!' RUN sed -i 's/enabled=1/enabled=0/' /etc/yum/pluginconf.d/fastestmirror.conf RUN yum upgrade -y && \ yum install -y \ - automake \ - bzip2 \ - file \ - gcc \ - gcc-c++ \ - git \ - binutils.i686 \ - glibc-devel.i686 \ - glibc-devel.x86_64 \ - libedit-devel \ - libstdc++-devel.i686 \ - libstdc++-devel.x86_64 \ - make \ - ncurses-devel \ - openssl-devel \ - patch \ - perl \ - perl-core \ - pkgconfig \ - python3 \ - unzip \ - wget \ - xz \ - zlib-devel.i686 \ - zlib-devel.x86_64 \ - && yum clean all + automake \ + bzip2 \ + file \ + gcc \ + gcc-c++ \ + git \ + binutils.i686 \ + glibc-devel.i686 \ + glibc-devel.x86_64 \ + libedit-devel \ + libstdc++-devel.i686 \ + libstdc++-devel.x86_64 \ + make \ + ncurses-devel \ + openssl-devel \ + patch \ + perl \ + perl-core \ + pkgconfig \ + python3 \ + unzip \ + wget \ + xz \ + zlib-devel.i686 \ + zlib-devel.x86_64 \ + && yum clean all RUN mkdir -p /rustroot/bin @@ -71,12 +71,12 @@ RUN sh /scripts/sccache.sh ENV HOSTS=i686-unknown-linux-gnu ENV RUST_CONFIGURE_ARGS="--enable-full-tools \ - --enable-sanitizers \ - --enable-profiler \ - --set target.i686-unknown-linux-gnu.linker=clang \ - --build=i686-unknown-linux-gnu \ - --set llvm.ninja=false \ - --set rust.jemalloc" + --enable-sanitizers \ + --enable-profiler \ + --set target.i686-unknown-linux-gnu.linker=clang \ + --build=i686-unknown-linux-gnu \ + --set llvm.ninja=false \ + --set rust.jemalloc" ENV SCRIPT="python3 ../x.py dist --build $HOSTS --host $HOSTS --target $HOSTS" ENV CARGO_TARGET_I686_UNKNOWN_LINUX_GNU_LINKER=clang diff --git a/src/ci/docker/host-x86_64/dist-loongarch64-linux/Dockerfile b/src/ci/docker/host-x86_64/dist-loongarch64-linux/Dockerfile index 3ee8cb9ed7e8f..17f9abd0897f8 100644 --- a/src/ci/docker/host-x86_64/dist-loongarch64-linux/Dockerfile +++ b/src/ci/docker/host-x86_64/dist-loongarch64-linux/Dockerfile @@ -46,12 +46,12 @@ ENV TARGETS=$TARGETS,loongarch64-unknown-none ENV TARGETS=$TARGETS,loongarch64-unknown-none-softfloat ENV RUST_CONFIGURE_ARGS="--enable-extended \ - --enable-full-tools \ - --enable-profiler \ - --enable-sanitizers \ - --disable-docs \ - --set rust.jemalloc \ - --set rust.lto=thin \ - --set rust.codegen-units=1" + --enable-full-tools \ + --enable-profiler \ + --enable-sanitizers \ + --disable-docs \ + --set rust.jemalloc \ + --set rust.lto=thin \ + --set rust.codegen-units=1" ENV SCRIPT="python3 ../x.py dist --host $HOSTS --target $TARGETS" diff --git a/src/ci/docker/host-x86_64/dist-loongarch64-musl/Dockerfile b/src/ci/docker/host-x86_64/dist-loongarch64-musl/Dockerfile index 54c1869a2a04f..675e3626bb43d 100644 --- a/src/ci/docker/host-x86_64/dist-loongarch64-musl/Dockerfile +++ b/src/ci/docker/host-x86_64/dist-loongarch64-musl/Dockerfile @@ -28,14 +28,14 @@ ENV CC_loongarch64_unknown_linux_musl=loongarch64-unknown-linux-musl-gcc \ ENV HOSTS=loongarch64-unknown-linux-musl ENV RUST_CONFIGURE_ARGS="--enable-extended \ - --enable-full-tools \ - --enable-profiler \ - --enable-sanitizers \ - --disable-docs \ - --set rust.jemalloc \ - --set rust.lto=thin \ - --set rust.codegen-units=1 \ - --set target.loongarch64-unknown-linux-musl.crt-static=false \ - --musl-root-loongarch64=/x-tools/loongarch64-unknown-linux-musl/loongarch64-unknown-linux-musl/sysroot/usr" + --enable-full-tools \ + --enable-profiler \ + --enable-sanitizers \ + --disable-docs \ + --set rust.jemalloc \ + --set rust.lto=thin \ + --set rust.codegen-units=1 \ + --set target.loongarch64-unknown-linux-musl.crt-static=false \ + --musl-root-loongarch64=/x-tools/loongarch64-unknown-linux-musl/loongarch64-unknown-linux-musl/sysroot/usr" ENV SCRIPT="python3 ../x.py dist --host $HOSTS --target $HOSTS" diff --git a/src/ci/docker/host-x86_64/dist-various-1/Dockerfile b/src/ci/docker/host-x86_64/dist-various-1/Dockerfile index 415709d388a99..68af39b4a0658 100644 --- a/src/ci/docker/host-x86_64/dist-various-1/Dockerfile +++ b/src/ci/docker/host-x86_64/dist-various-1/Dockerfile @@ -2,44 +2,44 @@ FROM ubuntu:22.04 ARG DEBIAN_FRONTEND=noninteractive RUN apt-get update && apt-get install -y --no-install-recommends \ - g++ \ - automake \ - bison \ - bzip2 \ - flex \ - help2man \ - libtool-bin \ - texinfo \ - unzip \ - wget \ - xz-utils \ - libncurses-dev \ - gawk \ - make \ - ninja-build \ - file \ - curl \ - ca-certificates \ - python3 \ - git \ - cmake \ - sudo \ - xz-utils \ - zlib1g-dev \ - g++-arm-linux-gnueabi \ - g++-arm-linux-gnueabihf \ - g++-aarch64-linux-gnu \ - gcc-arm-none-eabi \ - gcc-sparc64-linux-gnu \ - libc6-dev-sparc64-cross \ - bzip2 \ - patch \ - libssl-dev \ - pkg-config \ - libnewlib-arm-none-eabi \ - qemu-system-arm \ + g++ \ + automake \ + bison \ + bzip2 \ + flex \ + help2man \ + libtool-bin \ + texinfo \ + unzip \ + wget \ + xz-utils \ + libncurses-dev \ + gawk \ + make \ + ninja-build \ + file \ + curl \ + ca-certificates \ + python3 \ + git \ + cmake \ + sudo \ + xz-utils \ + zlib1g-dev \ + g++-arm-linux-gnueabi \ + g++-arm-linux-gnueabihf \ + g++-aarch64-linux-gnu \ + gcc-arm-none-eabi \ + gcc-sparc64-linux-gnu \ + libc6-dev-sparc64-cross \ + bzip2 \ + patch \ + libssl-dev \ + pkg-config \ + libnewlib-arm-none-eabi \ + qemu-system-arm \ # software-properties-common for the add-apt-repository command - software-properties-common + software-properties-common WORKDIR /build @@ -170,13 +170,13 @@ ENV CFLAGS_armv5te_unknown_linux_musleabi="-march=armv5te -marm -mfloat-abi=soft CFLAGS_riscv64gc_unknown_none_elf=-march=rv64gc -mabi=lp64 ENV RUST_CONFIGURE_ARGS="--musl-root-armv5te=/musl-armv5te \ - --musl-root-arm=/musl-arm \ - --musl-root-armhf=/musl-armhf \ - --musl-root-armv7hf=/musl-armv7hf \ - --disable-docs" + --musl-root-arm=/musl-arm \ + --musl-root-armhf=/musl-armhf \ + --musl-root-armv7hf=/musl-armv7hf \ + --disable-docs" ENV SCRIPT="python3 ../x.py --stage 2 test --host= --target $RUN_MAKE_TARGETS tests/run-make tests/run-make-cargo && \ - python3 ../x.py dist --host= --target $TARGETS" + python3 ../x.py dist --host= --target $TARGETS" # sccache COPY scripts/sccache.sh /scripts/ diff --git a/src/ci/docker/host-x86_64/dist-various-2/Dockerfile b/src/ci/docker/host-x86_64/dist-various-2/Dockerfile index f07fb91edaf0b..9c43fa8eb9825 100644 --- a/src/ci/docker/host-x86_64/dist-various-2/Dockerfile +++ b/src/ci/docker/host-x86_64/dist-various-2/Dockerfile @@ -7,25 +7,25 @@ RUN sh /scripts/cross-apt-packages.sh RUN sed -i 's/^# deb-src/deb-src/' /etc/apt/sources.list RUN apt-get update && apt-get build-dep -y clang llvm && apt-get install -y --no-install-recommends \ - build-essential \ + build-essential \ # gcc-multilib can not be installed together with gcc-arm-linux-gnueabi - g++-9-multilib \ - libedit-dev \ - libgmp-dev \ - libisl-dev \ - libmpc-dev \ - libmpfr-dev \ - libtinfo5 \ - ninja-build \ - nodejs \ - python3-dev \ - software-properties-common \ - unzip \ - # Needed for apt-key to work: - dirmngr \ - gpg-agent \ - g++-9-arm-linux-gnueabi \ - g++-11-riscv64-linux-gnu + g++-9-multilib \ + libedit-dev \ + libgmp-dev \ + libisl-dev \ + libmpc-dev \ + libmpfr-dev \ + libtinfo5 \ + ninja-build \ + nodejs \ + python3-dev \ + software-properties-common \ + unzip \ + # Needed for apt-key to work: + dirmngr \ + gpg-agent \ + g++-9-arm-linux-gnueabi \ + g++-11-riscv64-linux-gnu ENV \ AR_x86_64_unknown_fuchsia=x86_64-unknown-fuchsia-ar \ @@ -85,7 +85,7 @@ COPY host-x86_64/dist-various-2/build-x86_64-fortanix-unknown-sgx-toolchain.sh / RUN /tmp/build-x86_64-fortanix-unknown-sgx-toolchain.sh RUN curl -L https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-33/wasi-sdk-33.0-x86_64-linux.tar.gz | \ - tar -xz + tar -xz ENV WASI_SDK_PATH=/tmp/wasi-sdk-33.0-x86_64-linux COPY scripts/freebsd-toolchain.sh /tmp/ @@ -136,7 +136,7 @@ RUN ln -s /usr/include/x86_64-linux-gnu/asm /usr/local/include/asm RUN ln -s /usr/riscv64-linux-gnu/lib/libgcc_s.so.1 /usr/lib/gcc-cross/riscv64-linux-gnu/11/ ENV RUST_CONFIGURE_ARGS="--enable-extended --enable-lld --enable-llvm-bitcode-linker --disable-docs \ - --musl-root-armv7=/musl-armv7 \ - --musl-root-riscv64gc=/musl-riscv64gc" + --musl-root-armv7=/musl-armv7 \ + --musl-root-riscv64gc=/musl-riscv64gc" ENV SCRIPT="python3 ../x.py dist --host= --target $TARGETS && python3 ../x.py dist --host= --set build.sanitizers=true --target $TARGETS_SANITIZERS" diff --git a/src/ci/docker/host-x86_64/dist-x86_64-freebsd/Dockerfile b/src/ci/docker/host-x86_64/dist-x86_64-freebsd/Dockerfile index 5f11437c786c2..3714b4e2e08bb 100644 --- a/src/ci/docker/host-x86_64/dist-x86_64-freebsd/Dockerfile +++ b/src/ci/docker/host-x86_64/dist-x86_64-freebsd/Dockerfile @@ -1,23 +1,23 @@ FROM ubuntu:22.04 RUN apt-get update && apt-get install -y --no-install-recommends \ - clang \ - make \ - ninja-build \ - file \ - curl \ - ca-certificates \ - python3 \ - git \ - cmake \ - sudo \ - bzip2 \ - xz-utils \ - texinfo \ - wget \ - libssl-dev \ - pkg-config \ - && rm -rf /var/lib/apt/lists/* + clang \ + make \ + ninja-build \ + file \ + curl \ + ca-certificates \ + python3 \ + git \ + cmake \ + sudo \ + bzip2 \ + xz-utils \ + texinfo \ + wget \ + libssl-dev \ + pkg-config \ + && rm -rf /var/lib/apt/lists/* COPY scripts/freebsd-toolchain.sh /tmp/ RUN /tmp/freebsd-toolchain.sh x86_64 diff --git a/src/ci/docker/host-x86_64/dist-x86_64-linux/Dockerfile b/src/ci/docker/host-x86_64/dist-x86_64-linux/Dockerfile index b168c739c9793..b86f7f0e847c5 100644 --- a/src/ci/docker/host-x86_64/dist-x86_64-linux/Dockerfile +++ b/src/ci/docker/host-x86_64/dist-x86_64-linux/Dockerfile @@ -8,39 +8,39 @@ WORKDIR /build # CentOS 7 EOL is June 30, 2024, but the repos remain in the vault. RUN sed -i /etc/yum.repos.d/*.repo -e 's!^mirrorlist!#mirrorlist!' \ - -e 's!^#baseurl=http://mirror.centos.org/!baseurl=https://vault.centos.org/!' + -e 's!^#baseurl=http://mirror.centos.org/!baseurl=https://vault.centos.org/!' RUN sed -i 's/enabled=1/enabled=0/' /etc/yum/pluginconf.d/fastestmirror.conf RUN yum upgrade -y && \ yum install -y \ - automake \ - bzip2 \ - file \ - gcc \ - gcc-c++ \ - git \ - glibc-devel.i686 \ - glibc-devel.x86_64 \ - glibc-static.i686 \ - glibc-static.x86_64 \ - libedit-devel \ - libstdc++-devel.i686 \ - libstdc++-devel.x86_64 \ - make \ - ncurses-devel \ - openssl-devel \ - patch \ - perl \ - perl-core \ - pkgconfig \ - python3 \ - unzip \ - wget \ - flex \ - xz \ - zlib-devel.i686 \ - zlib-devel.x86_64 \ - && yum clean all + automake \ + bzip2 \ + file \ + gcc \ + gcc-c++ \ + git \ + glibc-devel.i686 \ + glibc-devel.x86_64 \ + glibc-static.i686 \ + glibc-static.x86_64 \ + libedit-devel \ + libstdc++-devel.i686 \ + libstdc++-devel.x86_64 \ + make \ + ncurses-devel \ + openssl-devel \ + patch \ + perl \ + perl-core \ + pkgconfig \ + python3 \ + unzip \ + wget \ + flex \ + xz \ + zlib-devel.i686 \ + zlib-devel.x86_64 \ + && yum clean all RUN mkdir -p /rustroot/bin @@ -81,19 +81,19 @@ ENV PGO_HOST=x86_64-unknown-linux-gnu ENV HOSTS=x86_64-unknown-linux-gnu ENV RUST_CONFIGURE_ARGS="--enable-full-tools \ - --enable-sanitizers \ - --enable-profiler \ - --enable-compiler-docs \ - --set target.x86_64-unknown-linux-gnu.linker=clang \ - --set target.x86_64-unknown-linux-gnu.ar=/rustroot/bin/llvm-ar \ - --set target.x86_64-unknown-linux-gnu.ranlib=/rustroot/bin/llvm-ranlib \ - --set llvm.thin-lto=true \ - --set llvm.ninja=false \ - --set llvm.libzstd=true \ - --set rust.jemalloc \ - --set rust.bootstrap-override-lld=true \ - --set rust.lto=thin \ - --set rust.codegen-units=1" + --enable-sanitizers \ + --enable-profiler \ + --enable-compiler-docs \ + --set target.x86_64-unknown-linux-gnu.linker=clang \ + --set target.x86_64-unknown-linux-gnu.ar=/rustroot/bin/llvm-ar \ + --set target.x86_64-unknown-linux-gnu.ranlib=/rustroot/bin/llvm-ranlib \ + --set llvm.thin-lto=true \ + --set llvm.ninja=false \ + --set llvm.libzstd=true \ + --set rust.jemalloc \ + --set rust.bootstrap-override-lld=true \ + --set rust.lto=thin \ + --set rust.codegen-units=1" COPY host-x86_64/dist-x86_64-linux/dist.sh /scripts/ COPY host-x86_64/dist-x86_64-linux/dist-alt.sh /scripts/ diff --git a/src/ci/docker/host-x86_64/dist-x86_64-musl/Dockerfile b/src/ci/docker/host-x86_64/dist-x86_64-musl/Dockerfile index aaca6b2bb9afa..c6a2cfb626a15 100644 --- a/src/ci/docker/host-x86_64/dist-x86_64-musl/Dockerfile +++ b/src/ci/docker/host-x86_64/dist-x86_64-musl/Dockerfile @@ -2,25 +2,25 @@ FROM ubuntu:22.04 ARG DEBIAN_FRONTEND=noninteractive RUN apt-get update && apt-get install -y --no-install-recommends \ - g++ \ - make \ - ninja-build \ - file \ - wget \ - curl \ - ca-certificates \ - python3 \ - git \ - cmake \ - bzip2 \ - xz-utils \ - sudo \ - gdb \ - patch \ - libssl-dev \ - pkg-config \ - zlib1g-dev \ - && rm -rf /var/lib/apt/lists/* + g++ \ + make \ + ninja-build \ + file \ + wget \ + curl \ + ca-certificates \ + python3 \ + git \ + cmake \ + bzip2 \ + xz-utils \ + sudo \ + gdb \ + patch \ + libssl-dev \ + pkg-config \ + zlib1g-dev \ + && rm -rf /var/lib/apt/lists/* WORKDIR /build/ @@ -38,12 +38,12 @@ RUN sh /scripts/sccache.sh ENV HOSTS=x86_64-unknown-linux-musl ENV RUST_CONFIGURE_ARGS="--musl-root-x86_64=/usr/local/x86_64-linux-musl \ - --enable-extended \ - --enable-sanitizers \ - --enable-profiler \ - --enable-lld \ - --set target.x86_64-unknown-linux-musl.crt-static=false \ - --build $HOSTS" + --enable-extended \ + --enable-sanitizers \ + --enable-profiler \ + --enable-lld \ + --set target.x86_64-unknown-linux-musl.crt-static=false \ + --build $HOSTS" # Newer binutils broke things on some vms/distros (i.e., linking against # unknown relocs disabled by the following flag), so we need to go out of our diff --git a/src/ci/docker/host-x86_64/i686-gnu-nopt/Dockerfile b/src/ci/docker/host-x86_64/i686-gnu-nopt/Dockerfile index fdc296aa891f6..090b125898f3a 100644 --- a/src/ci/docker/host-x86_64/i686-gnu-nopt/Dockerfile +++ b/src/ci/docker/host-x86_64/i686-gnu-nopt/Dockerfile @@ -2,21 +2,21 @@ FROM ubuntu:22.04 ARG DEBIAN_FRONTEND=noninteractive RUN apt-get update && apt-get install -y --no-install-recommends \ - g++-multilib \ - make \ - ninja-build \ - file \ - curl \ - ca-certificates \ - python3 \ - git \ - cmake \ - sudo \ - gdb \ - zlib1g-dev \ - lib32z1-dev \ - xz-utils \ - && rm -rf /var/lib/apt/lists/* + g++-multilib \ + make \ + ninja-build \ + file \ + curl \ + ca-certificates \ + python3 \ + git \ + cmake \ + sudo \ + gdb \ + zlib1g-dev \ + lib32z1-dev \ + xz-utils \ + && rm -rf /var/lib/apt/lists/* COPY scripts/sccache.sh /scripts/ diff --git a/src/ci/docker/host-x86_64/i686-gnu/Dockerfile b/src/ci/docker/host-x86_64/i686-gnu/Dockerfile index d0f3d1afa4dc6..bd9928cbd021f 100644 --- a/src/ci/docker/host-x86_64/i686-gnu/Dockerfile +++ b/src/ci/docker/host-x86_64/i686-gnu/Dockerfile @@ -2,22 +2,22 @@ FROM ubuntu:22.04 ARG DEBIAN_FRONTEND=noninteractive RUN apt-get update && apt-get install -y --no-install-recommends \ - g++-multilib \ - make \ - ninja-build \ - file \ - curl \ - ca-certificates \ - python3 \ - git \ - cmake \ - sudo \ - gdb \ - zlib1g-dev \ - lib32z1-dev \ - xz-utils \ - mingw-w64 \ - && rm -rf /var/lib/apt/lists/* + g++-multilib \ + make \ + ninja-build \ + file \ + curl \ + ca-certificates \ + python3 \ + git \ + cmake \ + sudo \ + gdb \ + zlib1g-dev \ + lib32z1-dev \ + xz-utils \ + mingw-w64 \ + && rm -rf /var/lib/apt/lists/* COPY scripts/sccache.sh /scripts/ diff --git a/src/ci/docker/host-x86_64/optional-x86_64-gnu-parallel-frontend/Dockerfile b/src/ci/docker/host-x86_64/optional-x86_64-gnu-parallel-frontend/Dockerfile index 8f7c7ebe35559..3a095c7cfa4a7 100644 --- a/src/ci/docker/host-x86_64/optional-x86_64-gnu-parallel-frontend/Dockerfile +++ b/src/ci/docker/host-x86_64/optional-x86_64-gnu-parallel-frontend/Dockerfile @@ -2,34 +2,34 @@ FROM ubuntu:22.04 ARG DEBIAN_FRONTEND=noninteractive RUN apt-get update && apt-get install -y --no-install-recommends \ - g++ \ - make \ - ninja-build \ - file \ - curl \ - ca-certificates \ - python3 \ - git \ - cmake \ - sudo \ - gdb \ - libssl-dev \ - pkg-config \ - xz-utils \ - mingw-w64 \ - zlib1g-dev \ - libzstd-dev \ - && rm -rf /var/lib/apt/lists/* + g++ \ + make \ + ninja-build \ + file \ + curl \ + ca-certificates \ + python3 \ + git \ + cmake \ + sudo \ + gdb \ + libssl-dev \ + pkg-config \ + xz-utils \ + mingw-w64 \ + zlib1g-dev \ + libzstd-dev \ + && rm -rf /var/lib/apt/lists/* COPY scripts/sccache.sh /scripts/ RUN sh /scripts/sccache.sh ENV RUST_CONFIGURE_ARGS \ - --build=x86_64-unknown-linux-gnu \ - --enable-sanitizers \ - --enable-profiler \ - --enable-compiler-docs \ - --set llvm.libzstd=true + --build=x86_64-unknown-linux-gnu \ + --enable-sanitizers \ + --enable-profiler \ + --enable-compiler-docs \ + --set llvm.libzstd=true # Build the toolchain with multiple parallel frontend threads and then run tests # Tests are still compiled serially at the moment (intended to be changed in follow-ups). diff --git a/src/ci/docker/host-x86_64/pr-check-1/Dockerfile b/src/ci/docker/host-x86_64/pr-check-1/Dockerfile index 346ecb453f4d0..021aa7415fa59 100644 --- a/src/ci/docker/host-x86_64/pr-check-1/Dockerfile +++ b/src/ci/docker/host-x86_64/pr-check-1/Dockerfile @@ -2,24 +2,24 @@ FROM ubuntu:22.04 ARG DEBIAN_FRONTEND=noninteractive RUN apt-get update && apt-get install -y --no-install-recommends \ - g++ \ - make \ - ninja-build \ - file \ - curl \ - ca-certificates \ - python3 \ - python3-pip \ - python3-pkg-resources \ - git \ - cmake \ - sudo \ - gdb \ - xz-utils \ - libssl-dev \ - pkg-config \ - mingw-w64 \ - && rm -rf /var/lib/apt/lists/* + g++ \ + make \ + ninja-build \ + file \ + curl \ + ca-certificates \ + python3 \ + python3-pip \ + python3-pkg-resources \ + git \ + cmake \ + sudo \ + gdb \ + xz-utils \ + libssl-dev \ + pkg-config \ + mingw-w64 \ + && rm -rf /var/lib/apt/lists/* ENV RUST_CONFIGURE_ARGS="--set rust.validate-mir-opts=3" @@ -42,22 +42,22 @@ ENV PUPPETEER_SKIP_DOWNLOAD 1 # We disable optimized compiler built-ins because that requires a C toolchain for the target. # We also skip the x86_64-unknown-linux-gnu target as it is well-tested by other jobs. ENV SCRIPT=" \ - # Check some tools that aren't included in `x check` by default, to - # ensure that maintainers can still do check builds locally. - python3 ../x.py check \ - bootstrap \ - bump-stage0 \ - compiletest \ - coverage-dump \ - linkchecker \ - run-make-support \ - rustdoc-gui-test \ - tidy \ - && \ - /scripts/check-default-config-profiles.sh && \ - python3 ../x.py build src/tools/build-manifest && \ - python3 ../x.py check --target=i686-pc-windows-gnu --host=i686-pc-windows-gnu && \ - python3 ../x.py check --set build.optimized-compiler-builtins=false core alloc std --target=aarch64-unknown-linux-gnu,i686-pc-windows-msvc,i686-unknown-linux-gnu,x86_64-apple-darwin,x86_64-pc-windows-gnu,x86_64-pc-windows-msvc && \ - /scripts/validate-toolstate.sh && \ - reuse --include-submodules lint && \ - python3 ../x.py test collect-license-metadata" + # Check some tools that aren't included in `x check` by default, to + # ensure that maintainers can still do check builds locally. + python3 ../x.py check \ + bootstrap \ + bump-stage0 \ + compiletest \ + coverage-dump \ + linkchecker \ + run-make-support \ + rustdoc-gui-test \ + tidy \ + && \ + /scripts/check-default-config-profiles.sh && \ + python3 ../x.py build src/tools/build-manifest && \ + python3 ../x.py check --target=i686-pc-windows-gnu --host=i686-pc-windows-gnu && \ + python3 ../x.py check --set build.optimized-compiler-builtins=false core alloc std --target=aarch64-unknown-linux-gnu,i686-pc-windows-msvc,i686-unknown-linux-gnu,x86_64-apple-darwin,x86_64-pc-windows-gnu,x86_64-pc-windows-msvc && \ + /scripts/validate-toolstate.sh && \ + reuse --include-submodules lint && \ + python3 ../x.py test collect-license-metadata" diff --git a/src/ci/docker/host-x86_64/pr-check-2/Dockerfile b/src/ci/docker/host-x86_64/pr-check-2/Dockerfile index acbd99db6c4f8..3653e10f5d04b 100644 --- a/src/ci/docker/host-x86_64/pr-check-2/Dockerfile +++ b/src/ci/docker/host-x86_64/pr-check-2/Dockerfile @@ -2,27 +2,27 @@ FROM ubuntu:22.04 ARG DEBIAN_FRONTEND=noninteractive RUN apt-get update && apt-get install -y --no-install-recommends \ - g++ \ - make \ - ninja-build \ - file \ - curl \ - ca-certificates \ - python3 \ - python3-pip \ - python3-pkg-resources \ - git \ - cmake \ - sudo \ - gdb \ - xz-utils \ - libssl-dev \ - pkg-config \ - mingw-w64 \ - && rm -rf /var/lib/apt/lists/* + g++ \ + make \ + ninja-build \ + file \ + curl \ + ca-certificates \ + python3 \ + python3-pip \ + python3-pkg-resources \ + git \ + cmake \ + sudo \ + gdb \ + xz-utils \ + libssl-dev \ + pkg-config \ + mingw-w64 \ + && rm -rf /var/lib/apt/lists/* RUN curl -L https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-33/wasi-sdk-33.0-x86_64-linux.tar.gz | \ - tar -xz + tar -xz ENV WASI_SDK_PATH=/wasi-sdk-33.0-x86_64-linux ENV RUST_CONFIGURE_ARGS="--set rust.validate-mir-opts=3" diff --git a/src/ci/docker/host-x86_64/test-various/Dockerfile b/src/ci/docker/host-x86_64/test-various/Dockerfile index 26e77bc5da200..27eb84a9d040e 100644 --- a/src/ci/docker/host-x86_64/test-various/Dockerfile +++ b/src/ci/docker/host-x86_64/test-various/Dockerfile @@ -2,32 +2,32 @@ FROM ubuntu:22.04 ARG DEBIAN_FRONTEND=noninteractive RUN apt-get update && apt-get install -y --no-install-recommends \ - clang-11 \ - llvm-11 \ - gcc-multilib \ - g++ \ - make \ - ninja-build \ - file \ - curl \ - ca-certificates \ - python3 \ - git \ - cmake \ - sudo \ - gdb \ - libssl-dev \ - pkg-config \ - bzip2 \ - xz-utils \ - wget \ - patch \ - ovmf \ - ovmf-ia32 \ - qemu-efi-aarch64 \ - qemu-system-arm \ - qemu-system-x86 \ - && rm -rf /var/lib/apt/lists/* + clang-11 \ + llvm-11 \ + gcc-multilib \ + g++ \ + make \ + ninja-build \ + file \ + curl \ + ca-certificates \ + python3 \ + git \ + cmake \ + sudo \ + gdb \ + libssl-dev \ + pkg-config \ + bzip2 \ + xz-utils \ + wget \ + patch \ + ovmf \ + ovmf-ia32 \ + qemu-efi-aarch64 \ + qemu-system-arm \ + qemu-system-x86 \ + && rm -rf /var/lib/apt/lists/* COPY scripts/nodejs.sh /scripts/ RUN sh /scripts/nodejs.sh /node @@ -44,11 +44,11 @@ COPY scripts/sccache.sh /scripts/ RUN sh /scripts/sccache.sh RUN curl -L https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-33/wasi-sdk-33.0-x86_64-linux.tar.gz | \ - tar -xz + tar -xz ENV WASI_SDK_PATH=/wasi-sdk-33.0-x86_64-linux ENV RUST_CONFIGURE_ARGS="--musl-root-x86_64=/usr/local/x86_64-linux-musl \ - --set rust.lld" + --set rust.lld" # Some run-make tests have assertions about code size, and enabling debug # assertions in libstd causes the binary to be much bigger than it would @@ -58,25 +58,25 @@ ENV NO_DEBUG_ASSERTIONS=1 ENV NO_OVERFLOW_CHECKS=1 RUN curl -L https://github.com/bytecodealliance/wasmtime/releases/download/v44.0.1/wasmtime-v44.0.1-x86_64-linux.tar.xz | \ - tar -xJ + tar -xJ ENV PATH="$PATH:/wasmtime-v44.0.1-x86_64-linux" ENV WASM_WASIP_TARGET=wasm32-wasip1 ENV WASM_WASIP_SCRIPT="python3 /checkout/x.py --stage 2 test --host= --target $WASM_WASIP_TARGET \ - tests/run-make \ - tests/run-make-cargo \ - tests/ui \ - tests/mir-opt \ - tests/codegen-units \ - tests/codegen-llvm \ - tests/assembly-llvm \ - library/core" + tests/run-make \ + tests/run-make-cargo \ + tests/ui \ + tests/mir-opt \ + tests/codegen-units \ + tests/codegen-llvm \ + tests/assembly-llvm \ + library/core" ENV NVPTX_TARGETS=nvptx64-nvidia-cuda ENV NVPTX_SCRIPT="python3 /checkout/x.py --stage 2 test --host= --target $NVPTX_TARGETS \ - tests/run-make \ - tests/run-make-cargo \ - tests/assembly-llvm" + tests/run-make \ + tests/run-make-cargo \ + tests/assembly-llvm" ENV MUSL_TARGETS=x86_64-unknown-linux-musl \ CC_x86_64_unknown_linux_musl=x86_64-linux-musl-gcc \ @@ -91,8 +91,8 @@ ENV UEFI_TARGETS=aarch64-unknown-uefi,i686-unknown-uefi,x86_64-unknown-uefi \ CC_x86_64_unknown_uefi=clang-11 \ CXX_x86_64_unknown_uefi=clang++-11 ENV UEFI_SCRIPT="python3 /checkout/x.py --stage 2 build --host= --target $UEFI_TARGETS && \ - python3 /checkout/x.py --stage 2 test tests/run-make-cargo/uefi-qemu/rmake.rs --target aarch64-unknown-uefi && \ - python3 /checkout/x.py --stage 2 test tests/run-make-cargo/uefi-qemu/rmake.rs --target i686-unknown-uefi && \ - python3 /checkout/x.py --stage 2 test tests/run-make-cargo/uefi-qemu/rmake.rs --target x86_64-unknown-uefi" + python3 /checkout/x.py --stage 2 test tests/run-make-cargo/uefi-qemu/rmake.rs --target aarch64-unknown-uefi && \ + python3 /checkout/x.py --stage 2 test tests/run-make-cargo/uefi-qemu/rmake.rs --target i686-unknown-uefi && \ + python3 /checkout/x.py --stage 2 test tests/run-make-cargo/uefi-qemu/rmake.rs --target x86_64-unknown-uefi" ENV SCRIPT="$WASM_WASIP_SCRIPT && $NVPTX_SCRIPT && $MUSL_SCRIPT && $UEFI_SCRIPT" diff --git a/src/ci/docker/host-x86_64/tidy/Dockerfile b/src/ci/docker/host-x86_64/tidy/Dockerfile index 0c6029a6a5442..3d8ba1726d41c 100644 --- a/src/ci/docker/host-x86_64/tidy/Dockerfile +++ b/src/ci/docker/host-x86_64/tidy/Dockerfile @@ -4,25 +4,25 @@ FROM ghcr.io/rust-lang/ubuntu:22.04 ARG DEBIAN_FRONTEND=noninteractive RUN apt-get update && apt-get install -y --no-install-recommends \ - g++ \ - make \ - ninja-build \ - file \ - curl \ - ca-certificates \ - python2.7 \ - python3 \ - python3-pip \ - python3-pkg-resources \ - git \ - cmake \ - sudo \ - gdb \ - xz-utils \ - libssl-dev \ - pkg-config \ - mingw-w64 \ - && rm -rf /var/lib/apt/lists/* + g++ \ + make \ + ninja-build \ + file \ + curl \ + ca-certificates \ + python2.7 \ + python3 \ + python3-pip \ + python3-pkg-resources \ + git \ + cmake \ + sudo \ + gdb \ + xz-utils \ + libssl-dev \ + pkg-config \ + mingw-w64 \ + && rm -rf /var/lib/apt/lists/* ENV PUPPETEER_SKIP_DOWNLOAD 1 @@ -35,11 +35,11 @@ RUN sh /scripts/sccache.sh COPY host-x86_64/pr-check-1/reuse-requirements.txt /tmp/ RUN pip3 install --no-deps --no-cache-dir --require-hashes -r /tmp/reuse-requirements.txt \ - && pip3 install virtualenv + && pip3 install virtualenv COPY host-x86_64/pr-check-1/validate-toolstate.sh /scripts/ # NOTE: intentionally uses python2 for x.py so we can test it still works. # validate-toolstate only runs in our CI, so it's ok for it to only support python3. ENV SCRIPT="TIDY_PRINT_DIFF=1 python2.7 ../x.py test \ - src/tools/tidy tidyselftest --extra-checks=py,cpp,js,spellcheck" + src/tools/tidy tidyselftest --extra-checks=py,cpp,js,spellcheck" diff --git a/src/ci/docker/host-x86_64/x86_64-fuchsia/Dockerfile b/src/ci/docker/host-x86_64/x86_64-fuchsia/Dockerfile index ccb7841d83ac3..d8e22a8f53d7f 100644 --- a/src/ci/docker/host-x86_64/x86_64-fuchsia/Dockerfile +++ b/src/ci/docker/host-x86_64/x86_64-fuchsia/Dockerfile @@ -6,23 +6,23 @@ FROM ubuntu:22.04 ARG DEBIAN_FRONTEND=noninteractive RUN apt-get update && apt-get install -y --no-install-recommends \ - build-essential \ - clang-15 \ - g++ \ - make \ - ninja-build \ - file \ - curl \ - ca-certificates \ - python3 \ - git \ - cmake \ - libssl-dev \ - sudo \ - xz-utils \ - pkg-config \ - unzip \ - && rm -rf /var/lib/apt/lists/* + build-essential \ + clang-15 \ + g++ \ + make \ + ninja-build \ + file \ + curl \ + ca-certificates \ + python3 \ + git \ + cmake \ + libssl-dev \ + sudo \ + xz-utils \ + pkg-config \ + unzip \ + && rm -rf /var/lib/apt/lists/* # Duplicated in dist-various-2 Dockerfile. ENV \ @@ -40,10 +40,10 @@ RUN /tmp/build-fuchsia-toolchain.sh ENV CARGO_TARGET_X86_64_UNKNOWN_FUCHSIA_AR="/usr/local/bin/llvm-ar" ENV CARGO_TARGET_X86_64_UNKNOWN_FUCHSIA_RUSTFLAGS="-C panic=abort \ - -C force-unwind-tables=yes \ - -C link-arg=--sysroot=/usr/local/core-linux-amd64-fuchsia-sdk/arch/x64/sysroot \ - -Lnative=/usr/local/core-linux-amd64-fuchsia-sdk/arch/x64/sysroot/lib \ - -Lnative=/usr/local/core-linux-amd64-fuchsia-sdk/arch/x64/lib" + -C force-unwind-tables=yes \ + -C link-arg=--sysroot=/usr/local/core-linux-amd64-fuchsia-sdk/arch/x64/sysroot \ + -Lnative=/usr/local/core-linux-amd64-fuchsia-sdk/arch/x64/sysroot/lib \ + -Lnative=/usr/local/core-linux-amd64-fuchsia-sdk/arch/x64/lib" ENV TARGETS=x86_64-unknown-fuchsia ENV TARGETS=$TARGETS,x86_64-unknown-linux-gnu @@ -61,16 +61,16 @@ ENV CODEGEN_BACKENDS="llvm" ENV NO_DOWNLOAD_CI_RUSTC="1" ENV RUST_CONFIGURE_ARGS="--prefix=$RUST_INSTALL_DIR \ - --sysconfdir=etc \ - --enable-lld \ - --llvm-libunwind=in-tree \ - --enable-extended \ - --disable-docs \ - --set target.x86_64-unknown-fuchsia.cc=/usr/local/bin/clang \ - --set target.x86_64-unknown-fuchsia.cxx=/usr/local/bin/clang++ \ - --set target.x86_64-unknown-fuchsia.ar=/usr/local/bin/llvm-ar \ - --set target.x86_64-unknown-fuchsia.ranlib=/usr/local/bin/llvm-ranlib \ - --set target.x86_64-unknown-fuchsia.linker=/usr/local/bin/ld.lld" + --sysconfdir=etc \ + --enable-lld \ + --llvm-libunwind=in-tree \ + --enable-extended \ + --disable-docs \ + --set target.x86_64-unknown-fuchsia.cc=/usr/local/bin/clang \ + --set target.x86_64-unknown-fuchsia.cxx=/usr/local/bin/clang++ \ + --set target.x86_64-unknown-fuchsia.ar=/usr/local/bin/llvm-ar \ + --set target.x86_64-unknown-fuchsia.ranlib=/usr/local/bin/llvm-ranlib \ + --set target.x86_64-unknown-fuchsia.linker=/usr/local/bin/ld.lld" ENV SCRIPT="python3 ../x.py install --target $TARGETS compiler/rustc library/std clippy && \ bash ../src/ci/docker/host-x86_64/x86_64-fuchsia/build-fuchsia.sh" diff --git a/src/ci/docker/host-x86_64/x86_64-gnu-aux/Dockerfile b/src/ci/docker/host-x86_64/x86_64-gnu-aux/Dockerfile index 95ddaab7f44b5..965bee2e32fe1 100644 --- a/src/ci/docker/host-x86_64/x86_64-gnu-aux/Dockerfile +++ b/src/ci/docker/host-x86_64/x86_64-gnu-aux/Dockerfile @@ -2,25 +2,25 @@ FROM ghcr.io/rust-lang/ubuntu:24.04 ARG DEBIAN_FRONTEND=noninteractive RUN apt-get update && apt-get install -y --no-install-recommends \ - g++ \ - make \ - ninja-build \ - file \ - curl \ - ca-certificates \ - python3 \ - git \ - cmake \ - libssl-dev \ - sudo \ - xz-utils \ - pkg-config \ - libgl1-mesa-dev \ - llvm-dev \ - libfreetype6-dev \ - libexpat1-dev \ - tidy \ - && rm -rf /var/lib/apt/lists/* + g++ \ + make \ + ninja-build \ + file \ + curl \ + ca-certificates \ + python3 \ + git \ + cmake \ + libssl-dev \ + sudo \ + xz-utils \ + pkg-config \ + libgl1-mesa-dev \ + llvm-dev \ + libfreetype6-dev \ + libexpat1-dev \ + tidy \ + && rm -rf /var/lib/apt/lists/* COPY scripts/sccache.sh /scripts/ RUN sh /scripts/sccache.sh diff --git a/src/ci/docker/host-x86_64/x86_64-gnu-debug/Dockerfile b/src/ci/docker/host-x86_64/x86_64-gnu-debug/Dockerfile index 5287d6b8956ff..fca739c8c4878 100644 --- a/src/ci/docker/host-x86_64/x86_64-gnu-debug/Dockerfile +++ b/src/ci/docker/host-x86_64/x86_64-gnu-debug/Dockerfile @@ -2,29 +2,29 @@ FROM ubuntu:22.04 ARG DEBIAN_FRONTEND=noninteractive RUN apt-get update && apt-get install -y --no-install-recommends \ - g++ \ - make \ - ninja-build \ - file \ - curl \ - ca-certificates \ - python3 \ - python3-dev \ - libxml2-dev \ - libncurses-dev \ - libedit-dev \ - swig \ - doxygen \ - git \ - cmake \ - sudo \ - gdb \ - libssl-dev \ - pkg-config \ - xz-utils \ - lld \ - clang \ - && rm -rf /var/lib/apt/lists/* + g++ \ + make \ + ninja-build \ + file \ + curl \ + ca-certificates \ + python3 \ + python3-dev \ + libxml2-dev \ + libncurses-dev \ + libedit-dev \ + swig \ + doxygen \ + git \ + cmake \ + sudo \ + gdb \ + libssl-dev \ + pkg-config \ + xz-utils \ + lld \ + clang \ + && rm -rf /var/lib/apt/lists/* COPY scripts/sccache.sh /scripts/ RUN sh /scripts/sccache.sh @@ -35,13 +35,13 @@ ENV RUSTBUILD_FORCE_CLANG_BASED_TESTS="1" ENV NO_DOWNLOAD_CI_LLVM="1" ENV RUST_CONFIGURE_ARGS="--build=x86_64-unknown-linux-gnu \ - --enable-debug \ - --enable-lld \ - --set rust.debuginfo-level-tests=2 \ - --set llvm.use-linker=lld \ - --set target.x86_64-unknown-linux-gnu.linker=clang \ - --set target.x86_64-unknown-linux-gnu.cc=clang \ - --set target.x86_64-unknown-linux-gnu.cxx=clang++" + --enable-debug \ + --enable-lld \ + --set rust.debuginfo-level-tests=2 \ + --set llvm.use-linker=lld \ + --set target.x86_64-unknown-linux-gnu.linker=clang \ + --set target.x86_64-unknown-linux-gnu.cc=clang \ + --set target.x86_64-unknown-linux-gnu.cxx=clang++" # This job checks: # - That ui tests can be built with `-Cdebuginfo=1` @@ -53,5 +53,5 @@ ENV RUST_CONFIGURE_ARGS="--build=x86_64-unknown-linux-gnu \ # don't run by default unless RUSTBUILD_FORCE_CLANG_BASED_TESTS is set. ENV SCRIPT="python3 ../x.py --stage 2 build && \ - python3 ../x.py --stage 2 test tests/ui && \ - python3 ../x.py --stage 2 test tests/run-make tests/run-make-cargo" + python3 ../x.py --stage 2 test tests/ui && \ + python3 ../x.py --stage 2 test tests/run-make tests/run-make-cargo" diff --git a/src/ci/docker/host-x86_64/x86_64-gnu-distcheck/Dockerfile b/src/ci/docker/host-x86_64/x86_64-gnu-distcheck/Dockerfile index 5ab44df7a8033..1b71661ead869 100644 --- a/src/ci/docker/host-x86_64/x86_64-gnu-distcheck/Dockerfile +++ b/src/ci/docker/host-x86_64/x86_64-gnu-distcheck/Dockerfile @@ -14,21 +14,21 @@ FROM ubuntu:22.04 ARG DEBIAN_FRONTEND=noninteractive RUN apt-get update && apt-get install -y --no-install-recommends \ - g++ \ - make \ - ninja-build \ - file \ - curl \ - ca-certificates \ - python3 \ - git \ - cmake \ - sudo \ - gdb \ - xz-utils \ - libssl-dev \ - pkg-config \ - && rm -rf /var/lib/apt/lists/* + g++ \ + make \ + ninja-build \ + file \ + curl \ + ca-certificates \ + python3 \ + git \ + cmake \ + sudo \ + gdb \ + xz-utils \ + libssl-dev \ + pkg-config \ + && rm -rf /var/lib/apt/lists/* COPY scripts/sccache.sh /scripts/ RUN sh /scripts/sccache.sh diff --git a/src/ci/docker/host-x86_64/x86_64-gnu-gcc-core-tests/Dockerfile b/src/ci/docker/host-x86_64/x86_64-gnu-gcc-core-tests/Dockerfile index 773bd11b9abfb..6089a8ff31884 100644 --- a/src/ci/docker/host-x86_64/x86_64-gnu-gcc-core-tests/Dockerfile +++ b/src/ci/docker/host-x86_64/x86_64-gnu-gcc-core-tests/Dockerfile @@ -5,31 +5,31 @@ FROM ubuntu:22.04 ARG DEBIAN_FRONTEND=noninteractive RUN apt-get update && apt-get install -y --no-install-recommends \ - bzip2 \ - g++ \ - make \ - ninja-build \ - file \ - curl \ - ca-certificates \ - python3 \ - git \ - cmake \ - sudo \ - gdb \ - libssl-dev \ - pkg-config \ - xz-utils \ - mingw-w64 \ - zlib1g-dev \ - libzstd-dev \ - # libgccjit dependencies - flex \ - libmpfr-dev \ - libgmp-dev \ - libmpc3 \ - libmpc-dev \ - && rm -rf /var/lib/apt/lists/* + bzip2 \ + g++ \ + make \ + ninja-build \ + file \ + curl \ + ca-certificates \ + python3 \ + git \ + cmake \ + sudo \ + gdb \ + libssl-dev \ + pkg-config \ + xz-utils \ + mingw-w64 \ + zlib1g-dev \ + libzstd-dev \ + # libgccjit dependencies + flex \ + libmpfr-dev \ + libgmp-dev \ + libmpc3 \ + libmpc-dev \ + && rm -rf /var/lib/apt/lists/* COPY scripts/sccache.sh /scripts/ RUN sh /scripts/sccache.sh @@ -37,10 +37,10 @@ RUN sh /scripts/sccache.sh ENV NO_DEBUG_ASSERTIONS="1" ENV RUSTFLAGS="-Cpanic=abort -Zpanic-abort-tests" ENV RUST_CONFIGURE_ARGS="--build=x86_64-unknown-linux-gnu \ - --enable-sanitizers \ - --enable-profiler \ - --enable-compiler-docs \ - --set llvm.libzstd=true" + --enable-sanitizers \ + --enable-profiler \ + --enable-compiler-docs \ + --set llvm.libzstd=true" ENV SCRIPT="python3 ../x.py \ - --stage 1 \ - test library/coretests" + --stage 1 \ + test library/coretests" diff --git a/src/ci/docker/host-x86_64/x86_64-gnu-gcc/Dockerfile b/src/ci/docker/host-x86_64/x86_64-gnu-gcc/Dockerfile index d248faaabca6c..84800d084c3ec 100644 --- a/src/ci/docker/host-x86_64/x86_64-gnu-gcc/Dockerfile +++ b/src/ci/docker/host-x86_64/x86_64-gnu-gcc/Dockerfile @@ -5,50 +5,50 @@ FROM ubuntu:22.04 ARG DEBIAN_FRONTEND=noninteractive RUN apt-get update && apt-get install -y --no-install-recommends \ - bzip2 \ - g++ \ - make \ - ninja-build \ - file \ - curl \ - ca-certificates \ - python3 \ - git \ - cmake \ - sudo \ - gdb \ - libssl-dev \ - pkg-config \ - xz-utils \ - mingw-w64 \ - zlib1g-dev \ - libzstd-dev \ - # libgccjit dependencies - flex \ - libmpfr-dev \ - libgmp-dev \ - libmpc3 \ - libmpc-dev \ - && rm -rf /var/lib/apt/lists/* + bzip2 \ + g++ \ + make \ + ninja-build \ + file \ + curl \ + ca-certificates \ + python3 \ + git \ + cmake \ + sudo \ + gdb \ + libssl-dev \ + pkg-config \ + xz-utils \ + mingw-w64 \ + zlib1g-dev \ + libzstd-dev \ + # libgccjit dependencies + flex \ + libmpfr-dev \ + libgmp-dev \ + libmpc3 \ + libmpc-dev \ + && rm -rf /var/lib/apt/lists/* COPY scripts/sccache.sh /scripts/ RUN sh /scripts/sccache.sh ENV NO_DEBUG_ASSERTIONS="1" ENV RUST_CONFIGURE_ARGS="--build=x86_64-unknown-linux-gnu \ - --enable-sanitizers \ - --enable-profiler \ - --enable-compiler-docs \ - --set llvm.libzstd=true" + --enable-sanitizers \ + --enable-profiler \ + --enable-compiler-docs \ + --set llvm.libzstd=true" ENV SCRIPT="python3 ../x.py \ - --stage 2 \ - test tests \ - --test-codegen-backend gcc \ - --skip tests/coverage \ - --skip tests/coverage-run-rustdoc \ - --skip tests/rustdoc-html \ - --skip tests/rustdoc-gui \ - --skip tests/rustdoc-js \ - --skip tests/rustdoc-js-std \ - --skip tests/rustdoc-json \ - --skip tests/rustdoc-ui" + --stage 2 \ + test tests \ + --test-codegen-backend gcc \ + --skip tests/coverage \ + --skip tests/coverage-run-rustdoc \ + --skip tests/rustdoc-html \ + --skip tests/rustdoc-gui \ + --skip tests/rustdoc-js \ + --skip tests/rustdoc-js-std \ + --skip tests/rustdoc-json \ + --skip tests/rustdoc-ui" diff --git a/src/ci/docker/host-x86_64/x86_64-gnu-llvm-21/Dockerfile b/src/ci/docker/host-x86_64/x86_64-gnu-llvm-21/Dockerfile index fc96735521077..7729480b6c31d 100644 --- a/src/ci/docker/host-x86_64/x86_64-gnu-llvm-21/Dockerfile +++ b/src/ci/docker/host-x86_64/x86_64-gnu-llvm-21/Dockerfile @@ -3,35 +3,35 @@ FROM ubuntu:25.10 ARG DEBIAN_FRONTEND=noninteractive RUN apt-get update && apt-get install -y --no-install-recommends \ - bzip2 \ - g++ \ - gcc-multilib \ - make \ - ninja-build \ - file \ - curl \ - ca-certificates \ - python3 \ - git \ - cmake \ - sudo \ - gdb \ - llvm-21-tools \ - llvm-21-dev \ - libedit-dev \ - libssl-dev \ - pkg-config \ - zlib1g-dev \ - xz-utils \ - nodejs \ - mingw-w64 \ - # libgccjit dependencies - flex \ - libmpfr-dev \ - libgmp-dev \ - libmpc3 \ - libmpc-dev \ - && rm -rf /var/lib/apt/lists/* + bzip2 \ + g++ \ + gcc-multilib \ + make \ + ninja-build \ + file \ + curl \ + ca-certificates \ + python3 \ + git \ + cmake \ + sudo \ + gdb \ + llvm-21-tools \ + llvm-21-dev \ + libedit-dev \ + libssl-dev \ + pkg-config \ + zlib1g-dev \ + xz-utils \ + nodejs \ + mingw-w64 \ + # libgccjit dependencies + flex \ + libmpfr-dev \ + libgmp-dev \ + libmpc3 \ + libmpc-dev \ + && rm -rf /var/lib/apt/lists/* # Install powershell (universal package) so we can test x.ps1 on Linux # FIXME: need a "universal" version that supports libicu74, but for now it still works to ignore that dep. @@ -49,10 +49,10 @@ ENV EXTERNAL_LLVM="1" # Using llvm-link-shared due to libffi issues -- see #34486 ENV RUST_CONFIGURE_ARGS="--build=x86_64-unknown-linux-gnu \ - --llvm-root=/usr/lib/llvm-21 \ - --enable-llvm-link-shared \ - --set rust.randomize-layout=true \ - --set rust.thin-lto-import-instr-limit=10" + --llvm-root=/usr/lib/llvm-21 \ + --enable-llvm-link-shared \ + --set rust.randomize-layout=true \ + --set rust.thin-lto-import-instr-limit=10" COPY scripts/shared.sh /scripts/ diff --git a/src/ci/docker/host-x86_64/x86_64-gnu-llvm-22/Dockerfile b/src/ci/docker/host-x86_64/x86_64-gnu-llvm-22/Dockerfile index a22e8de90804f..1af08cd82a5c8 100644 --- a/src/ci/docker/host-x86_64/x86_64-gnu-llvm-22/Dockerfile +++ b/src/ci/docker/host-x86_64/x86_64-gnu-llvm-22/Dockerfile @@ -3,35 +3,35 @@ FROM ubuntu:26.04 ARG DEBIAN_FRONTEND=noninteractive RUN apt-get update && apt-get install -y --no-install-recommends \ - bzip2 \ - g++ \ - gcc-multilib \ - make \ - ninja-build \ - file \ - curl \ - ca-certificates \ - python3 \ - git \ - cmake \ - sudo \ - gdb \ - llvm-22-tools \ - llvm-22-dev \ - libedit-dev \ - libssl-dev \ - pkg-config \ - zlib1g-dev \ - xz-utils \ - nodejs \ - mingw-w64 \ - # libgccjit dependencies - flex \ - libmpfr-dev \ - libgmp-dev \ - libmpc3 \ - libmpc-dev \ - && rm -rf /var/lib/apt/lists/* + bzip2 \ + g++ \ + gcc-multilib \ + make \ + ninja-build \ + file \ + curl \ + ca-certificates \ + python3 \ + git \ + cmake \ + sudo \ + gdb \ + llvm-22-tools \ + llvm-22-dev \ + libedit-dev \ + libssl-dev \ + pkg-config \ + zlib1g-dev \ + xz-utils \ + nodejs \ + mingw-w64 \ + # libgccjit dependencies + flex \ + libmpfr-dev \ + libgmp-dev \ + libmpc3 \ + libmpc-dev \ + && rm -rf /var/lib/apt/lists/* # Install powershell (universal package) so we can test x.ps1 on Linux # FIXME: need a "universal" version that supports libicu74, but for now it still works to ignore that dep. @@ -49,11 +49,11 @@ ENV EXTERNAL_LLVM 1 # Using llvm-link-shared due to libffi issues -- see #34486 ENV RUST_CONFIGURE_ARGS \ - --build=x86_64-unknown-linux-gnu \ - --llvm-root=/usr/lib/llvm-22 \ - --enable-llvm-link-shared \ - --set rust.randomize-layout=true \ - --set rust.thin-lto-import-instr-limit=10 + --build=x86_64-unknown-linux-gnu \ + --llvm-root=/usr/lib/llvm-22 \ + --enable-llvm-link-shared \ + --set rust.randomize-layout=true \ + --set rust.thin-lto-import-instr-limit=10 COPY scripts/shared.sh /scripts/ diff --git a/src/ci/docker/host-x86_64/x86_64-gnu-miri/Dockerfile b/src/ci/docker/host-x86_64/x86_64-gnu-miri/Dockerfile index e478b80044215..4f3933db051af 100644 --- a/src/ci/docker/host-x86_64/x86_64-gnu-miri/Dockerfile +++ b/src/ci/docker/host-x86_64/x86_64-gnu-miri/Dockerfile @@ -2,29 +2,29 @@ FROM ghcr.io/rust-lang/ubuntu:24.04 ARG DEBIAN_FRONTEND=noninteractive RUN apt-get update && apt-get install -y --no-install-recommends \ - g++ \ - make \ - ninja-build \ - file \ - curl \ - ca-certificates \ - python3 \ - git \ - cmake \ - libssl-dev \ - sudo \ - xz-utils \ - tidy \ - \ - libc6 \ - wget \ - # libgccjit dependencies - flex \ - libmpfr-dev \ - libgmp-dev \ - libmpc3 \ - libmpc-dev \ - && rm -rf /var/lib/apt/lists/* + g++ \ + make \ + ninja-build \ + file \ + curl \ + ca-certificates \ + python3 \ + git \ + cmake \ + libssl-dev \ + sudo \ + xz-utils \ + tidy \ + \ + libc6 \ + wget \ + # libgccjit dependencies + flex \ + libmpfr-dev \ + libgmp-dev \ + libmpc3 \ + libmpc-dev \ + && rm -rf /var/lib/apt/lists/* COPY scripts/sccache.sh /scripts/ RUN sh /scripts/sccache.sh @@ -35,7 +35,7 @@ ENV GCC_EXEC_PREFIX="/usr/lib/gcc/" COPY host-x86_64/x86_64-gnu-miri/check-miri.sh /tmp/ ENV RUST_CONFIGURE_ARGS="--build=x86_64-unknown-linux-gnu \ - --enable-new-symbol-mangling" + --enable-new-symbol-mangling" ENV HOST_TARGET="x86_64-unknown-linux-gnu" diff --git a/src/ci/docker/host-x86_64/x86_64-gnu-next-trait-solver-polonius/Dockerfile b/src/ci/docker/host-x86_64/x86_64-gnu-next-trait-solver-polonius/Dockerfile index 4198092640bfb..1ba3c776f34c0 100644 --- a/src/ci/docker/host-x86_64/x86_64-gnu-next-trait-solver-polonius/Dockerfile +++ b/src/ci/docker/host-x86_64/x86_64-gnu-next-trait-solver-polonius/Dockerfile @@ -2,22 +2,22 @@ FROM ubuntu:22.04 ARG DEBIAN_FRONTEND=noninteractive RUN apt-get update && apt-get install -y --no-install-recommends \ - g++ \ - make \ - ninja-build \ - file \ - curl \ - ca-certificates \ - python3 \ - git \ - cmake \ - sudo \ - gdb \ - libssl-dev \ - pkg-config \ - xz-utils \ - mingw-w64 \ - zlib1g-dev \ + g++ \ + make \ + ninja-build \ + file \ + curl \ + ca-certificates \ + python3 \ + git \ + cmake \ + sudo \ + gdb \ + libssl-dev \ + pkg-config \ + xz-utils \ + mingw-w64 \ + zlib1g-dev \ && rm -rf /var/lib/apt/lists/* COPY scripts/sccache.sh /scripts/ diff --git a/src/ci/docker/host-x86_64/x86_64-gnu-nopt/Dockerfile b/src/ci/docker/host-x86_64/x86_64-gnu-nopt/Dockerfile index 6020dc8877c16..e4adc84b7865a 100644 --- a/src/ci/docker/host-x86_64/x86_64-gnu-nopt/Dockerfile +++ b/src/ci/docker/host-x86_64/x86_64-gnu-nopt/Dockerfile @@ -3,27 +3,27 @@ FROM ubuntu:22.04 # Avoid interactive prompts while installing `tzdata` dependency with `DEBIAN_FRONTEND`. ARG DEBIAN_FRONTEND=noninteractive RUN apt-get update && apt-get install -y --no-install-recommends \ - g++ \ - make \ - ninja-build \ - file \ - curl \ - ca-certificates \ - python3 \ - git \ - cmake \ - sudo \ - gdb \ - libssl-dev \ - pkg-config \ - xz-utils \ - && rm -rf /var/lib/apt/lists/* + g++ \ + make \ + ninja-build \ + file \ + curl \ + ca-certificates \ + python3 \ + git \ + cmake \ + sudo \ + gdb \ + libssl-dev \ + pkg-config \ + xz-utils \ + && rm -rf /var/lib/apt/lists/* COPY scripts/sccache.sh /scripts/ RUN sh /scripts/sccache.sh ENV RUST_CONFIGURE_ARGS="--build=x86_64-unknown-linux-gnu \ - --disable-optimize-tests \ - --set rust.test-compare-mode" + --disable-optimize-tests \ + --set rust.test-compare-mode" ENV SCRIPT="python3 ../x.py test --stage 1 --set rust.optimize=false library/std \ - && python3 ../x.py --stage 2 test" + && python3 ../x.py --stage 2 test" diff --git a/src/ci/docker/host-x86_64/x86_64-gnu-tools/Dockerfile b/src/ci/docker/host-x86_64/x86_64-gnu-tools/Dockerfile index f007024485b8b..4466573e1cfc1 100644 --- a/src/ci/docker/host-x86_64/x86_64-gnu-tools/Dockerfile +++ b/src/ci/docker/host-x86_64/x86_64-gnu-tools/Dockerfile @@ -2,68 +2,68 @@ FROM ghcr.io/rust-lang/ubuntu:22.04 ARG DEBIAN_FRONTEND=noninteractive RUN apt-get update && apt-get install -y --no-install-recommends \ - g++ \ - make \ - ninja-build \ - file \ - curl \ - ca-certificates \ - python3 \ - git \ - cmake \ - libssl-dev \ - sudo \ - xz-utils \ - tidy \ - \ + g++ \ + make \ + ninja-build \ + file \ + curl \ + ca-certificates \ + python3 \ + git \ + cmake \ + libssl-dev \ + sudo \ + xz-utils \ + tidy \ + \ # Install dependencies for chromium browser - gconf-service \ - libasound2 \ - libatk1.0-0 \ - libatk-bridge2.0-0 \ - libc6 \ - libcairo2 \ - libcups2 \ - libdbus-1-3 \ - libexpat1 \ - libfontconfig1 \ - libgbm1 \ - libgcc1 \ - libgconf-2-4 \ - libgdk-pixbuf2.0-0 \ - libglib2.0-0 \ - libgtk-3-0 \ - libnspr4 \ - libpango-1.0-0 \ - libpangocairo-1.0-0 \ - libstdc++6 \ - libx11-6 \ - libx11-xcb1 \ - libxcb1 \ - libxcomposite1 \ - libxcursor1 \ - libxdamage1 \ - libxext6 \ - libxfixes3 \ - libxi6 \ - libxrandr2 \ - libxrender1 \ - libxss1 \ - libxtst6 \ - fonts-liberation \ - libappindicator1 \ - libnss3 \ - lsb-release \ - xdg-utils \ - wget \ - unzip \ - # libgccjit dependencies - flex \ - libmpfr-dev \ - libgmp-dev \ - libmpc3 \ - libmpc-dev \ - && rm -rf /var/lib/apt/lists/* + gconf-service \ + libasound2 \ + libatk1.0-0 \ + libatk-bridge2.0-0 \ + libc6 \ + libcairo2 \ + libcups2 \ + libdbus-1-3 \ + libexpat1 \ + libfontconfig1 \ + libgbm1 \ + libgcc1 \ + libgconf-2-4 \ + libgdk-pixbuf2.0-0 \ + libglib2.0-0 \ + libgtk-3-0 \ + libnspr4 \ + libpango-1.0-0 \ + libpangocairo-1.0-0 \ + libstdc++6 \ + libx11-6 \ + libx11-xcb1 \ + libxcb1 \ + libxcomposite1 \ + libxcursor1 \ + libxdamage1 \ + libxext6 \ + libxfixes3 \ + libxi6 \ + libxrandr2 \ + libxrender1 \ + libxss1 \ + libxtst6 \ + fonts-liberation \ + libappindicator1 \ + libnss3 \ + lsb-release \ + xdg-utils \ + wget \ + unzip \ + # libgccjit dependencies + flex \ + libmpfr-dev \ + libgmp-dev \ + libmpc3 \ + libmpc-dev \ + && rm -rf /var/lib/apt/lists/* COPY scripts/sccache.sh /scripts/ RUN sh /scripts/sccache.sh @@ -88,8 +88,8 @@ RUN sh /scripts/nodejs.sh /node ENV PATH="/node/bin:${PATH}" ENV RUST_CONFIGURE_ARGS="--build=x86_64-unknown-linux-gnu \ - --save-toolstates=/tmp/toolstate/toolstates.json \ - --enable-new-symbol-mangling" + --save-toolstates=/tmp/toolstate/toolstates.json \ + --enable-new-symbol-mangling" ENV HOST_TARGET="x86_64-unknown-linux-gnu" @@ -100,4 +100,4 @@ ENV HOST_TARGET="x86_64-unknown-linux-gnu" COPY scripts/shared.sh /scripts/ ENV SCRIPT="/tmp/checktools.sh ../x.py && \ - python3 ../x.py test tests/rustdoc-gui --stage 2 --test-args '--jobs 1'" + python3 ../x.py test tests/rustdoc-gui --stage 2 --test-args '--jobs 1'" diff --git a/src/ci/docker/host-x86_64/x86_64-gnu/Dockerfile b/src/ci/docker/host-x86_64/x86_64-gnu/Dockerfile index 207dbed681faa..a60ab4a53d95f 100644 --- a/src/ci/docker/host-x86_64/x86_64-gnu/Dockerfile +++ b/src/ci/docker/host-x86_64/x86_64-gnu/Dockerfile @@ -2,38 +2,38 @@ FROM ubuntu:26.04 ARG DEBIAN_FRONTEND=noninteractive RUN apt-get update && apt-get install -y --no-install-recommends \ - g++ \ - make \ - ninja-build \ - file \ - curl \ - ca-certificates \ - python3 \ - git \ - cmake \ - sudo \ - gdb \ - libssl-dev \ - pkg-config \ - xz-utils \ - mingw-w64 \ - zlib1g-dev \ - libzstd-dev \ - && rm -rf /var/lib/apt/lists/* + g++ \ + make \ + ninja-build \ + file \ + curl \ + ca-certificates \ + python3 \ + git \ + cmake \ + sudo \ + gdb \ + libssl-dev \ + pkg-config \ + xz-utils \ + mingw-w64 \ + zlib1g-dev \ + libzstd-dev \ + && rm -rf /var/lib/apt/lists/* # Install Intel SDE for AVX-512 emulation RUN curl -L http://ci-mirrors.rust-lang.org/sde-external-10.8.0-2026-03-15-lin.tar.xz -o /tmp/sde.tar.xz \ - && mkdir -p /intel-sde \ - && tar -xJf /tmp/sde.tar.xz --strip-components=1 -C /intel-sde \ - && rm /tmp/sde.tar.xz + && mkdir -p /intel-sde \ + && tar -xJf /tmp/sde.tar.xz --strip-components=1 -C /intel-sde \ + && rm /tmp/sde.tar.xz COPY scripts/sccache.sh /scripts/ RUN sh /scripts/sccache.sh ENV RUST_CONFIGURE_ARGS="--build=x86_64-unknown-linux-gnu \ - --enable-sanitizers \ - --enable-profiler \ - --enable-compiler-docs \ - --set llvm.libzstd=true" + --enable-sanitizers \ + --enable-profiler \ + --enable-compiler-docs \ + --set llvm.libzstd=true" ENV SCRIPT="python3 ../x.py --stage 2 test && \ - python3 ../x.py --stage 2 test library/stdarch/crates/intrinsic-test" \ No newline at end of file + python3 ../x.py --stage 2 test library/stdarch/crates/intrinsic-test" diff --git a/src/ci/docker/host-x86_64/x86_64-rust-for-linux/Dockerfile b/src/ci/docker/host-x86_64/x86_64-rust-for-linux/Dockerfile index 28a51ca2d6857..f19fe33c679d3 100644 --- a/src/ci/docker/host-x86_64/x86_64-rust-for-linux/Dockerfile +++ b/src/ci/docker/host-x86_64/x86_64-rust-for-linux/Dockerfile @@ -5,28 +5,28 @@ ARG DEBIAN_FRONTEND=noninteractive # libclang1 is required for libclang.so, required by bindgen # clang, llvm and lld is required by RfL to compile host code RUN apt-get update && apt-get install -y --no-install-recommends \ - g++ \ - make \ - ninja-build \ - file \ - curl \ - ca-certificates \ - python3 \ - git \ - cmake \ - flex \ - bison \ - bc \ - clang-15 \ - libclang1-15 \ - llvm-15 \ - lld-15 \ - libelf-dev \ - libedit-dev \ - libssl-dev \ - pkg-config \ - zlib1g-dev \ - && rm -rf /var/lib/apt/lists/* + g++ \ + make \ + ninja-build \ + file \ + curl \ + ca-certificates \ + python3 \ + git \ + cmake \ + flex \ + bison \ + bc \ + clang-15 \ + libclang1-15 \ + llvm-15 \ + lld-15 \ + libelf-dev \ + libedit-dev \ + libssl-dev \ + pkg-config \ + zlib1g-dev \ + && rm -rf /var/lib/apt/lists/* COPY scripts/sccache.sh /scripts/ RUN sh /scripts/sccache.sh From 2d0d28b3480001ab95379171f56d01521e2d686d Mon Sep 17 00:00:00 2001 From: Michael Baumgartner Date: Sun, 28 Jun 2026 10:11:39 +0200 Subject: [PATCH 16/29] Ignore EditorConfig violations with mixed format In several file types the mixing of different formats (mostly indent_size) seems to be intentional. --- .ecformat_ignore | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/.ecformat_ignore b/.ecformat_ignore index d9e9d6e8643c0..8225cbb3c069e 100644 --- a/.ecformat_ignore +++ b/.ecformat_ignore @@ -54,3 +54,30 @@ tests/ui/parser/bad-char-literals.rs # Test file with CR line ending inside string tests/ui/parser/raw/raw-byte-string-literals.rs tests/ui/parser/trailing-carriage-return-in-string.rs + +# File types with a mixed formatting which is perhaps intentional. +# Disabling only check for some properties (like indent_size) is currently not supported. + +# There are different languages in these files (for example css and xml in svg files) +*.diff +*.svg +src/ci/docker/host-x86_64/disabled/dist-x86_64-dragonfly/patch-toolchain +# Often mixed indentation for example due to alignment with previous line +*.coverage +*.css +*.fixed +*.goml +*.js +*.ld +*.py +*.stderr +*.stdout +*.ts +*.wxs +tests/run-make/linker-warning/*.txt +tests/run-make/macos-deployment-target-warning/*.txt +# The first { in these files is always indented with one space +*.mir +# Alignment and some test files without final newline +*.html +*.html.template From f337fab7fa6761a4489848a43b89c5118435b253 Mon Sep 17 00:00:00 2001 From: Michael Baumgartner Date: Sun, 28 Jun 2026 10:23:32 +0200 Subject: [PATCH 17/29] Harmonize indentations in Cargo.toml files All other Cargo.toml files already use 4 spaces for indentation. --- Cargo.toml | 102 ++++++++++---------- library/Cargo.toml | 14 +-- library/rustc-std-workspace-core/Cargo.toml | 2 +- library/unwind/Cargo.toml | 2 +- 4 files changed, 60 insertions(+), 60 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 67c7a9d67edc8..062659cab5b51 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,61 +2,61 @@ resolver = "2" members = [ # tidy-alphabetical-start - "compiler/rustc", - "src/build_helper", - "src/rustc-std-workspace/rustc-std-workspace-alloc", - "src/rustc-std-workspace/rustc-std-workspace-core", - "src/rustc-std-workspace/rustc-std-workspace-std", - "src/rustdoc-json-types", - "src/tools/build-manifest", - "src/tools/bump-stage0", - "src/tools/cargotest", - "src/tools/clippy", - "src/tools/clippy/clippy_dev", - "src/tools/collect-license-metadata", - "src/tools/compiletest", - "src/tools/coverage-dump", - "src/tools/features-status-dump", - "src/tools/generate-copyright", - "src/tools/generate-windows-sys", - "src/tools/html-checker", - "src/tools/jsondocck", - "src/tools/jsondoclint", - "src/tools/linkchecker", - "src/tools/lint-docs", - "src/tools/lld-wrapper", - "src/tools/llvm-bitcode-linker", - "src/tools/miri", - "src/tools/miri/cargo-miri", - "src/tools/miropt-test-tools", - "src/tools/opt-dist", - "src/tools/remote-test-client", - "src/tools/remote-test-server", - "src/tools/replace-version-placeholder", - "src/tools/run-make-support", - "src/tools/rust-installer", - "src/tools/rustdoc", - "src/tools/rustdoc-gui-test", - "src/tools/rustdoc-themes", - "src/tools/rustfmt", - "src/tools/test-float-parse", - "src/tools/tidy", - "src/tools/tier-check", - "src/tools/unicode-table-generator", - "src/tools/unstable-book-gen", - "src/tools/wasm-component-ld", - "src/tools/x", + "compiler/rustc", + "src/build_helper", + "src/rustc-std-workspace/rustc-std-workspace-alloc", + "src/rustc-std-workspace/rustc-std-workspace-core", + "src/rustc-std-workspace/rustc-std-workspace-std", + "src/rustdoc-json-types", + "src/tools/build-manifest", + "src/tools/bump-stage0", + "src/tools/cargotest", + "src/tools/clippy", + "src/tools/clippy/clippy_dev", + "src/tools/collect-license-metadata", + "src/tools/compiletest", + "src/tools/coverage-dump", + "src/tools/features-status-dump", + "src/tools/generate-copyright", + "src/tools/generate-windows-sys", + "src/tools/html-checker", + "src/tools/jsondocck", + "src/tools/jsondoclint", + "src/tools/linkchecker", + "src/tools/lint-docs", + "src/tools/lld-wrapper", + "src/tools/llvm-bitcode-linker", + "src/tools/miri", + "src/tools/miri/cargo-miri", + "src/tools/miropt-test-tools", + "src/tools/opt-dist", + "src/tools/remote-test-client", + "src/tools/remote-test-server", + "src/tools/replace-version-placeholder", + "src/tools/run-make-support", + "src/tools/rust-installer", + "src/tools/rustdoc", + "src/tools/rustdoc-gui-test", + "src/tools/rustdoc-themes", + "src/tools/rustfmt", + "src/tools/test-float-parse", + "src/tools/tidy", + "src/tools/tier-check", + "src/tools/unicode-table-generator", + "src/tools/unstable-book-gen", + "src/tools/wasm-component-ld", + "src/tools/x", # tidy-alphabetical-end ] exclude = [ - "build", - "compiler/rustc_codegen_cranelift", - "compiler/rustc_codegen_gcc", - "src/bootstrap", - "tests/rustdoc-gui", - # HACK(eddyb) This hardcodes the fact that our CI uses `/checkout/obj`. - "obj", + "build", + "compiler/rustc_codegen_cranelift", + "compiler/rustc_codegen_gcc", + "src/bootstrap", + "tests/rustdoc-gui", + # HACK(eddyb) This hardcodes the fact that our CI uses `/checkout/obj`. + "obj", ] [profile.release.package.rustc_thread_pool] diff --git a/library/Cargo.toml b/library/Cargo.toml index 788c990c16344..14e679c3d4fd4 100644 --- a/library/Cargo.toml +++ b/library/Cargo.toml @@ -3,16 +3,16 @@ cargo-features = ["profile-rustflags"] [workspace] resolver = "1" members = [ - "std", - "sysroot", - "coretests", - "alloctests", + "std", + "sysroot", + "coretests", + "alloctests", ] exclude = [ - # stdarch has its own Cargo workspace - "stdarch", - "windows_link" + # stdarch has its own Cargo workspace + "stdarch", + "windows_link" ] [profile.release.package.compiler_builtins] diff --git a/library/rustc-std-workspace-core/Cargo.toml b/library/rustc-std-workspace-core/Cargo.toml index d68965c634578..815a0f859b474 100644 --- a/library/rustc-std-workspace-core/Cargo.toml +++ b/library/rustc-std-workspace-core/Cargo.toml @@ -18,5 +18,5 @@ doc = false [dependencies] core = { path = "../core", public = true } compiler_builtins = { path = "../compiler-builtins/compiler-builtins", features = [ - "compiler-builtins", + "compiler-builtins", ] } diff --git a/library/unwind/Cargo.toml b/library/unwind/Cargo.toml index 1293c469d11c1..37a0a5803db19 100644 --- a/library/unwind/Cargo.toml +++ b/library/unwind/Cargo.toml @@ -5,7 +5,7 @@ license = "MIT OR Apache-2.0" repository = "https://github.com/rust-lang/rust.git" edition = "2024" include = [ - '/libunwind/*', + '/libunwind/*', ] [lib] From ffcf0bab35b58390c4c4c316d7eb9eba1f01ea66 Mon Sep 17 00:00:00 2001 From: Michael Baumgartner Date: Sun, 28 Jun 2026 11:09:54 +0200 Subject: [PATCH 18/29] Ignore EditorConfig violations in C and C++ code There is often alignment which "breaks" the indentation rules. Furthermore, some files use 4 spaces and some 2 spaces, but these indentation errors cannot be separated from the alignments. --- .ecformat_ignore | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.ecformat_ignore b/.ecformat_ignore index 8225cbb3c069e..4146e70eab68e 100644 --- a/.ecformat_ignore +++ b/.ecformat_ignore @@ -63,10 +63,13 @@ tests/ui/parser/trailing-carriage-return-in-string.rs *.svg src/ci/docker/host-x86_64/disabled/dist-x86_64-dragonfly/patch-toolchain # Often mixed indentation for example due to alignment with previous line +*.c *.coverage +*.cpp *.css *.fixed *.goml +*.h *.js *.ld *.py From 928494f73098153791c0ae30a761eb8c81f75ff1 Mon Sep 17 00:00:00 2001 From: Michael Baumgartner Date: Sun, 28 Jun 2026 11:13:11 +0200 Subject: [PATCH 19/29] Fix EditorConfig for nix files All three nix file use 2 spaces for indentation. --- .editorconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.editorconfig b/.editorconfig index 3e18d0f5ba2db..3fac95bd97c77 100644 --- a/.editorconfig +++ b/.editorconfig @@ -53,7 +53,7 @@ trim_trailing_whitespace = false # Therefore, pressing tab should insert a single space to encourage situative accurate indentations. indent_size = 1 -[*.{json,json5,yml,yaml,natvis}] +[*.{json,json5,yml,yaml,natvis,nix}] indent_size = 2 # You should NOT modify these files with your editor, From e0a70653becd4ef85453a80f618cea1aeb777c6a Mon Sep 17 00:00:00 2001 From: Michael Baumgartner Date: Sun, 28 Jun 2026 12:01:47 +0200 Subject: [PATCH 20/29] Harmonize indentations in shell scripts The most shell scripts use 4 spaces for indentation. The set of scripts using (only) 2 spaces is smaller. --- .ecformat_ignore | 6 + .../dist-x86_64-dragonfly/build-toolchain.sh | 46 +-- .../dist-x86_64-haiku/build-toolchain.sh | 20 +- .../dist-various-1/install-emscripten.sh | 4 +- .../host-x86_64/dist-x86_64-linux/dist.sh | 4 +- .../build-netbsd-toolchain.sh | 46 +-- .../host-x86_64/x86_64-gnu-miri/check-miri.sh | 58 ++-- src/ci/docker/run.sh | 194 ++++++------ src/ci/docker/scripts/android-base-apt-get.sh | 30 +- src/ci/docker/scripts/build-clang.sh | 38 +-- .../docker/scripts/build-fuchsia-toolchain.sh | 66 ++--- src/ci/docker/scripts/build-zstd.sh | 20 +- src/ci/docker/scripts/cmake.sh | 20 +- src/ci/docker/scripts/cross-apt-packages.sh | 56 ++-- src/ci/docker/scripts/crosstool-ng-build.sh | 20 +- src/ci/docker/scripts/freebsd-toolchain.sh | 36 +-- src/ci/docker/scripts/musl-toolchain.sh | 20 +- src/ci/docker/scripts/musl.sh | 76 ++--- .../aarch64-unknown-linux-ohos-clang++.sh | 8 +- .../ohos/aarch64-unknown-linux-ohos-clang.sh | 8 +- .../ohos/armv7-unknown-linux-ohos-clang++.sh | 16 +- .../ohos/armv7-unknown-linux-ohos-clang.sh | 16 +- .../ohos/x86_64-unknown-linux-ohos-clang++.sh | 8 +- .../ohos/x86_64-unknown-linux-ohos-clang.sh | 8 +- src/ci/docker/scripts/rfl-build.sh | 6 +- src/ci/docker/scripts/shared.sh | 100 +++---- src/ci/docker/scripts/stage_2_test_set1.sh | 10 +- src/ci/docker/scripts/stage_2_test_set2.sh | 22 +- src/ci/run.sh | 280 +++++++++--------- src/ci/scripts/checkout-submodules.sh | 12 +- src/ci/scripts/install-sccache.sh | 4 +- src/ci/scripts/upload-artifacts.sh | 18 +- src/ci/scripts/verify-backported-commits.sh | 124 ++++---- src/ci/shared.sh | 30 +- src/tools/cherry-pick.sh | 32 +- 35 files changed, 734 insertions(+), 728 deletions(-) diff --git a/.ecformat_ignore b/.ecformat_ignore index 4146e70eab68e..1c6e7999986df 100644 --- a/.ecformat_ignore +++ b/.ecformat_ignore @@ -84,3 +84,9 @@ tests/run-make/macos-deployment-target-warning/*.txt # Alignment and some test files without final newline *.html *.html.template +# Shell scripts with the content of patches inlines +src/ci/docker/scripts/musl.sh +src/ci/docker/scripts/solaris-toolchain.sh +# Shell scripts with alignments with previous line +src/ci/docker/host-x86_64/disabled/dist-x86_64-haiku/llvm-config.sh +src/etc/pre-push.sh diff --git a/src/ci/docker/host-x86_64/disabled/dist-x86_64-dragonfly/build-toolchain.sh b/src/ci/docker/host-x86_64/disabled/dist-x86_64-dragonfly/build-toolchain.sh index b305f358c5a76..0242de8c04113 100755 --- a/src/ci/docker/host-x86_64/disabled/dist-x86_64-dragonfly/build-toolchain.sh +++ b/src/ci/docker/host-x86_64/disabled/dist-x86_64-dragonfly/build-toolchain.sh @@ -8,19 +8,19 @@ BINUTILS=2.25.1 GCC=6.4.0 hide_output() { - set +x - on_err=" + set +x + on_err=" echo ERROR: An error was encountered with the build. cat /tmp/build.log exit 1 " - trap "$on_err" ERR - bash -c "while true; do sleep 30; echo \$(date) - building ...; done" & - PING_LOOP_PID=$! - "$@" &> /tmp/build.log - trap - ERR - kill $PING_LOOP_PID - set -x + trap "$on_err" ERR + bash -c "while true; do sleep 30; echo \$(date) - building ...; done" & + PING_LOOP_PID=$! + "$@" &> /tmp/build.log + trap - ERR + kill $PING_LOOP_PID + set -x } mkdir binutils @@ -31,7 +31,7 @@ curl https://ftp.gnu.org/gnu/binutils/binutils-$BINUTILS.tar.bz2 | tar xjf - mkdir binutils-build cd binutils-build hide_output ../binutils-$BINUTILS/configure \ - --target=$ARCH-unknown-dragonfly + --target=$ARCH-unknown-dragonfly hide_output make -j10 hide_output make install cd ../.. @@ -92,19 +92,19 @@ patch -p0 < $PATCH_TOOLCHAIN mkdir ../gcc-build cd ../gcc-build hide_output ../gcc-$GCC/configure \ - --enable-languages=c,c++ \ - --target=$ARCH-unknown-dragonfly \ - --disable-multilib \ - --disable-nls \ - --disable-libgomp \ - --disable-libquadmath \ - --disable-libssp \ - --disable-libvtv \ - --disable-libcilkrts \ - --disable-libada \ - --disable-libsanitizer \ - --disable-libquadmath-support \ - --disable-lto + --enable-languages=c,c++ \ + --target=$ARCH-unknown-dragonfly \ + --disable-multilib \ + --disable-nls \ + --disable-libgomp \ + --disable-libquadmath \ + --disable-libssp \ + --disable-libvtv \ + --disable-libcilkrts \ + --disable-libada \ + --disable-libsanitizer \ + --disable-libquadmath-support \ + --disable-lto hide_output make -j10 hide_output make install cd ../.. diff --git a/src/ci/docker/host-x86_64/disabled/dist-x86_64-haiku/build-toolchain.sh b/src/ci/docker/host-x86_64/disabled/dist-x86_64-haiku/build-toolchain.sh index 189e537ecaeed..76d47355255e5 100755 --- a/src/ci/docker/host-x86_64/disabled/dist-x86_64-haiku/build-toolchain.sh +++ b/src/ci/docker/host-x86_64/disabled/dist-x86_64-haiku/build-toolchain.sh @@ -13,19 +13,19 @@ SYSROOT=$OUTPUT/cross-tools-$ARCH/sysroot PACKAGE_ROOT=/system hide_output() { - set +x - on_err=" + set +x + on_err=" echo ERROR: An error was encountered with the build. cat /tmp/build.log exit 1 " - trap "$on_err" ERR - bash -c "while true; do sleep 30; echo \$(date) - building ...; done" & - PING_LOOP_PID=$! - "$@" &> /tmp/build.log - trap - ERR - kill $PING_LOOP_PID - set -x + trap "$on_err" ERR + bash -c "while true; do sleep 30; echo \$(date) - building ...; done" & + PING_LOOP_PID=$! + "$@" &> /tmp/build.log + trap - ERR + kill $PING_LOOP_PID + set -x } # First up, build a cross-compiler @@ -62,4 +62,4 @@ ln -s ../../lib/libgcc_s.so libgcc_s.so # Clean up rm -rf $BUILDTOOLS $HAIKU $OUTPUT/Jamfile $OUTPUT/attributes $OUTPUT/build \ - $OUTPUT/build_packages $OUTPUT/download $OUTPUT/objects + $OUTPUT/build_packages $OUTPUT/download $OUTPUT/objects diff --git a/src/ci/docker/host-x86_64/dist-various-1/install-emscripten.sh b/src/ci/docker/host-x86_64/dist-various-1/install-emscripten.sh index eeb54ca67f7ba..61eb815d0d711 100755 --- a/src/ci/docker/host-x86_64/dist-various-1/install-emscripten.sh +++ b/src/ci/docker/host-x86_64/dist-various-1/install-emscripten.sh @@ -3,8 +3,8 @@ set -ex apt-get update apt-get install -y --no-install-recommends \ - nodejs \ - default-jre + nodejs \ + default-jre git clone https://github.com/emscripten-core/emsdk.git cd emsdk diff --git a/src/ci/docker/host-x86_64/dist-x86_64-linux/dist.sh b/src/ci/docker/host-x86_64/dist-x86_64-linux/dist.sh index 46d34cd001a95..b4318784dcb58 100755 --- a/src/ci/docker/host-x86_64/dist-x86_64-linux/dist.sh +++ b/src/ci/docker/host-x86_64/dist-x86_64-linux/dist.sh @@ -16,6 +16,6 @@ python3 ../x.py build --set rust.debug=true opt-dist # Only build GCC on full builds, not try builds if [ "${DIST_TRY_BUILD:-0}" == "0" ]; then CC=/rustroot/bin/cc CXX=/rustroot/bin/c++ python3 ../x.py dist \ - gcc-dev \ - gcc + gcc-dev \ + gcc fi diff --git a/src/ci/docker/host-x86_64/dist-x86_64-netbsd/build-netbsd-toolchain.sh b/src/ci/docker/host-x86_64/dist-x86_64-netbsd/build-netbsd-toolchain.sh index ad21836253b9e..5a13fd542d2b4 100755 --- a/src/ci/docker/host-x86_64/dist-x86_64-netbsd/build-netbsd-toolchain.sh +++ b/src/ci/docker/host-x86_64/dist-x86_64-netbsd/build-netbsd-toolchain.sh @@ -4,36 +4,36 @@ set -eux hide_output() { - set +x - on_err=" + set +x + on_err=" echo ERROR: An error was encountered with the build. cat /tmp/build.log exit 1 " - trap "$on_err" ERR - bash -c "while true; do sleep 30; echo \$(date) - building ...; done" & - PING_LOOP_PID=$! - "$@" &> /tmp/build.log - rm /tmp/build.log - trap - ERR - kill $PING_LOOP_PID - set -x + trap "$on_err" ERR + bash -c "while true; do sleep 30; echo \$(date) - building ...; done" & + PING_LOOP_PID=$! + "$@" &> /tmp/build.log + rm /tmp/build.log + trap - ERR + kill $PING_LOOP_PID + set -x } # Download, verify SHA512, and remove the downloaded file # Usage: download() { - fname="$1" - shift - url="$1" - shift - sha="$1" - shift - - curl "$url" -o "$fname" - echo "$sha $fname" | shasum -a 512 --check || exit 1 - "$@" - rm "$fname" + fname="$1" + shift + url="$1" + shift + sha="$1" + shift + + curl "$url" -o "$fname" + echo "$sha $fname" | shasum -a 512 --check || exit 1 + "$@" + rm "$fname" } mkdir netbsd @@ -57,9 +57,9 @@ download syssrc.tgz "$SOURCE_URL-syssrc.tgz" "$SYSSRC_SHA" tar xzf syssrc.tgz BINARY_URL=https://ci-mirrors.rust-lang.org/rustc/2025-03-14-netbsd-9.0-amd64-binary download base.tar.xz "$BINARY_URL-base.tar.xz" "$BASE_SHA" \ - tar xJf base.tar.xz -C /x-tools/x86_64-unknown-netbsd/sysroot ./usr/include ./usr/lib ./lib + tar xJf base.tar.xz -C /x-tools/x86_64-unknown-netbsd/sysroot ./usr/include ./usr/lib ./lib download comp.tar.xz "$BINARY_URL-comp.tar.xz" "$COMP_SHA" \ - tar xJf comp.tar.xz -C /x-tools/x86_64-unknown-netbsd/sysroot ./usr/include ./usr/lib + tar xJf comp.tar.xz -C /x-tools/x86_64-unknown-netbsd/sysroot ./usr/include ./usr/lib cd usr/src diff --git a/src/ci/docker/host-x86_64/x86_64-gnu-miri/check-miri.sh b/src/ci/docker/host-x86_64/x86_64-gnu-miri/check-miri.sh index c2a5b308b3284..d5a233abd2b3b 100755 --- a/src/ci/docker/host-x86_64/x86_64-gnu-miri/check-miri.sh +++ b/src/ci/docker/host-x86_64/x86_64-gnu-miri/check-miri.sh @@ -21,42 +21,42 @@ fi # adjust their expectations if needed. This can change the output of the tests so we ignore that, # we only ensure that all assertions still pass. MIRIFLAGS="-Zmiri-force-intrinsic-fallback --cfg force_intrinsic_fallback -O -Zmir-opt-level=4 -Cdebug-assertions=yes" \ - MIRI_SKIP_UI_CHECKS=1 \ - python3 "$X_PY" test --stage 2 src/tools/miri -- tests/pass tests/panic + MIRI_SKIP_UI_CHECKS=1 \ + python3 "$X_PY" test --stage 2 src/tools/miri -- tests/pass tests/panic # We natively run this script on x86_64-unknown-linux-gnu and x86_64-pc-windows-msvc. # Also cover some other targets via cross-testing, in particular all tier 1 targets. case $HOST_TARGET in - x86_64-unknown-linux-gnu) - # Only this branch runs in PR CI. - # Fully test all main OSes, and all main architectures. - python3 "$X_PY" test --stage 2 src/tools/miri src/tools/miri/cargo-miri --target aarch64-apple-darwin - python3 "$X_PY" test --stage 2 src/tools/miri src/tools/miri/cargo-miri --target i686-pc-windows-msvc - # Only run "pass" tests for the remaining targets, which is quite a bit faster. - python3 "$X_PY" test --stage 2 src/tools/miri --target x86_64-pc-windows-gnu --test-args pass - python3 "$X_PY" test --stage 2 src/tools/miri --target i686-unknown-linux-gnu --test-args pass - python3 "$X_PY" test --stage 2 src/tools/miri --target aarch64-unknown-linux-gnu --test-args pass - python3 "$X_PY" test --stage 2 src/tools/miri --target s390x-unknown-linux-gnu --test-args pass - ;; - x86_64-pc-windows-msvc) - # Strangely, Linux targets do not work here. cargo always says - # "error: cannot produce cdylib for ... as the target ... does not support these crate types". - # Only run "pass" tests, which is quite a bit faster. - #FIXME: Re-enable this once CI issues are fixed - # See - # For now, these tests are moved to `x86_64-msvc-ext2` in `src/ci/github-actions/jobs.yml`. - #python3 "$X_PY" test --stage 2 src/tools/miri --target x86_64-apple-darwin --test-args pass - ;; - *) - echo "FATAL: unexpected host $HOST_TARGET" - exit 1 - ;; + x86_64-unknown-linux-gnu) + # Only this branch runs in PR CI. + # Fully test all main OSes, and all main architectures. + python3 "$X_PY" test --stage 2 src/tools/miri src/tools/miri/cargo-miri --target aarch64-apple-darwin + python3 "$X_PY" test --stage 2 src/tools/miri src/tools/miri/cargo-miri --target i686-pc-windows-msvc + # Only run "pass" tests for the remaining targets, which is quite a bit faster. + python3 "$X_PY" test --stage 2 src/tools/miri --target x86_64-pc-windows-gnu --test-args pass + python3 "$X_PY" test --stage 2 src/tools/miri --target i686-unknown-linux-gnu --test-args pass + python3 "$X_PY" test --stage 2 src/tools/miri --target aarch64-unknown-linux-gnu --test-args pass + python3 "$X_PY" test --stage 2 src/tools/miri --target s390x-unknown-linux-gnu --test-args pass + ;; + x86_64-pc-windows-msvc) + # Strangely, Linux targets do not work here. cargo always says + # "error: cannot produce cdylib for ... as the target ... does not support these crate types". + # Only run "pass" tests, which is quite a bit faster. + #FIXME: Re-enable this once CI issues are fixed + # See + # For now, these tests are moved to `x86_64-msvc-ext2` in `src/ci/github-actions/jobs.yml`. + #python3 "$X_PY" test --stage 2 src/tools/miri --target x86_64-apple-darwin --test-args pass + ;; + *) + echo "FATAL: unexpected host $HOST_TARGET" + exit 1 + ;; esac # Also smoke-test `x.py miri`. This doesn't run any actual tests (that would take too long), # but it ensures that the crates build properly when tested with Miri. #FIXME: Re-enable this for msvc once CI issues are fixed if [ "$HOST_TARGET" != "x86_64-pc-windows-msvc" ]; then - python3 "$X_PY" miri --stage 2 library/core --test-args notest - python3 "$X_PY" miri --stage 2 library/alloc --test-args notest - python3 "$X_PY" miri --stage 2 library/std --test-args notest + python3 "$X_PY" miri --stage 2 library/core --test-args notest + python3 "$X_PY" miri --stage 2 library/alloc --test-args notest + python3 "$X_PY" miri --stage 2 library/std --test-args notest fi diff --git a/src/ci/docker/run.sh b/src/ci/docker/run.sh index d62fe1a1aa928..5acd938ec184c 100755 --- a/src/ci/docker/run.sh +++ b/src/ci/docker/run.sh @@ -11,20 +11,20 @@ dev=0 while [[ $# -gt 0 ]] do - case "$1" in - --dev) - dev=1 - ;; - *) - if [ -n "$image" ] - then - echo "expected single argument for the image name" - exit 1 - fi - image="$1" - ;; - esac - shift + case "$1" in + --dev) + dev=1 + ;; + *) + if [ -n "$image" ] + then + echo "expected single argument for the image name" + exit 1 + fi + image="$1" + ;; + esac + shift done # MacOS reports "arm64" while Linux reports "aarch64". Commonize this. @@ -62,7 +62,7 @@ if [ -f "$docker_dir/$image/Dockerfile" ]; then copied_files=/tmp/.docker-copied-files.txt rm -f "$copied_files" for i in $(sed -n -e '/^COPY --from=/! s/^COPY \(.*\) .*$/\1/p' \ - "$docker_dir/$image/Dockerfile"); do + "$docker_dir/$image/Dockerfile"); do # List the file names find "$script_dir/$i" -type f >> $copied_files done @@ -134,14 +134,14 @@ if [ -f "$docker_dir/$image/Dockerfile" ]; then # Enable a new Docker driver so that --cache-from works with a registry backend # Use a custom image to avoid DockerHub rate limits docker buildx create --use --driver docker-container \ - --driver-opt image=${GHCR_BUILDKIT_IMAGE} + --driver-opt image=${GHCR_BUILDKIT_IMAGE} # Build the image using registry caching backend retry docker \ - buildx \ - "${build_args[@]}" \ - --cache-from type=registry,ref=${CACHE_IMAGE_TAG} \ - --output=type=docker + buildx \ + "${build_args[@]}" \ + --cache-from type=registry,ref=${CACHE_IMAGE_TAG} \ + --output=type=docker # On auto/try builds, we can also write to the cache. else # Log into the Docker registry, so that we can read/write cache and the final image @@ -152,15 +152,15 @@ if [ -f "$docker_dir/$image/Dockerfile" ]; then # Enable a new Docker driver so that --cache-from/to works with a registry backend # Use a custom image to avoid DockerHub rate limits docker buildx create --use --driver docker-container \ - --driver-opt image=${GHCR_BUILDKIT_IMAGE} + --driver-opt image=${GHCR_BUILDKIT_IMAGE} # Build the image using registry caching backend retry docker \ - buildx \ - "${build_args[@]}" \ - --cache-from type=registry,ref=${CACHE_IMAGE_TAG} \ - --cache-to type=registry,ref=${CACHE_IMAGE_TAG},compression=zstd \ - --output=type=docker + buildx \ + "${build_args[@]}" \ + --cache-from type=registry,ref=${CACHE_IMAGE_TAG} \ + --cache-to type=registry,ref=${CACHE_IMAGE_TAG},compression=zstd \ + --output=type=docker # Print images for debugging purposes docker images @@ -186,11 +186,11 @@ elif [ -f "$docker_dir/disabled/$image/Dockerfile" ]; then fi # Transform changes the context of disabled Dockerfiles to match the enabled ones tar --transform 's#disabled/#./#' -C $script_dir -c . | docker \ - build \ - --rm \ - -t rust-ci \ - -f "host-${machine}/$image/Dockerfile" \ - - + build \ + --rm \ + -t rust-ci \ + -f "host-${machine}/$image/Dockerfile" \ + - else echo Invalid image: $image @@ -231,10 +231,10 @@ if [ "$SCCACHE_BUCKET" != "" ]; then # Disable S3 authentication for PR builds, because the access keys are missing if [ "$PR_CI_JOB" != "" ]; then - args="$args --env SCCACHE_S3_NO_CREDENTIALS=1" + args="$args --env SCCACHE_S3_NO_CREDENTIALS=1" else - args="$args --env AWS_ACCESS_KEY_ID" - args="$args --env AWS_SECRET_ACCESS_KEY" + args="$args --env AWS_ACCESS_KEY_ID" + args="$args --env AWS_SECRET_ACCESS_KEY" fi else mkdir -p $HOME/.cache/sccache @@ -279,37 +279,37 @@ args="$args --privileged" # `LOCAL_USER_ID` (recognized in `src/ci/run.sh`) to ensure that files are all # read/written as the same user as the bare-metal user. if [ -f /.dockerenv ]; then - docker create -v /checkout --name checkout ghcr.io/rust-lang/alpine:3.4 /bin/true - docker cp . checkout:/checkout - args="$args --volumes-from checkout" + docker create -v /checkout --name checkout ghcr.io/rust-lang/alpine:3.4 /bin/true + docker cp . checkout:/checkout + args="$args --volumes-from checkout" else - args="$args --volume $root_dir:/checkout$SRC_MOUNT_OPTION" - args="$args --volume $objdir:/checkout/obj" - args="$args --volume $HOME/.cargo:/cargo" - args="$args --volume /tmp/toolstate:/tmp/toolstate" - - id=$(id -u) - if [[ "$id" != 0 && "$(docker version)" =~ Podman ]]; then - # Rootless podman creates a separate user namespace, where an inner - # LOCAL_USER_ID will map to a different subuid range on the host. - # The "keep-id" mode maps the current UID directly into the container. - args="$args --env NO_CHANGE_USER=1 --userns=keep-id" - else - args="$args --env LOCAL_USER_ID=$id" - fi + args="$args --volume $root_dir:/checkout$SRC_MOUNT_OPTION" + args="$args --volume $objdir:/checkout/obj" + args="$args --volume $HOME/.cargo:/cargo" + args="$args --volume /tmp/toolstate:/tmp/toolstate" + + id=$(id -u) + if [[ "$id" != 0 && "$(docker version)" =~ Podman ]]; then + # Rootless podman creates a separate user namespace, where an inner + # LOCAL_USER_ID will map to a different subuid range on the host. + # The "keep-id" mode maps the current UID directly into the container. + args="$args --env NO_CHANGE_USER=1 --userns=keep-id" + else + args="$args --env LOCAL_USER_ID=$id" + fi fi if [ "$dev" = "1" ] then - # Interactive + TTY - args="$args -it" - if [ $IS_GIT_SOURCE -eq 1 ]; then - command=(/bin/bash -c 'git config --global --add safe.directory /checkout;bash') - else - command=(/bin/bash) - fi + # Interactive + TTY + args="$args -it" + if [ $IS_GIT_SOURCE -eq 1 ]; then + command=(/bin/bash -c 'git config --global --add safe.directory /checkout;bash') + else + command=(/bin/bash) + fi else - command=(/checkout/src/ci/run.sh) + command=(/checkout/src/ci/run.sh) fi SUMMARY_FILE=github-summary.md @@ -317,52 +317,52 @@ touch $objdir/${SUMMARY_FILE} extra_env="" if [ "$ENABLE_GCC_CODEGEN" = "1" ]; then - extra_env="$extra_env --env ENABLE_GCC_CODEGEN=1" - # Fix rustc_codegen_gcc lto issues. - extra_env="$extra_env --env GCC_EXEC_PREFIX=/usr/lib/gcc/" - echo "Setting extra environment values for docker: $extra_env" + extra_env="$extra_env --env ENABLE_GCC_CODEGEN=1" + # Fix rustc_codegen_gcc lto issues. + extra_env="$extra_env --env GCC_EXEC_PREFIX=/usr/lib/gcc/" + echo "Setting extra environment values for docker: $extra_env" fi if [ -n "${DOCKER_SCRIPT}" ]; then - extra_env="$extra_env --env SCRIPT=\"/scripts/${DOCKER_SCRIPT}\"" + extra_env="$extra_env --env SCRIPT=\"/scripts/${DOCKER_SCRIPT}\"" fi docker \ - run \ - --workdir /checkout/obj \ - --env SRC=/checkout \ - $extra_env \ - $args \ - --env CARGO_HOME=/cargo \ - --env DEPLOY \ - --env DEPLOY_ALT \ - --env CI \ - --env GIT_DISCOVERY_ACROSS_FILESYSTEM=1 \ - --env GITHUB_ACTIONS \ - --env GITHUB_REF \ - --env GITHUB_STEP_SUMMARY="/checkout/obj/${SUMMARY_FILE}" \ - --env GITHUB_WORKFLOW_RUN_ID \ - --env GITHUB_REPOSITORY \ - --env RUST_BACKTRACE \ - --env TOOLSTATE_REPO_ACCESS_TOKEN \ - --env TOOLSTATE_REPO \ - --env TOOLSTATE_PUBLISH \ - --env RUST_CI_OVERRIDE_RELEASE_CHANNEL \ - --env CI_JOB_NAME="${CI_JOB_NAME-$image}" \ - --env CI_JOB_DOC_URL="${CI_JOB_DOC_URL}" \ - --env DIST_TRY_BUILD \ - --env PR_CI_JOB \ - --env OBJDIR_ON_HOST="$objdir" \ - --env CODEGEN_BACKENDS \ - --env DISABLE_CI_RUSTC_IF_INCOMPATIBLE="$DISABLE_CI_RUSTC_IF_INCOMPATIBLE" \ - --init \ - --rm \ - rust-ci \ - "${command[@]}" + run \ + --workdir /checkout/obj \ + --env SRC=/checkout \ + $extra_env \ + $args \ + --env CARGO_HOME=/cargo \ + --env DEPLOY \ + --env DEPLOY_ALT \ + --env CI \ + --env GIT_DISCOVERY_ACROSS_FILESYSTEM=1 \ + --env GITHUB_ACTIONS \ + --env GITHUB_REF \ + --env GITHUB_STEP_SUMMARY="/checkout/obj/${SUMMARY_FILE}" \ + --env GITHUB_WORKFLOW_RUN_ID \ + --env GITHUB_REPOSITORY \ + --env RUST_BACKTRACE \ + --env TOOLSTATE_REPO_ACCESS_TOKEN \ + --env TOOLSTATE_REPO \ + --env TOOLSTATE_PUBLISH \ + --env RUST_CI_OVERRIDE_RELEASE_CHANNEL \ + --env CI_JOB_NAME="${CI_JOB_NAME-$image}" \ + --env CI_JOB_DOC_URL="${CI_JOB_DOC_URL}" \ + --env DIST_TRY_BUILD \ + --env PR_CI_JOB \ + --env OBJDIR_ON_HOST="$objdir" \ + --env CODEGEN_BACKENDS \ + --env DISABLE_CI_RUSTC_IF_INCOMPATIBLE="$DISABLE_CI_RUSTC_IF_INCOMPATIBLE" \ + --init \ + --rm \ + rust-ci \ + "${command[@]}" if [ -f /.dockerenv ]; then - rm -rf $objdir - docker cp checkout:/checkout/obj $objdir + rm -rf $objdir + docker cp checkout:/checkout/obj $objdir fi if isCI; then diff --git a/src/ci/docker/scripts/android-base-apt-get.sh b/src/ci/docker/scripts/android-base-apt-get.sh index d0252e356fd90..2ed7245dd114e 100644 --- a/src/ci/docker/scripts/android-base-apt-get.sh +++ b/src/ci/docker/scripts/android-base-apt-get.sh @@ -3,18 +3,18 @@ set -ex apt-get update apt-get install -y --no-install-recommends \ - ca-certificates \ - cmake \ - curl \ - file \ - g++ \ - git \ - libssl-dev \ - libncurses-dev \ - make \ - ninja-build \ - pkg-config \ - python3 \ - sudo \ - unzip \ - xz-utils + ca-certificates \ + cmake \ + curl \ + file \ + g++ \ + git \ + libssl-dev \ + libncurses-dev \ + make \ + ninja-build \ + pkg-config \ + python3 \ + sudo \ + unzip \ + xz-utils diff --git a/src/ci/docker/scripts/build-clang.sh b/src/ci/docker/scripts/build-clang.sh index b3b1dc47e2ef7..fc20da62af4e8 100755 --- a/src/ci/docker/scripts/build-clang.sh +++ b/src/ci/docker/scripts/build-clang.sh @@ -11,7 +11,7 @@ mkdir llvm-project cd llvm-project curl -L https://github.com/llvm/llvm-project/archive/$LLVM.tar.gz | \ - tar xzf - --strip-components=1 + tar xzf - --strip-components=1 mkdir clang-build cd clang-build @@ -24,7 +24,7 @@ INC="/rustroot/include:/usr/include" GCC_PLUGIN_TARGET=$GCC_BUILD_TARGET # We build gcc for the i686 job on x86_64 so the plugin will end up under an x86_64 path if [[ $GCC_PLUGIN_TARGET == "i686-pc-linux-gnu" ]]; then - GCC_PLUGIN_TARGET=x86_64-pc-linux-gnu + GCC_PLUGIN_TARGET=x86_64-pc-linux-gnu fi # We need compiler-rt for the profile runtime (used later to PGO the LLVM build) @@ -32,23 +32,23 @@ fi # disable them. BOLT is used for optimizing LLVM. hide_output \ cmake ../llvm \ - -DCMAKE_C_COMPILER=/rustroot/bin/gcc \ - -DCMAKE_CXX_COMPILER=/rustroot/bin/g++ \ - -DCMAKE_BUILD_TYPE=Release \ - -DCMAKE_INSTALL_PREFIX=/rustroot \ - -DCOMPILER_RT_BUILD_SANITIZERS=OFF \ - -DCOMPILER_RT_BUILD_XRAY=OFF \ - -DCOMPILER_RT_BUILD_MEMPROF=OFF \ - -DCOMPILER_RT_BUILD_CTX_PROFILE=OFF \ - -DLLVM_TARGETS_TO_BUILD=$LLVM_BUILD_TARGETS \ - -DLLVM_INCLUDE_BENCHMARKS=OFF \ - -DLLVM_INCLUDE_TESTS=OFF \ - -DLLVM_INCLUDE_EXAMPLES=OFF \ - -DLLVM_ENABLE_PROJECTS="clang;lld;bolt" \ - -DLLVM_ENABLE_RUNTIMES="compiler-rt" \ - -DLLVM_BINUTILS_INCDIR="/rustroot/lib/gcc/$GCC_PLUGIN_TARGET/$GCC_VERSION/plugin/include/" \ - -DRUNTIMES_CMAKE_ARGS="-DCMAKE_CXX_FLAGS=\"--gcc-toolchain=/rustroot\"" \ - -DC_INCLUDE_DIRS="$INC" + -DCMAKE_C_COMPILER=/rustroot/bin/gcc \ + -DCMAKE_CXX_COMPILER=/rustroot/bin/g++ \ + -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_INSTALL_PREFIX=/rustroot \ + -DCOMPILER_RT_BUILD_SANITIZERS=OFF \ + -DCOMPILER_RT_BUILD_XRAY=OFF \ + -DCOMPILER_RT_BUILD_MEMPROF=OFF \ + -DCOMPILER_RT_BUILD_CTX_PROFILE=OFF \ + -DLLVM_TARGETS_TO_BUILD=$LLVM_BUILD_TARGETS \ + -DLLVM_INCLUDE_BENCHMARKS=OFF \ + -DLLVM_INCLUDE_TESTS=OFF \ + -DLLVM_INCLUDE_EXAMPLES=OFF \ + -DLLVM_ENABLE_PROJECTS="clang;lld;bolt" \ + -DLLVM_ENABLE_RUNTIMES="compiler-rt" \ + -DLLVM_BINUTILS_INCDIR="/rustroot/lib/gcc/$GCC_PLUGIN_TARGET/$GCC_VERSION/plugin/include/" \ + -DRUNTIMES_CMAKE_ARGS="-DCMAKE_CXX_FLAGS=\"--gcc-toolchain=/rustroot\"" \ + -DC_INCLUDE_DIRS="$INC" hide_output make -j$(nproc) hide_output make install diff --git a/src/ci/docker/scripts/build-fuchsia-toolchain.sh b/src/ci/docker/scripts/build-fuchsia-toolchain.sh index 3c65a52ada76b..66798a6cfcf19 100755 --- a/src/ci/docker/scripts/build-fuchsia-toolchain.sh +++ b/src/ci/docker/scripts/build-fuchsia-toolchain.sh @@ -13,47 +13,47 @@ CLANG_DOWNLOAD_ID=git_revision:388d7f144880dcd85ff31f06793304405a9f44b6 CLANG_DOWNLOAD_SHA256=970d1f427b9c9a3049d8622c80c86830ff31b5334ad8da47a2f1e81143197e8b install_clang() { - mkdir -p clang_download - pushd clang_download > /dev/null - - # Download clang+llvm - curl -LO "${CLANG_DOWNLOAD_URL}/+/${CLANG_DOWNLOAD_ID}" - echo "$(echo ${CLANG_DOWNLOAD_SHA256}) ${CLANG_DOWNLOAD_ID}" | sha256sum --check --status - unzip -qq ${CLANG_DOWNLOAD_ID} -d clang-linux-amd64 - - # Other dists currently depend on our Clang... moving into /usr/local for other - # dist usage instead of a Fuchsia /usr/local directory - chmod -R 777 clang-linux-amd64/. - cp -a clang-linux-amd64/. /usr/local - - # CFLAGS and CXXFLAGS env variables in main Dockerfile handle sysroot linking - for arch in x86_64 aarch64; do - for tool in clang clang++; do - ln -s /usr/local/bin/${tool} /usr/local/bin/${arch}-unknown-fuchsia-${tool} + mkdir -p clang_download + pushd clang_download > /dev/null + + # Download clang+llvm + curl -LO "${CLANG_DOWNLOAD_URL}/+/${CLANG_DOWNLOAD_ID}" + echo "$(echo ${CLANG_DOWNLOAD_SHA256}) ${CLANG_DOWNLOAD_ID}" | sha256sum --check --status + unzip -qq ${CLANG_DOWNLOAD_ID} -d clang-linux-amd64 + + # Other dists currently depend on our Clang... moving into /usr/local for other + # dist usage instead of a Fuchsia /usr/local directory + chmod -R 777 clang-linux-amd64/. + cp -a clang-linux-amd64/. /usr/local + + # CFLAGS and CXXFLAGS env variables in main Dockerfile handle sysroot linking + for arch in x86_64 aarch64; do + for tool in clang clang++; do + ln -s /usr/local/bin/${tool} /usr/local/bin/${arch}-unknown-fuchsia-${tool} + done + ln -s /usr/local/bin/llvm-ar /usr/local/bin/${arch}-unknown-fuchsia-ar done - ln -s /usr/local/bin/llvm-ar /usr/local/bin/${arch}-unknown-fuchsia-ar - done - popd > /dev/null - rm -rf clang_download + popd > /dev/null + rm -rf clang_download } install_zircon_libs() { - mkdir -p zircon - pushd zircon > /dev/null + mkdir -p zircon + pushd zircon > /dev/null - # Download Fuchsia SDK (with Zircon libs) - curl -LO "${FUCHSIA_SDK_URL}/+/${FUCHSIA_SDK_ID}" - echo "$(echo ${FUCHSIA_SDK_SHA256}) ${FUCHSIA_SDK_ID}" | sha256sum --check --status - unzip -qq ${FUCHSIA_SDK_ID} -d core-linux-amd64 + # Download Fuchsia SDK (with Zircon libs) + curl -LO "${FUCHSIA_SDK_URL}/+/${FUCHSIA_SDK_ID}" + echo "$(echo ${FUCHSIA_SDK_SHA256}) ${FUCHSIA_SDK_ID}" | sha256sum --check --status + unzip -qq ${FUCHSIA_SDK_ID} -d core-linux-amd64 - # Moving SDK into Docker's user-space - mkdir -p ${FUCHSIA_SDK_USR_DIR} - chmod -R 777 core-linux-amd64/. - cp -r core-linux-amd64/* ${FUCHSIA_SDK_USR_DIR} + # Moving SDK into Docker's user-space + mkdir -p ${FUCHSIA_SDK_USR_DIR} + chmod -R 777 core-linux-amd64/. + cp -r core-linux-amd64/* ${FUCHSIA_SDK_USR_DIR} - popd > /dev/null - rm -rf zircon + popd > /dev/null + rm -rf zircon } hide_output install_clang diff --git a/src/ci/docker/scripts/build-zstd.sh b/src/ci/docker/scripts/build-zstd.sh index cffa7151e3864..141e014028582 100755 --- a/src/ci/docker/scripts/build-zstd.sh +++ b/src/ci/docker/scripts/build-zstd.sh @@ -2,20 +2,20 @@ set -ex hide_output() { - set +x - on_err=" + set +x + on_err=" echo ERROR: An error was encountered with the build. cat /tmp/zstd_build.log exit 1 " - trap "$on_err" ERR - bash -c "while true; do sleep 30; echo \$(date) - building ...; done" & - PING_LOOP_PID=$! - "$@" &> /tmp/zstd_build.log - trap - ERR - kill $PING_LOOP_PID - rm /tmp/zstd_build.log - set -x + trap "$on_err" ERR + bash -c "while true; do sleep 30; echo \$(date) - building ...; done" & + PING_LOOP_PID=$! + "$@" &> /tmp/zstd_build.log + trap - ERR + kill $PING_LOOP_PID + rm /tmp/zstd_build.log + set -x } ZSTD=1.5.6 diff --git a/src/ci/docker/scripts/cmake.sh b/src/ci/docker/scripts/cmake.sh index 822666c89530d..38b5e1b014263 100755 --- a/src/ci/docker/scripts/cmake.sh +++ b/src/ci/docker/scripts/cmake.sh @@ -2,20 +2,20 @@ set -ex hide_output() { - set +x - on_err=" + set +x + on_err=" echo ERROR: An error was encountered with the build. cat /tmp/cmake_build.log exit 1 " - trap "$on_err" ERR - bash -c "while true; do sleep 30; echo \$(date) - building ...; done" & - PING_LOOP_PID=$! - "$@" &> /tmp/cmake_build.log - trap - ERR - kill $PING_LOOP_PID - rm /tmp/cmake_build.log - set -x + trap "$on_err" ERR + bash -c "while true; do sleep 30; echo \$(date) - building ...; done" & + PING_LOOP_PID=$! + "$@" &> /tmp/cmake_build.log + trap - ERR + kill $PING_LOOP_PID + rm /tmp/cmake_build.log + set -x } # LLVM 17 requires CMake 3.20 or higher. diff --git a/src/ci/docker/scripts/cross-apt-packages.sh b/src/ci/docker/scripts/cross-apt-packages.sh index 398362ca52f22..bc3bbdfcf1a48 100644 --- a/src/ci/docker/scripts/cross-apt-packages.sh +++ b/src/ci/docker/scripts/cross-apt-packages.sh @@ -1,30 +1,30 @@ #!/bin/sh apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ - automake \ - bison \ - bzip2 \ - ca-certificates \ - cmake \ - curl \ - file \ - flex \ - g++ \ - gawk \ - gdb \ - git \ - gperf \ - help2man \ - libncurses-dev \ - libssl-dev \ - libtool-bin \ - make \ - ninja-build \ - patch \ - pkg-config \ - python3 \ - rsync \ - sudo \ - texinfo \ - unzip \ - wget \ - xz-utils + automake \ + bison \ + bzip2 \ + ca-certificates \ + cmake \ + curl \ + file \ + flex \ + g++ \ + gawk \ + gdb \ + git \ + gperf \ + help2man \ + libncurses-dev \ + libssl-dev \ + libtool-bin \ + make \ + ninja-build \ + patch \ + pkg-config \ + python3 \ + rsync \ + sudo \ + texinfo \ + unzip \ + wget \ + xz-utils diff --git a/src/ci/docker/scripts/crosstool-ng-build.sh b/src/ci/docker/scripts/crosstool-ng-build.sh index c813d10eb9d2b..9cc2d6f334a4f 100755 --- a/src/ci/docker/scripts/crosstool-ng-build.sh +++ b/src/ci/docker/scripts/crosstool-ng-build.sh @@ -7,20 +7,20 @@ if [ $UID -eq 0 ]; then fi hide_output() { - set +x - on_err=" + set +x + on_err=" echo ERROR: An error was encountered with the build. cat /tmp/build.log exit 1 " - trap "$on_err" ERR - bash -c "while true; do sleep 30; echo \$(date) - building ...; done" & - PING_LOOP_PID=$! - "$@" &> /tmp/build.log - rm /tmp/build.log - trap - ERR - kill $PING_LOOP_PID - set -x + trap "$on_err" ERR + bash -c "while true; do sleep 30; echo \$(date) - building ...; done" & + PING_LOOP_PID=$! + "$@" &> /tmp/build.log + rm /tmp/build.log + trap - ERR + kill $PING_LOOP_PID + set -x } mkdir build diff --git a/src/ci/docker/scripts/freebsd-toolchain.sh b/src/ci/docker/scripts/freebsd-toolchain.sh index 8b4081d27d083..6f5ad60b65e1b 100755 --- a/src/ci/docker/scripts/freebsd-toolchain.sh +++ b/src/ci/docker/scripts/freebsd-toolchain.sh @@ -11,19 +11,19 @@ triple=$arch-unknown-freebsd14 sysroot=/usr/local/$triple hide_output() { - set +x - local on_err=" + set +x + local on_err=" echo ERROR: An error was encountered with the build. cat /tmp/build.log exit 1 " - trap "$on_err" ERR - bash -c "while true; do sleep 30; echo \$(date) - building ...; done" & - local ping_loop_pid=$! - "$@" &> /tmp/build.log - trap - ERR - kill $ping_loop_pid - set -x + trap "$on_err" ERR + bash -c "while true; do sleep 30; echo \$(date) - building ...; done" & + local ping_loop_pid=$! + "$@" &> /tmp/build.log + trap - ERR + kill $ping_loop_pid + set -x } # First up, build binutils @@ -35,7 +35,7 @@ curl https://ci-mirrors.rust-lang.org/rustc/binutils-${binutils_version}.tar.bz2 mkdir binutils-build cd binutils-build hide_output ../binutils-${binutils_version}/configure \ - --target="$triple" --with-sysroot="$sysroot" + --target="$triple" --with-sysroot="$sysroot" hide_output make -j"$(getconf _NPROCESSORS_ONLN)" hide_output make install cd ../.. @@ -44,9 +44,9 @@ rm -rf binutils # Next, download the FreeBSD libraries and header files mkdir -p "$sysroot" case $arch in - (x86_64) freebsd_arch=amd64 ;; - (i686) freebsd_arch=i386 ;; - (aarch64) freebsd_arch=arm64 ;; + (x86_64) freebsd_arch=amd64 ;; + (i686) freebsd_arch=i386 ;; + (aarch64) freebsd_arch=arm64 ;; esac files_to_extract=( @@ -55,10 +55,10 @@ files_to_extract=( ) # Try to unpack only the libraries the build needs, to save space. for lib in c c++ cxxrt gcc_s m thr util; do - files_to_extract=("${files_to_extract[@]}" "./lib/lib${lib}.*" "./usr/lib/lib${lib}.*") + files_to_extract=("${files_to_extract[@]}" "./lib/lib${lib}.*" "./usr/lib/lib${lib}.*") done for lib in c_nonshared compiler_rt execinfo gcc pthread rt ssp_nonshared procstat devstat kvm memstat; do - files_to_extract=("${files_to_extract[@]}" "./usr/lib/lib${lib}.*") + files_to_extract=("${files_to_extract[@]}" "./usr/lib/lib${lib}.*") done # Originally downloaded from: @@ -78,10 +78,10 @@ curl "$URL" | tar xJf - -C "$sysroot" --wildcards "${files_to_extract[@]}" # anything predicated on the version number in the __FreeBSD__ # preprocessor macro. for tool in clang clang++; do - tool_path=/usr/local/bin/${triple}-${tool} - cat > "$tool_path" < "$tool_path" < /tmp/build.log - trap - ERR - kill $PING_LOOP_PID - rm /tmp/build.log - set -x + trap "$on_err" ERR + bash -c "while true; do sleep 30; echo \$(date) - building ...; done" & + PING_LOOP_PID=$! + "$@" &> /tmp/build.log + trap - ERR + kill $PING_LOOP_PID + rm /tmp/build.log + set -x } ARCH=$1 diff --git a/src/ci/docker/scripts/musl.sh b/src/ci/docker/scripts/musl.sh index 7258d3935e0f6..3e7920adec2b3 100644 --- a/src/ci/docker/scripts/musl.sh +++ b/src/ci/docker/scripts/musl.sh @@ -2,20 +2,20 @@ set -ex hide_output() { - set +x - on_err=" + set +x + on_err=" echo ERROR: An error was encountered with the build. cat /tmp/build.log exit 1 " - trap "$on_err" ERR - bash -c "while true; do sleep 30; echo \$(date) - building ...; done" & - PING_LOOP_PID=$! - "$@" &> /tmp/build.log - trap - ERR - kill $PING_LOOP_PID - rm /tmp/build.log - set -x + trap "$on_err" ERR + bash -c "while true; do sleep 30; echo \$(date) - building ...; done" & + PING_LOOP_PID=$! + "$@" &> /tmp/build.log + trap - ERR + kill $PING_LOOP_PID + rm /tmp/build.log + set -x } TAG=$1 @@ -29,21 +29,21 @@ MUSL=musl-1.2.5 # may have been downloaded in a previous run if [ ! -d $MUSL ]; then - curl https://www.musl-libc.org/releases/$MUSL.tar.gz | tar xzf - + curl https://www.musl-libc.org/releases/$MUSL.tar.gz | tar xzf - - # Apply patches for CVE-2025-26519. At the time of adding these patches no release containing them - # has been published by the musl project, so we just apply them directly on top of the version we - # were distributing already. The patches should be removed once we upgrade to musl >= 1.2.6. - # - # Advisory: https://www.openwall.com/lists/musl/2025/02/13/1 - # - # Patches applied: - # - https://www.openwall.com/lists/musl/2025/02/13/1/1 - # - https://www.openwall.com/lists/musl/2025/02/13/1/2 - # - # ignore-tidy-tab - # ignore-tidy-linelength - patch -p1 -d $MUSL <= 1.2.6. + # + # Advisory: https://www.openwall.com/lists/musl/2025/02/13/1 + # + # Patches applied: + # - https://www.openwall.com/lists/musl/2025/02/13/1/1 + # - https://www.openwall.com/lists/musl/2025/02/13/1/2 + # + # ignore-tidy-tab + # ignore-tidy-linelength + patch -p1 -d $MUSL <= 1.2.7. - # - # Advisory: https://www.openwall.com/lists/oss-security/2026/04/09/19 - # Patches: https://www.openwall.com/lists/musl/2026/04/03/2/1 - patch -p1 -d $MUSL = 1.2.7. + # + # Advisory: https://www.openwall.com/lists/oss-security/2026/04/09/19 + # Patches: https://www.openwall.com/lists/musl/2026/04/03/2/1 + patch -p1 -d $MUSL /dev/null - on_err=" + { set +x; } 2>/dev/null + on_err=" echo ERROR: An error was encountered with the build. cat /tmp/build.log exit 1 " - trap "$on_err" ERR - bash -c "while true; do sleep 30; echo \$(date) - building ...; done" & - PING_LOOP_PID=$! - "$@" &> /tmp/build.log - trap - ERR - kill $PING_LOOP_PID - set -x + trap "$on_err" ERR + bash -c "while true; do sleep 30; echo \$(date) - building ...; done" & + PING_LOOP_PID=$! + "$@" &> /tmp/build.log + trap - ERR + kill $PING_LOOP_PID + set -x } # See https://unix.stackexchange.com/questions/82598 # Duplicated in src/ci/shared.sh function retry { - echo "Attempting with retry:" "$@" - local n=1 - local max=5 - while true; do - "$@" && break || { - if [[ $n -lt $max ]]; then - sleep $n # don't retry immediately - ((n++)) - echo "Command failed. Attempt $n/$max:" - else - echo "The command has failed after $n attempts." - return 1 - fi - } - done + echo "Attempting with retry:" "$@" + local n=1 + local max=5 + while true; do + "$@" && break || { + if [[ $n -lt $max ]]; then + sleep $n # don't retry immediately + ((n++)) + echo "Command failed. Attempt $n/$max:" + else + echo "The command has failed after $n attempts." + return 1 + fi + } + done } download_tar_and_extract_into_dir() { - local url="$1" - local sum="$2" - local dir="$3" - local file=$(mktemp -u) + local url="$1" + local sum="$2" + local dir="$3" + local file=$(mktemp -u) - while :; do - if [[ -f "$file" ]]; then - if ! h="$(sha256sum "$file" | awk '{ print $1 }')"; then - printf 'ERROR: reading hash\n' >&2 - exit 1 - fi + while :; do + if [[ -f "$file" ]]; then + if ! h="$(sha256sum "$file" | awk '{ print $1 }')"; then + printf 'ERROR: reading hash\n' >&2 + exit 1 + fi - if [[ "$h" == "$sum" ]]; then - break - fi + if [[ "$h" == "$sum" ]]; then + break + fi - printf 'WARNING: hash mismatch: %s != expected %s\n' "$h" "$sum" >&2 - rm -f "$file" - fi + printf 'WARNING: hash mismatch: %s != expected %s\n' "$h" "$sum" >&2 + rm -f "$file" + fi - printf 'Downloading: %s\n' "$url" - if ! curl -f -L -o "$file" "$url"; then - rm -f "$file" - sleep 1 - fi - done + printf 'Downloading: %s\n' "$url" + if ! curl -f -L -o "$file" "$url"; then + rm -f "$file" + sleep 1 + fi + done - mkdir -p "$dir" - cd "$dir" - tar -xf "$file" - rm -f "$file" + mkdir -p "$dir" + cd "$dir" + tar -xf "$file" + rm -f "$file" } diff --git a/src/ci/docker/scripts/stage_2_test_set1.sh b/src/ci/docker/scripts/stage_2_test_set1.sh index ce33c6d72d673..6cd429c54b05d 100755 --- a/src/ci/docker/scripts/stage_2_test_set1.sh +++ b/src/ci/docker/scripts/stage_2_test_set1.sh @@ -8,11 +8,11 @@ set -ex # dedicated `tidy` job failing won't block other PR CI jobs from completing, and so tidy failures # shouldn't inhibit revealing other failures in PR CI jobs. if [ "$PR_CI_JOB" == "1" ]; then - echo "PR_CI_JOB set; skipping tidy" - SKIP_TIDY="--skip tidy" + echo "PR_CI_JOB set; skipping tidy" + SKIP_TIDY="--skip tidy" fi ../x.py --stage 2 test \ - ${SKIP_TIDY:+$SKIP_TIDY} \ - --skip compiler \ - --skip src + ${SKIP_TIDY:+$SKIP_TIDY} \ + --skip compiler \ + --skip src diff --git a/src/ci/docker/scripts/stage_2_test_set2.sh b/src/ci/docker/scripts/stage_2_test_set2.sh index a47981c76d6d1..4bee96e168fc5 100755 --- a/src/ci/docker/scripts/stage_2_test_set2.sh +++ b/src/ci/docker/scripts/stage_2_test_set2.sh @@ -8,8 +8,8 @@ set -ex # dedicated `tidy` job failing won't block other PR CI jobs from completing, and so tidy failures # shouldn't inhibit revealing other failures in PR CI jobs. if [ "$PR_CI_JOB" == "1" ]; then - echo "PR_CI_JOB set; skipping tidy" - SKIP_TIDY="--skip tidy" + echo "PR_CI_JOB set; skipping tidy" + SKIP_TIDY="--skip tidy" fi # The combination of rust.randomize-layout and LLVM 21 is causing random @@ -17,15 +17,15 @@ fi # LLVM 22, let's just disable this for now since it has been disruptive for # CI. See https://github.com/rust-lang/rust/issues/156460. if [[ "$CI_JOB_NAME" == *"llvm-21"* ]]; then - echo "CI_JOB_NAME contains 'llvm-21'; skipping rust-analyzer" - SKIP_RUST_ANALYZER="--skip src/tools/rust-analyzer" + echo "CI_JOB_NAME contains 'llvm-21'; skipping rust-analyzer" + SKIP_RUST_ANALYZER="--skip src/tools/rust-analyzer" fi ../x.py --stage 2 test \ - ${SKIP_TIDY:+$SKIP_TIDY} \ - ${SKIP_RUST_ANALYZER:+$SKIP_RUST_ANALYZER} \ - --skip tests \ - --skip coverage-map \ - --skip coverage-run \ - --skip library \ - --skip tidyselftest + ${SKIP_TIDY:+$SKIP_TIDY} \ + ${SKIP_RUST_ANALYZER:+$SKIP_RUST_ANALYZER} \ + --skip tests \ + --skip coverage-map \ + --skip coverage-run \ + --skip library \ + --skip tidyselftest diff --git a/src/ci/run.sh b/src/ci/run.sh index 18b5bf2e2bbb3..e6b5f1b63ed2b 100755 --- a/src/ci/run.sh +++ b/src/ci/run.sh @@ -3,35 +3,35 @@ set -e if [ -n "$CI_JOB_NAME" ]; then - echo "[CI_JOB_NAME=$CI_JOB_NAME]" + echo "[CI_JOB_NAME=$CI_JOB_NAME]" fi if [ -n "$CI_JOB_DOC_URL" ]; then - echo "[CI_JOB_DOC_URL=$CI_JOB_DOC_URL]" + echo "[CI_JOB_DOC_URL=$CI_JOB_DOC_URL]" fi if [ "$NO_CHANGE_USER" = "" ]; then - if [ "$LOCAL_USER_ID" != "" ]; then - id -u user &>/dev/null || useradd --shell /bin/bash -u $LOCAL_USER_ID -o -c "" -m user - export HOME=/home/user - unset LOCAL_USER_ID - - # Ensure that runners are able to execute git commands in the worktree, - # overriding the typical git protections. In our docker container we're running - # as root, while the user owning the checkout is not root. - # This is only necessary when we change the user, otherwise we should - # already be running with the right user. - # - # For NO_CHANGE_USER done in the small number of Dockerfiles affected. - echo -e '[safe]\n\tdirectory = *' > /home/user/.gitconfig - - exec su --preserve-environment -c "env PATH=$PATH \"$0\"" user - fi + if [ "$LOCAL_USER_ID" != "" ]; then + id -u user &>/dev/null || useradd --shell /bin/bash -u $LOCAL_USER_ID -o -c "" -m user + export HOME=/home/user + unset LOCAL_USER_ID + + # Ensure that runners are able to execute git commands in the worktree, + # overriding the typical git protections. In our docker container we're running + # as root, while the user owning the checkout is not root. + # This is only necessary when we change the user, otherwise we should + # already be running with the right user. + # + # For NO_CHANGE_USER done in the small number of Dockerfiles affected. + echo -e '[safe]\n\tdirectory = *' > /home/user/.gitconfig + + exec su --preserve-environment -c "env PATH=$PATH \"$0\"" user + fi fi # only enable core dump on Linux if [ -f /proc/sys/kernel/core_pattern ]; then - ulimit -c unlimited + ulimit -c unlimited fi # There was a bad interaction between "old" 32-bit binaries on current 64-bit @@ -40,10 +40,10 @@ fi # This is probably a kernel bug, but setting `ulimit -Hs` works around it. # See also `dist-i686-linux` where this setting is enabled. if [ "$SET_HARD_RLIMIT_STACK" = "1" ]; then - rlimit_stack=$(ulimit -Ss) - if [ "$rlimit_stack" != "" ]; then - ulimit -Hs "$rlimit_stack" - fi + rlimit_stack=$(ulimit -Ss) + if [ "$rlimit_stack" != "" ]; then + ulimit -Hs "$rlimit_stack" + fi fi ci_dir=`cd $(dirname $0) && pwd` @@ -59,9 +59,9 @@ if [ "$FORCE_CI_RUSTC" == "" ]; then fi if [[ "$RUST_CONFIGURE_ARGS" == *"rust.codegen-backends"* ]]; then - echo "error: Please specify codegen backends using the CODEGEN_BACKENDS environment variable, \ + echo "error: Please specify codegen backends using the CODEGEN_BACKENDS environment variable, \ not via RUST_CONFIGURE_ARGS." - exit 1 + exit 1 fi RUST_CONFIGURE_ARGS="$RUST_CONFIGURE_ARGS --set build.print-step-timings --enable-verbose-tests" @@ -95,19 +95,19 @@ RUST_CONFIGURE_ARGS="$RUST_CONFIGURE_ARGS --dist-compression-formats=xz" # Enable the `c` feature for compiler_builtins, but only when the `compiler-rt` source is available # (to avoid spending a lot of time cloning llvm) if [ "$EXTERNAL_LLVM" = "" ]; then - # Enable building & shipping lld - RUST_CONFIGURE_ARGS="$RUST_CONFIGURE_ARGS --set rust.lld=true" + # Enable building & shipping lld + RUST_CONFIGURE_ARGS="$RUST_CONFIGURE_ARGS --set rust.lld=true" - RUST_CONFIGURE_ARGS="$RUST_CONFIGURE_ARGS --set build.optimized-compiler-builtins" - # Likewise, only demand we test all LLVM components if we know we built LLVM with them - export COMPILETEST_REQUIRE_ALL_LLVM_COMPONENTS=1 + RUST_CONFIGURE_ARGS="$RUST_CONFIGURE_ARGS --set build.optimized-compiler-builtins" + # Likewise, only demand we test all LLVM components if we know we built LLVM with them + export COMPILETEST_REQUIRE_ALL_LLVM_COMPONENTS=1 elif [ "$DEPLOY$DEPLOY_ALT" = "1" ]; then echo "error: dist builds should always use optimized compiler-rt!" >&2 exit 1 fi if [ "$DIST_SRC" = "" ]; then - RUST_CONFIGURE_ARGS="$RUST_CONFIGURE_ARGS --disable-dist-src" + RUST_CONFIGURE_ARGS="$RUST_CONFIGURE_ARGS --disable-dist-src" fi # Always set the release channel for bootstrap; this is normally not important (i.e., only dist @@ -117,99 +117,99 @@ export RUST_RELEASE_CHANNEL=$(releaseChannel) RUST_CONFIGURE_ARGS="$RUST_CONFIGURE_ARGS --release-channel=$RUST_RELEASE_CHANNEL" if [ "$DEPLOY$DEPLOY_ALT" = "1" ]; then - if [[ "$CI_JOB_NAME" == *ohos* ]]; then - RUST_CONFIGURE_ARGS="$RUST_CONFIGURE_ARGS --disable-llvm-static-stdcpp" - else - RUST_CONFIGURE_ARGS="$RUST_CONFIGURE_ARGS --enable-llvm-static-stdcpp" - fi - - if [ "$DEPLOY_ALT" != "" ] && isLinux; then - RUST_CONFIGURE_ARGS="$RUST_CONFIGURE_ARGS --debuginfo-level=2" - else - RUST_CONFIGURE_ARGS="$RUST_CONFIGURE_ARGS --debuginfo-level-std=1" - fi - - if [ "$NO_LLVM_ASSERTIONS" = "1" ]; then - RUST_CONFIGURE_ARGS="$RUST_CONFIGURE_ARGS --disable-llvm-assertions" - elif [ "$DEPLOY_ALT" != "" ]; then - RUST_CONFIGURE_ARGS="$RUST_CONFIGURE_ARGS --enable-llvm-assertions" - RUST_CONFIGURE_ARGS="$RUST_CONFIGURE_ARGS --set rust.verify-llvm-ir" - fi + if [[ "$CI_JOB_NAME" == *ohos* ]]; then + RUST_CONFIGURE_ARGS="$RUST_CONFIGURE_ARGS --disable-llvm-static-stdcpp" + else + RUST_CONFIGURE_ARGS="$RUST_CONFIGURE_ARGS --enable-llvm-static-stdcpp" + fi + + if [ "$DEPLOY_ALT" != "" ] && isLinux; then + RUST_CONFIGURE_ARGS="$RUST_CONFIGURE_ARGS --debuginfo-level=2" + else + RUST_CONFIGURE_ARGS="$RUST_CONFIGURE_ARGS --debuginfo-level-std=1" + fi + + if [ "$NO_LLVM_ASSERTIONS" = "1" ]; then + RUST_CONFIGURE_ARGS="$RUST_CONFIGURE_ARGS --disable-llvm-assertions" + elif [ "$DEPLOY_ALT" != "" ]; then + RUST_CONFIGURE_ARGS="$RUST_CONFIGURE_ARGS --enable-llvm-assertions" + RUST_CONFIGURE_ARGS="$RUST_CONFIGURE_ARGS --set rust.verify-llvm-ir" + fi + + CODEGEN_BACKENDS="${CODEGEN_BACKENDS:-llvm}" + RUST_CONFIGURE_ARGS="$RUST_CONFIGURE_ARGS --set rust.codegen-backends=$CODEGEN_BACKENDS" + + # Unless explicitly disabled, we want rustc debug assertions on the -alt builds + if [ "$DEPLOY_ALT" != "" ] && [ "$NO_DEBUG_ASSERTIONS" = "" ]; then + RUST_CONFIGURE_ARGS="$RUST_CONFIGURE_ARGS --enable-debug-assertions" + fi +else + RUST_CONFIGURE_ARGS="$RUST_CONFIGURE_ARGS --set rust.remap-debuginfo=false" - CODEGEN_BACKENDS="${CODEGEN_BACKENDS:-llvm}" - RUST_CONFIGURE_ARGS="$RUST_CONFIGURE_ARGS --set rust.codegen-backends=$CODEGEN_BACKENDS" + # We almost always want debug assertions enabled, but sometimes this takes too + # long for too little benefit, so we just turn them off. + if [ "$NO_DEBUG_ASSERTIONS" = "" ]; then + RUST_CONFIGURE_ARGS="$RUST_CONFIGURE_ARGS --enable-debug-assertions" + fi - # Unless explicitly disabled, we want rustc debug assertions on the -alt builds - if [ "$DEPLOY_ALT" != "" ] && [ "$NO_DEBUG_ASSERTIONS" = "" ]; then - RUST_CONFIGURE_ARGS="$RUST_CONFIGURE_ARGS --enable-debug-assertions" - fi -else - RUST_CONFIGURE_ARGS="$RUST_CONFIGURE_ARGS --set rust.remap-debuginfo=false" - - # We almost always want debug assertions enabled, but sometimes this takes too - # long for too little benefit, so we just turn them off. - if [ "$NO_DEBUG_ASSERTIONS" = "" ]; then - RUST_CONFIGURE_ARGS="$RUST_CONFIGURE_ARGS --enable-debug-assertions" - fi - - # Same for overflow checks - if [ "$NO_OVERFLOW_CHECKS" = "" ]; then - RUST_CONFIGURE_ARGS="$RUST_CONFIGURE_ARGS --enable-overflow-checks" - fi - - # In general we always want to run tests with LLVM assertions enabled, but not - # all platforms currently support that, so we have an option to disable. - if [ "$NO_LLVM_ASSERTIONS" = "" ]; then - RUST_CONFIGURE_ARGS="$RUST_CONFIGURE_ARGS --enable-llvm-assertions" - fi - - RUST_CONFIGURE_ARGS="$RUST_CONFIGURE_ARGS --set rust.verify-llvm-ir" - - # When running gcc backend tests, we need to install `libgccjit` and to not run llvm codegen - # tests as it will fail them. - if [[ "${ENABLE_GCC_CODEGEN}" == "1" ]]; then - # Test the Cranelift and GCC backends in CI. Bootstrap knows which targets to run tests on. - CODEGEN_BACKENDS="${CODEGEN_BACKENDS:-llvm,cranelift,gcc}" - else - # Test the Cranelift backend in CI. Bootstrap knows which targets to run tests on. - CODEGEN_BACKENDS="${CODEGEN_BACKENDS:-llvm,cranelift}" - fi - RUST_CONFIGURE_ARGS="$RUST_CONFIGURE_ARGS --set rust.codegen-backends=$CODEGEN_BACKENDS" - - # We enable this for non-dist builders, since those aren't trying to produce - # fresh binaries. We currently don't entirely support distributing a fresh - # copy of the compiler (including llvm tools, etc.) if we haven't actually - # built LLVM, since not everything necessary is copied into the - # local-usage-only LLVM artifacts. If that changes, this could maybe be made - # true for all builds. In practice it's probably a good idea to keep building - # LLVM continuously on at least some builders to ensure it works, though. - # (And PGO is its own can of worms). - if [ "$NO_DOWNLOAD_CI_LLVM" = "" ]; then - RUST_CONFIGURE_ARGS="$RUST_CONFIGURE_ARGS --set llvm.download-ci-llvm=if-unchanged" - else - # CI rustc requires CI LLVM to be enabled (see https://github.com/rust-lang/rust/issues/123586). - NO_DOWNLOAD_CI_RUSTC=1 - # When building for CI we want to use the static C++ Standard library - # included with LLVM, since a dynamic libstdcpp may not be available. - RUST_CONFIGURE_ARGS="$RUST_CONFIGURE_ARGS --set llvm.static-libstdcpp" - fi - - # Download GCC from CI on test builders - RUST_CONFIGURE_ARGS="$RUST_CONFIGURE_ARGS --set gcc.download-ci-gcc=true" - - # download-rustc seems to be broken on CI after the stage0 redesign - # Disable it until these issues are debugged and resolved + # Same for overflow checks + if [ "$NO_OVERFLOW_CHECKS" = "" ]; then + RUST_CONFIGURE_ARGS="$RUST_CONFIGURE_ARGS --enable-overflow-checks" + fi + + # In general we always want to run tests with LLVM assertions enabled, but not + # all platforms currently support that, so we have an option to disable. + if [ "$NO_LLVM_ASSERTIONS" = "" ]; then + RUST_CONFIGURE_ARGS="$RUST_CONFIGURE_ARGS --enable-llvm-assertions" + fi + + RUST_CONFIGURE_ARGS="$RUST_CONFIGURE_ARGS --set rust.verify-llvm-ir" + + # When running gcc backend tests, we need to install `libgccjit` and to not run llvm codegen + # tests as it will fail them. + if [[ "${ENABLE_GCC_CODEGEN}" == "1" ]]; then + # Test the Cranelift and GCC backends in CI. Bootstrap knows which targets to run tests on. + CODEGEN_BACKENDS="${CODEGEN_BACKENDS:-llvm,cranelift,gcc}" + else + # Test the Cranelift backend in CI. Bootstrap knows which targets to run tests on. + CODEGEN_BACKENDS="${CODEGEN_BACKENDS:-llvm,cranelift}" + fi + RUST_CONFIGURE_ARGS="$RUST_CONFIGURE_ARGS --set rust.codegen-backends=$CODEGEN_BACKENDS" + + # We enable this for non-dist builders, since those aren't trying to produce + # fresh binaries. We currently don't entirely support distributing a fresh + # copy of the compiler (including llvm tools, etc.) if we haven't actually + # built LLVM, since not everything necessary is copied into the + # local-usage-only LLVM artifacts. If that changes, this could maybe be made + # true for all builds. In practice it's probably a good idea to keep building + # LLVM continuously on at least some builders to ensure it works, though. + # (And PGO is its own can of worms). + if [ "$NO_DOWNLOAD_CI_LLVM" = "" ]; then + RUST_CONFIGURE_ARGS="$RUST_CONFIGURE_ARGS --set llvm.download-ci-llvm=if-unchanged" + else + # CI rustc requires CI LLVM to be enabled (see https://github.com/rust-lang/rust/issues/123586). + NO_DOWNLOAD_CI_RUSTC=1 + # When building for CI we want to use the static C++ Standard library + # included with LLVM, since a dynamic libstdcpp may not be available. + RUST_CONFIGURE_ARGS="$RUST_CONFIGURE_ARGS --set llvm.static-libstdcpp" + fi + + # Download GCC from CI on test builders + RUST_CONFIGURE_ARGS="$RUST_CONFIGURE_ARGS --set gcc.download-ci-gcc=true" + + # download-rustc seems to be broken on CI after the stage0 redesign + # Disable it until these issues are debugged and resolved # if [ "$NO_DOWNLOAD_CI_RUSTC" = "" ]; then # RUST_CONFIGURE_ARGS="$RUST_CONFIGURE_ARGS --set rust.download-rustc=if-unchanged" # fi fi if [ "$ENABLE_GCC_CODEGEN" = "1" ]; then - # If `ENABLE_GCC_CODEGEN` is set and not empty, we add the `--enable-new-symbol-mangling` - # argument to `RUST_CONFIGURE_ARGS` and set the `GCC_EXEC_PREFIX` environment variable. - # `cg_gcc` doesn't support the legacy mangling so we need to enforce the new one - # if we run `cg_gcc` tests. - RUST_CONFIGURE_ARGS="$RUST_CONFIGURE_ARGS --enable-new-symbol-mangling" + # If `ENABLE_GCC_CODEGEN` is set and not empty, we add the `--enable-new-symbol-mangling` + # argument to `RUST_CONFIGURE_ARGS` and set the `GCC_EXEC_PREFIX` environment variable. + # `cg_gcc` doesn't support the legacy mangling so we need to enforce the new one + # if we run `cg_gcc` tests. + RUST_CONFIGURE_ARGS="$RUST_CONFIGURE_ARGS --enable-new-symbol-mangling" fi # If bootstrap fails, we want to see its backtrace @@ -219,25 +219,25 @@ export RUST_BACKTRACE=1 # check for clock drifts. An HTTP URL is used instead of HTTPS since on Azure # Pipelines it happened that the certificates were marked as expired. datecheck() { - # If an error has happened, we do not want to start a new group, because that will collapse - # a previous group that might have contained the error log. - exit_code=$? - - if [ $exit_code -eq 0 ] - then - echo "::group::Clock drift check" - fi - - echo -n " local time: " - date - echo -n " network time: " - curl -fs --head http://ci-caches.rust-lang.org | grep ^Date: \ - | sed 's/Date: //g' || true - - if [ $exit_code -eq 0 ] - then - echo "::endgroup::" - fi + # If an error has happened, we do not want to start a new group, because that will collapse + # a previous group that might have contained the error log. + exit_code=$? + + if [ $exit_code -eq 0 ] + then + echo "::group::Clock drift check" + fi + + echo -n " local time: " + date + echo -n " network time: " + curl -fs --head http://ci-caches.rust-lang.org | grep ^Date: \ + | sed 's/Date: //g' || true + + if [ $exit_code -eq 0 ] + then + echo "::endgroup::" + fi } datecheck trap datecheck EXIT @@ -270,17 +270,17 @@ fi echo "::endgroup::" if [ ! -z "$SCRIPT" ]; then - echo "Executing ${SCRIPT}" - sh -x -c "$SCRIPT" + echo "Executing ${SCRIPT}" + sh -x -c "$SCRIPT" else - do_make() { + do_make() { echo "make -j $ncpus $1" make -j $ncpus $1 local retval=$? return $retval - } + } - do_make "$RUST_CHECK_TARGET" + do_make "$RUST_CHECK_TARGET" fi echo "::group::sccache stats" diff --git a/src/ci/scripts/checkout-submodules.sh b/src/ci/scripts/checkout-submodules.sh index e38e20d47c3db..11d78fe465af8 100755 --- a/src/ci/scripts/checkout-submodules.sh +++ b/src/ci/scripts/checkout-submodules.sh @@ -17,7 +17,7 @@ ci_dir=$(cd $(dirname $0) && pwd)/.. # On the beta channel we'll be automatically calculating the prerelease version # via the git history, so unshallow our shallow clone from CI. if [ "$(releaseChannel)" = "beta" ]; then - git fetch origin --unshallow beta main + git fetch origin --unshallow beta main fi function fetch_github_commit_archive { @@ -55,11 +55,11 @@ for i in ${!modules[@]}; do bg_pids[${i}]=$! continue else - # Submodule paths contained in SKIP_SUBMODULES (comma-separated list) will not be - # checked out. - if [ -z "${SKIP_SUBMODULES:-}" ] || [[ ! ",$SKIP_SUBMODULES," = *",$module,"* ]]; then - use_git="$use_git $module" - fi + # Submodule paths contained in SKIP_SUBMODULES (comma-separated list) will not be + # checked out. + if [ -z "${SKIP_SUBMODULES:-}" ] || [[ ! ",$SKIP_SUBMODULES," = *",$module,"* ]]; then + use_git="$use_git $module" + fi fi done retry sh -c "git submodule deinit -f $use_git && \ diff --git a/src/ci/scripts/install-sccache.sh b/src/ci/scripts/install-sccache.sh index fed06063fa0b3..72f02cf602fd5 100755 --- a/src/ci/scripts/install-sccache.sh +++ b/src/ci/scripts/install-sccache.sh @@ -9,12 +9,12 @@ source "$(cd "$(dirname "$0")" && pwd)/../shared.sh" if isMacOS; then curl -fo /usr/local/bin/sccache \ - "${MIRRORS_BASE}/2025-02-24-sccache-v0.10.0-x86_64-apple-darwin" + "${MIRRORS_BASE}/2025-02-24-sccache-v0.10.0-x86_64-apple-darwin" chmod +x /usr/local/bin/sccache elif isWindows; then mkdir -p sccache curl -fo sccache/sccache.exe \ - "${MIRRORS_BASE}/2025-02-24-sccache-v0.10.0-x86_64-pc-windows-msvc.exe" + "${MIRRORS_BASE}/2025-02-24-sccache-v0.10.0-x86_64-pc-windows-msvc.exe" ciCommandAddPath "$(cygpath -m "$(pwd)/sccache")" fi diff --git a/src/ci/scripts/upload-artifacts.sh b/src/ci/scripts/upload-artifacts.sh index e1e53adfd0de0..dfbd32da18a69 100755 --- a/src/ci/scripts/upload-artifacts.sh +++ b/src/ci/scripts/upload-artifacts.sh @@ -73,15 +73,15 @@ access_url="https://ci-artifacts.rust-lang.org/${deploy_dir}/$(ciCommit)" # to make them easily accessible. if [ -n "${GITHUB_STEP_SUMMARY}" ] then - archives=($(find "${upload_dir}" -maxdepth 1 -name "*.xz")) + archives=($(find "${upload_dir}" -maxdepth 1 -name "*.xz")) - # Avoid generating an invalid "*.xz" file if there are no archives - if [ ${#archives[@]} -gt 0 ]; then - echo "# CI artifacts" >> "${GITHUB_STEP_SUMMARY}" + # Avoid generating an invalid "*.xz" file if there are no archives + if [ ${#archives[@]} -gt 0 ]; then + echo "# CI artifacts" >> "${GITHUB_STEP_SUMMARY}" - for filename in "${upload_dir}"/*.xz; do - filename=$(basename "${filename}") - echo "- [${filename}](${access_url}/${filename})" >> "${GITHUB_STEP_SUMMARY}" - done - fi + for filename in "${upload_dir}"/*.xz; do + filename=$(basename "${filename}") + echo "- [${filename}](${access_url}/${filename})" >> "${GITHUB_STEP_SUMMARY}" + done + fi fi diff --git a/src/ci/scripts/verify-backported-commits.sh b/src/ci/scripts/verify-backported-commits.sh index e7d2692e1187d..5126770c9eb00 100755 --- a/src/ci/scripts/verify-backported-commits.sh +++ b/src/ci/scripts/verify-backported-commits.sh @@ -12,23 +12,23 @@ BETA_LIMIT="53fd98ca776cb875bc9e5514f56b52eb74f9e7a9" STABLE_LIMIT="a178d0322ce20e33eac124758e837cbd80a6f633" verify_backported_commits_main() { - ci_base_branch=$(ciBaseBranch) + ci_base_branch=$(ciBaseBranch) - if [[ "$ci_base_branch" != "beta" && "$ci_base_branch" != "stable" ]]; then - echo 'Skipping. This is only run when merging to the beta or stable branches.' - exit 0 - fi + if [[ "$ci_base_branch" != "beta" && "$ci_base_branch" != "stable" ]]; then + echo 'Skipping. This is only run when merging to the beta or stable branches.' + exit 0 + fi - if [[ $ci_base_branch == "beta" ]]; then - verify_cherries HEAD "$BETA_LIMIT" \ - || exit 1 + if [[ $ci_base_branch == "beta" ]]; then + verify_cherries HEAD "$BETA_LIMIT" \ + || exit 1 - elif [[ $ci_base_branch == "stable" ]]; then - (verify_cherries HEAD "$STABLE_LIMIT" \ - & verify_cherries beta "$STABLE_LIMIT") \ - || exit 1 + elif [[ $ci_base_branch == "stable" ]]; then + (verify_cherries HEAD "$STABLE_LIMIT" \ + & verify_cherries beta "$STABLE_LIMIT") \ + || exit 1 - fi + fi } # Verify all commits in `HEAD` are backports of a commit in . See @@ -37,52 +37,52 @@ verify_backported_commits_main() { # $1 = # $2 = verify_cherries() { - # commits that lack a `backport-of` comment. - local no_backports=() - # commits with an incorrect `backport-of` comment. - local bad_backports=() + # commits that lack a `backport-of` comment. + local no_backports=() + # commits with an incorrect `backport-of` comment. + local bad_backports=() - commits=$(git cherry "origin/$1" HEAD "$2") + commits=$(git cherry "origin/$1" HEAD "$2") - if [[ -z "$commits" ]]; then - echo "All commits in \`HEAD\` are present in \`$1\`" - return 0 - fi + if [[ -z "$commits" ]]; then + echo "All commits in \`HEAD\` are present in \`$1\`" + return 0 + fi - commits=$(echo "$commits" | grep '^\+' | cut -c 3-) + commits=$(echo "$commits" | grep '^\+' | cut -c 3-) - while read sha; do - # Check each commit in .. - backport_sha=$(get_backport "$sha") + while read sha; do + # Check each commit in .. + backport_sha=$(get_backport "$sha") - if [[ "$backport_sha" == "nothing" ]]; then - echo "✓ \`$sha\` backports nothing" - continue - fi + if [[ "$backport_sha" == "nothing" ]]; then + echo "✓ \`$sha\` backports nothing" + continue + fi - if [[ -z "$backport_sha" ]]; then - no_backports+=("$sha") - continue - fi + if [[ -z "$backport_sha" ]]; then + no_backports+=("$sha") + continue + fi - if ! is_in_default_branch "$backport_sha"; then - bad_backports+=("$sha") - continue - fi + if ! is_in_default_branch "$backport_sha"; then + bad_backports+=("$sha") + continue + fi - echo "✓ \`$sha\` backports \`$backport_sha\`" - done <<< "$commits" + echo "✓ \`$sha\` backports \`$backport_sha\`" + done <<< "$commits" - failure=0 + failure=0 - if [ ${#no_backports[@]} -ne 0 ]; then + if [ ${#no_backports[@]} -ne 0 ]; then echo 'Error: Could not find backports for all commits.' echo echo 'All commits in \`HEAD\` are required to have a corresponding upstream commit.' echo 'It looks like the following commits:' echo for commit in "${no_backports[@]}"; do - echo " $commit" + echo " $commit" done echo echo "do not match any commits in \`$1\`. If this was intended, add the text" @@ -90,24 +90,24 @@ verify_cherries() { echo 'somewhere in the message of each of these commits.' echo failure=1 - fi + fi - if [ ${#bad_backports[@]} -ne 0 ]; then + if [ ${#bad_backports[@]} -ne 0 ]; then echo 'Error: Found incorrectly marked commits.' echo echo 'The following commits:' echo for commit in "${bad_backports[@]}"; do - echo " $commit" + echo " $commit" done echo echo 'have commit messages marked \`backport-of: \`, but the SHA is not in' echo 'the default branch.' echo failure=1 - fi + fi - return $failure + return $failure } # Get the backport of a commit. It echoes one of: @@ -118,26 +118,26 @@ verify_cherries() { # # $1 = get_backport() { - # This regex is: - # - # ^.* - throw away any extra starting characters - # backport-of: - prefix - # \s\? - optional space - # \(\) - capture group - # [a-f0-9]\+\|nothing - a SHA or the text 'nothing' - # .* - throw away any extra ending characters - # \1 - replace it with the first match - # {s//\1/p;q} - print the first occurrence and quit - # - git show -s --format=%B "$1" \ - | sed -n '/^.*backport-of:\s\?\([a-f0-9]\+\|nothing\).*/{s//\1/p;q}' + # This regex is: + # + # ^.* - throw away any extra starting characters + # backport-of: - prefix + # \s\? - optional space + # \(\) - capture group + # [a-f0-9]\+\|nothing - a SHA or the text 'nothing' + # .* - throw away any extra ending characters + # \1 - replace it with the first match + # {s//\1/p;q} - print the first occurrence and quit + # + git show -s --format=%B "$1" \ + | sed -n '/^.*backport-of:\s\?\([a-f0-9]\+\|nothing\).*/{s//\1/p;q}' } # Check if a commit is in the default branch. # # $1 = is_in_default_branch() { - git merge-base --is-ancestor "$1" origin/HEAD 2> /dev/null + git merge-base --is-ancestor "$1" origin/HEAD 2> /dev/null } verify_backported_commits_main diff --git a/src/ci/shared.sh b/src/ci/shared.sh index 9fce68947f429..fc3201c4a8500 100644 --- a/src/ci/shared.sh +++ b/src/ci/shared.sh @@ -10,21 +10,21 @@ export MIRRORS_BASE="https://ci-mirrors.rust-lang.org/rustc" # See https://unix.stackexchange.com/questions/82598 # Duplicated in docker/scripts/shared.sh function retry { - echo "Attempting with retry:" "$@" - local n=1 - local max=5 - while true; do - "$@" && break || { - if [[ $n -lt $max ]]; then - sleep $n # don't retry immediately - ((n++)) - echo "Command failed. Attempt $n/$max:" - else - echo "The command has failed after $n attempts." - return 1 - fi - } - done + echo "Attempting with retry:" "$@" + local n=1 + local max=5 + while true; do + "$@" && break || { + if [[ $n -lt $max ]]; then + sleep $n # don't retry immediately + ((n++)) + echo "Command failed. Attempt $n/$max:" + else + echo "The command has failed after $n attempts." + return 1 + fi + } + done } function isCI { diff --git a/src/tools/cherry-pick.sh b/src/tools/cherry-pick.sh index 90539a96389b0..68532e3a8fc44 100755 --- a/src/tools/cherry-pick.sh +++ b/src/tools/cherry-pick.sh @@ -3,32 +3,32 @@ set -euo pipefail IFS=$'\n\t' print_error() { - echo "Error: \`$1\` is not a valid commit. To debug, run:" - echo - echo " git rev-parse --verify $1" - echo + echo "Error: \`$1\` is not a valid commit. To debug, run:" + echo + echo " git rev-parse --verify $1" + echo } full_sha() { - git rev-parse \ - --verify \ - --quiet \ - "$1^{object}" || print_error $1 + git rev-parse \ + --verify \ + --quiet \ + "$1^{object}" || print_error $1 } commit_message_with_backport_note() { - message=$(git log --format=%B -n 1 $1) - echo $message | awk "NR==1{print; print \"\n(backport-of: $1)\"} NR!=1" + message=$(git log --format=%B -n 1 $1) + echo $message | awk "NR==1{print; print \"\n(backport-of: $1)\"} NR!=1" } cherry_pick_commit() { - sha=$(full_sha $1) - git cherry-pick $sha > /dev/null - git commit \ - --amend \ - --file <(commit_message_with_backport_note $sha) + sha=$(full_sha $1) + git cherry-pick $sha > /dev/null + git commit \ + --amend \ + --file <(commit_message_with_backport_note $sha) } for arg ; do - cherry_pick_commit $arg + cherry_pick_commit $arg done From 28078303f26ab091c3980f251466629380b224a0 Mon Sep 17 00:00:00 2001 From: Michael Baumgartner Date: Sun, 28 Jun 2026 12:15:20 +0200 Subject: [PATCH 21/29] =?UTF-8?q?Fix=20EditorConfig=20f=C3=BCr=20.gitmodul?= =?UTF-8?q?es?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When git creates or modifies this file, it uses tab characters. --- .editorconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.editorconfig b/.editorconfig index 3fac95bd97c77..e89e710ca36c3 100644 --- a/.editorconfig +++ b/.editorconfig @@ -63,7 +63,7 @@ indent_size = 1 [yarn.lock] indent_size = 2 -[Makefile] +[{Makefile,.gitmodules}] indent_style = tab # The license texts should NEVER be modified. From 8530d846a45c1151cf8f32e3d66d7fb5040a173b Mon Sep 17 00:00:00 2001 From: Michael Baumgartner Date: Sun, 28 Jun 2026 14:15:47 +0200 Subject: [PATCH 22/29] Fix ./x test ./x test failed early due to too long line --- src/ci/run.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/ci/run.sh b/src/ci/run.sh index e6b5f1b63ed2b..5f8bfe5dfc71b 100755 --- a/src/ci/run.sh +++ b/src/ci/run.sh @@ -187,7 +187,8 @@ else if [ "$NO_DOWNLOAD_CI_LLVM" = "" ]; then RUST_CONFIGURE_ARGS="$RUST_CONFIGURE_ARGS --set llvm.download-ci-llvm=if-unchanged" else - # CI rustc requires CI LLVM to be enabled (see https://github.com/rust-lang/rust/issues/123586). + # CI rustc requires CI LLVM to be enabled + # (see https://github.com/rust-lang/rust/issues/123586). NO_DOWNLOAD_CI_RUSTC=1 # When building for CI we want to use the static C++ Standard library # included with LLVM, since a dynamic libstdcpp may not be available. From 3f0a7e8938ed849c4fe8c894900b11aa5588ca9f Mon Sep 17 00:00:00 2001 From: Michael Baumgartner Date: Sun, 28 Jun 2026 14:55:58 +0200 Subject: [PATCH 23/29] Fix EditorConfig fish shell completions --- .editorconfig | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.editorconfig b/.editorconfig index e89e710ca36c3..563f69aaf1309 100644 --- a/.editorconfig +++ b/.editorconfig @@ -62,6 +62,10 @@ indent_size = 2 indent_size = 1 [yarn.lock] indent_size = 2 +# The completions are auto generated with clap_complete and this uses tabs for fish shell +# Asked for the reason there: https://github.com/clap-rs/clap/discussions/6418 +[src/etc/completions/*.fish] +indent_style = tab [{Makefile,.gitmodules}] indent_style = tab From 010438abf9d9df93bb744292788a1112f7023d30 Mon Sep 17 00:00:00 2001 From: Michael Baumgartner Date: Sun, 28 Jun 2026 15:28:26 +0200 Subject: [PATCH 24/29] Insert final newline in check files Only one of them had already a final newline. All tests still pass after these insertions (executed with ./x test). --- tests/run-make/autodiff/type-trees/array-typetree/array.check | 2 +- tests/run-make/autodiff/type-trees/memcpy-typetree/memcpy.check | 2 +- .../autodiff/type-trees/mixed-struct-typetree/mixed.check | 2 +- tests/run-make/autodiff/type-trees/nott-flag/nott.check | 2 +- tests/run-make/autodiff/type-trees/nott-flag/with_tt.check | 2 +- .../autodiff/type-trees/recursion-typetree/recursion.check | 2 +- .../autodiff/type-trees/scalar-types/f128-typetree/f128.check | 2 +- .../autodiff/type-trees/scalar-types/f16-typetree/f16.check | 2 +- .../autodiff/type-trees/scalar-types/f32-typetree/f32.check | 2 +- .../autodiff/type-trees/scalar-types/f64-typetree/f64.check | 2 +- .../autodiff/type-trees/scalar-types/i32-typetree/i32.check | 2 +- tests/run-make/autodiff/type-trees/slice-typetree/slice.check | 2 +- tests/run-make/autodiff/type-trees/struct-typetree/struct.check | 2 +- tests/run-make/autodiff/type-trees/tuple-typetree/tuple.check | 2 +- .../autodiff/type-trees/type-analysis/array/array.check | 2 +- .../autodiff/type-trees/type-analysis/array3d/array3d.check | 2 +- tests/run-make/autodiff/type-trees/type-analysis/box/box.check | 2 +- .../type-trees/type-analysis/const_pointer/const_pointer.check | 2 +- tests/run-make/autodiff/type-trees/type-analysis/f32/f32.check | 2 +- tests/run-make/autodiff/type-trees/type-analysis/f64/f64.check | 2 +- .../run-make/autodiff/type-trees/type-analysis/i128/i128.check | 2 +- tests/run-make/autodiff/type-trees/type-analysis/i16/i16.check | 2 +- tests/run-make/autodiff/type-trees/type-analysis/i32/i32.check | 2 +- tests/run-make/autodiff/type-trees/type-analysis/i8/i8.check | 2 +- .../autodiff/type-trees/type-analysis/isize/isize.check | 2 +- .../type-trees/type-analysis/mut_pointer/mut_pointer.check | 2 +- .../autodiff/type-trees/type-analysis/mut_ref/mut_ref.check | 2 +- tests/run-make/autodiff/type-trees/type-analysis/ref/ref.check | 2 +- .../autodiff/type-trees/type-analysis/struct/struct.check | 2 +- .../run-make/autodiff/type-trees/type-analysis/u128/u128.check | 2 +- tests/run-make/autodiff/type-trees/type-analysis/u16/u16.check | 2 +- tests/run-make/autodiff/type-trees/type-analysis/u32/u32.check | 2 +- tests/run-make/autodiff/type-trees/type-analysis/u8/u8.check | 2 +- .../autodiff/type-trees/type-analysis/union/union.check | 2 +- .../autodiff/type-trees/type-analysis/usize/usize.check | 2 +- tests/run-make/autodiff/type-trees/type-analysis/vec/vec.check | 2 +- 36 files changed, 36 insertions(+), 36 deletions(-) diff --git a/tests/run-make/autodiff/type-trees/array-typetree/array.check b/tests/run-make/autodiff/type-trees/array-typetree/array.check index 0d38bdec17e84..364ec300426f9 100644 --- a/tests/run-make/autodiff/type-trees/array-typetree/array.check +++ b/tests/run-make/autodiff/type-trees/array-typetree/array.check @@ -1,4 +1,4 @@ ; Check that array TypeTree metadata is correctly generated ; Should show Float@double at each array element offset (0, 8, 16, 24, 32 bytes) -CHECK: define{{.*}}"enzyme_type"="{[-1]:Float@double}"{{.*}}@test_array{{.*}}"enzyme_type"="{[-1]:Pointer, [-1,-1]:Float@double}" \ No newline at end of file +CHECK: define{{.*}}"enzyme_type"="{[-1]:Float@double}"{{.*}}@test_array{{.*}}"enzyme_type"="{[-1]:Pointer, [-1,-1]:Float@double}" diff --git a/tests/run-make/autodiff/type-trees/memcpy-typetree/memcpy.check b/tests/run-make/autodiff/type-trees/memcpy-typetree/memcpy.check index ae70830297a78..a424e67d2a36c 100644 --- a/tests/run-make/autodiff/type-trees/memcpy-typetree/memcpy.check +++ b/tests/run-make/autodiff/type-trees/memcpy-typetree/memcpy.check @@ -10,4 +10,4 @@ CHECK-DAG: load double{{.*}}: {[-1]:Float@double} CHECK-DAG: fmul double{{.*}}: {[-1]:Float@double} -CHECK-DAG: fadd double{{.*}}: {[-1]:Float@double} \ No newline at end of file +CHECK-DAG: fadd double{{.*}}: {[-1]:Float@double} diff --git a/tests/run-make/autodiff/type-trees/mixed-struct-typetree/mixed.check b/tests/run-make/autodiff/type-trees/mixed-struct-typetree/mixed.check index 584f584084358..68f5dd721536c 100644 --- a/tests/run-make/autodiff/type-trees/mixed-struct-typetree/mixed.check +++ b/tests/run-make/autodiff/type-trees/mixed-struct-typetree/mixed.check @@ -1,2 +1,2 @@ ; Check that mixed struct with large array generates correct detailed type tree -CHECK: define{{.*}}"enzyme_type"="{[-1]:Float@float}"{{.*}}@test_mixed_struct{{.*}}"enzyme_type"="{[-1]:Pointer, [-1,0]:Integer, [-1,8]:Float@float}" \ No newline at end of file +CHECK: define{{.*}}"enzyme_type"="{[-1]:Float@float}"{{.*}}@test_mixed_struct{{.*}}"enzyme_type"="{[-1]:Pointer, [-1,0]:Integer, [-1,8]:Float@float}" diff --git a/tests/run-make/autodiff/type-trees/nott-flag/nott.check b/tests/run-make/autodiff/type-trees/nott-flag/nott.check index 8d23e2ee31957..abe54db6f3443 100644 --- a/tests/run-make/autodiff/type-trees/nott-flag/nott.check +++ b/tests/run-make/autodiff/type-trees/nott-flag/nott.check @@ -2,4 +2,4 @@ // This verifies the NoTT flag correctly disables TypeTree metadata CHECK: define{{.*}}@square -CHECK-NOT: "enzyme_type" \ No newline at end of file +CHECK-NOT: "enzyme_type" diff --git a/tests/run-make/autodiff/type-trees/nott-flag/with_tt.check b/tests/run-make/autodiff/type-trees/nott-flag/with_tt.check index 0b4c91191798b..fa75aff7db11d 100644 --- a/tests/run-make/autodiff/type-trees/nott-flag/with_tt.check +++ b/tests/run-make/autodiff/type-trees/nott-flag/with_tt.check @@ -1,4 +1,4 @@ // Check that enzyme_type attributes are present when TypeTree is enabled // This verifies our TypeTree metadata attachment is working -CHECK: define{{.*}}"enzyme_type"="{[-1]:Float@double}"{{.*}}@square{{.*}}"enzyme_type"="{[-1]:Pointer, [-1,0]:Float@double}" \ No newline at end of file +CHECK: define{{.*}}"enzyme_type"="{[-1]:Float@double}"{{.*}}@square{{.*}}"enzyme_type"="{[-1]:Pointer, [-1,0]:Float@double}" diff --git a/tests/run-make/autodiff/type-trees/recursion-typetree/recursion.check b/tests/run-make/autodiff/type-trees/recursion-typetree/recursion.check index 1960e7b816c5f..49a25c103ad4e 100644 --- a/tests/run-make/autodiff/type-trees/recursion-typetree/recursion.check +++ b/tests/run-make/autodiff/type-trees/recursion-typetree/recursion.check @@ -1,3 +1,3 @@ CHECK: define{{.*}}"enzyme_type"="{[-1]:Float@double}"{{.*}}@test_deep{{.*}}"enzyme_type"="{[-1]:Pointer, [-1,0]:Float@double}" CHECK: define{{.*}}"enzyme_type"="{[-1]:Float@double}"{{.*}}@test_graph{{.*}}"enzyme_type"="{[-1]:Pointer, [-1,0]:Integer, [-1,8]:Integer, [-1,16]:Integer, [-1,24]:Float@double}" -CHECK: define{{.*}}"enzyme_type"="{[-1]:Float@double}"{{.*}}@test_node{{.*}}"enzyme_type"="{[-1]:Pointer, [-1,0]:Float@double}" \ No newline at end of file +CHECK: define{{.*}}"enzyme_type"="{[-1]:Float@double}"{{.*}}@test_node{{.*}}"enzyme_type"="{[-1]:Pointer, [-1,0]:Float@double}" diff --git a/tests/run-make/autodiff/type-trees/scalar-types/f128-typetree/f128.check b/tests/run-make/autodiff/type-trees/scalar-types/f128-typetree/f128.check index 23db64eea52aa..e0745ba7df6d8 100644 --- a/tests/run-make/autodiff/type-trees/scalar-types/f128-typetree/f128.check +++ b/tests/run-make/autodiff/type-trees/scalar-types/f128-typetree/f128.check @@ -1,4 +1,4 @@ ; Check that f128 TypeTree metadata is correctly generated ; Should show Float@fp128 for f128 values and Pointer for references -CHECK: define{{.*}}"enzyme_type"="{[-1]:Float@fp128}"{{.*}}@test_f128{{.*}}"enzyme_type"="{[-1]:Pointer, [-1,0]:Float@fp128}" \ No newline at end of file +CHECK: define{{.*}}"enzyme_type"="{[-1]:Float@fp128}"{{.*}}@test_f128{{.*}}"enzyme_type"="{[-1]:Pointer, [-1,0]:Float@fp128}" diff --git a/tests/run-make/autodiff/type-trees/scalar-types/f16-typetree/f16.check b/tests/run-make/autodiff/type-trees/scalar-types/f16-typetree/f16.check index 9adff68d36f34..ece0a642aea4a 100644 --- a/tests/run-make/autodiff/type-trees/scalar-types/f16-typetree/f16.check +++ b/tests/run-make/autodiff/type-trees/scalar-types/f16-typetree/f16.check @@ -1,4 +1,4 @@ ; Check that f16 TypeTree metadata is correctly generated ; Should show Float@half for f16 values and Pointer for references -CHECK: define{{.*}}"enzyme_type"="{[-1]:Float@half}"{{.*}}@test_f16{{.*}}"enzyme_type"="{[-1]:Pointer, [-1,0]:Float@half}" \ No newline at end of file +CHECK: define{{.*}}"enzyme_type"="{[-1]:Float@half}"{{.*}}@test_f16{{.*}}"enzyme_type"="{[-1]:Pointer, [-1,0]:Float@half}" diff --git a/tests/run-make/autodiff/type-trees/scalar-types/f32-typetree/f32.check b/tests/run-make/autodiff/type-trees/scalar-types/f32-typetree/f32.check index 176630f57e8f7..fc8a260040916 100644 --- a/tests/run-make/autodiff/type-trees/scalar-types/f32-typetree/f32.check +++ b/tests/run-make/autodiff/type-trees/scalar-types/f32-typetree/f32.check @@ -1,4 +1,4 @@ ; Check that f32 TypeTree metadata is correctly generated ; Should show Float@float for f32 values and Pointer for references -CHECK: define{{.*}}"enzyme_type"="{[-1]:Float@float}"{{.*}}@test_f32{{.*}}"enzyme_type"="{[-1]:Pointer, [-1,0]:Float@float}" \ No newline at end of file +CHECK: define{{.*}}"enzyme_type"="{[-1]:Float@float}"{{.*}}@test_f32{{.*}}"enzyme_type"="{[-1]:Pointer, [-1,0]:Float@float}" diff --git a/tests/run-make/autodiff/type-trees/scalar-types/f64-typetree/f64.check b/tests/run-make/autodiff/type-trees/scalar-types/f64-typetree/f64.check index 929cd379694ac..aee555f6df47b 100644 --- a/tests/run-make/autodiff/type-trees/scalar-types/f64-typetree/f64.check +++ b/tests/run-make/autodiff/type-trees/scalar-types/f64-typetree/f64.check @@ -1,4 +1,4 @@ ; Check that f64 TypeTree metadata is correctly generated ; Should show Float@double for f64 values and Pointer for references -CHECK: define{{.*}}"enzyme_type"="{[-1]:Float@double}"{{.*}}@test_f64{{.*}}"enzyme_type"="{[-1]:Pointer, [-1,0]:Float@double}" \ No newline at end of file +CHECK: define{{.*}}"enzyme_type"="{[-1]:Float@double}"{{.*}}@test_f64{{.*}}"enzyme_type"="{[-1]:Pointer, [-1,0]:Float@double}" diff --git a/tests/run-make/autodiff/type-trees/scalar-types/i32-typetree/i32.check b/tests/run-make/autodiff/type-trees/scalar-types/i32-typetree/i32.check index dee4aa5bbb6b2..3b5f25ac06d5b 100644 --- a/tests/run-make/autodiff/type-trees/scalar-types/i32-typetree/i32.check +++ b/tests/run-make/autodiff/type-trees/scalar-types/i32-typetree/i32.check @@ -1,4 +1,4 @@ ; Check that i32 TypeTree metadata is correctly generated ; Should show Integer for i32 values and Pointer for references -CHECK: define{{.*}}"enzyme_type"="{[-1]:Integer}"{{.*}}@test_i32{{.*}}"enzyme_type"="{[-1]:Pointer, [-1,0]:Integer}" \ No newline at end of file +CHECK: define{{.*}}"enzyme_type"="{[-1]:Integer}"{{.*}}@test_i32{{.*}}"enzyme_type"="{[-1]:Pointer, [-1,0]:Integer}" diff --git a/tests/run-make/autodiff/type-trees/slice-typetree/slice.check b/tests/run-make/autodiff/type-trees/slice-typetree/slice.check index 6543b61611538..bd6f6ac2b0b75 100644 --- a/tests/run-make/autodiff/type-trees/slice-typetree/slice.check +++ b/tests/run-make/autodiff/type-trees/slice-typetree/slice.check @@ -1,4 +1,4 @@ ; Check that slice TypeTree metadata is correctly generated ; Should show Float@double for slice elements -CHECK: define{{.*}}"enzyme_type"="{[-1]:Float@double}"{{.*}}@test_slice{{.*}}"enzyme_type"="{[-1]:Pointer, [-1,-1]:Float@double}" \ No newline at end of file +CHECK: define{{.*}}"enzyme_type"="{[-1]:Float@double}"{{.*}}@test_slice{{.*}}"enzyme_type"="{[-1]:Pointer, [-1,-1]:Float@double}" diff --git a/tests/run-make/autodiff/type-trees/struct-typetree/struct.check b/tests/run-make/autodiff/type-trees/struct-typetree/struct.check index 54956317e1e95..a0f0a01c46736 100644 --- a/tests/run-make/autodiff/type-trees/struct-typetree/struct.check +++ b/tests/run-make/autodiff/type-trees/struct-typetree/struct.check @@ -1,4 +1,4 @@ ; Check that struct TypeTree metadata is correctly generated ; Should show Float@double at offsets 0, 8, 16 for Point struct fields -CHECK: define{{.*}}"enzyme_type"="{[-1]:Float@double}"{{.*}}@test_struct{{.*}}"enzyme_type"="{[-1]:Pointer, [-1,0]:Float@double, [-1,8]:Float@double, [-1,16]:Float@double}" \ No newline at end of file +CHECK: define{{.*}}"enzyme_type"="{[-1]:Float@double}"{{.*}}@test_struct{{.*}}"enzyme_type"="{[-1]:Pointer, [-1,0]:Float@double, [-1,8]:Float@double, [-1,16]:Float@double}" diff --git a/tests/run-make/autodiff/type-trees/tuple-typetree/tuple.check b/tests/run-make/autodiff/type-trees/tuple-typetree/tuple.check index 47647e78cc35c..672751bd70750 100644 --- a/tests/run-make/autodiff/type-trees/tuple-typetree/tuple.check +++ b/tests/run-make/autodiff/type-trees/tuple-typetree/tuple.check @@ -1,4 +1,4 @@ ; Check that tuple TypeTree metadata is correctly generated ; Should show Float@double at offsets 0, 8, 16 for (f64, f64, f64) -CHECK: define{{.*}}"enzyme_type"="{[-1]:Float@double}"{{.*}}@test_tuple{{.*}}"enzyme_type"="{[-1]:Pointer, [-1,0]:Float@double, [-1,8]:Float@double, [-1,16]:Float@double}" \ No newline at end of file +CHECK: define{{.*}}"enzyme_type"="{[-1]:Float@double}"{{.*}}@test_tuple{{.*}}"enzyme_type"="{[-1]:Pointer, [-1,0]:Float@double, [-1,8]:Float@double, [-1,16]:Float@double}" diff --git a/tests/run-make/autodiff/type-trees/type-analysis/array/array.check b/tests/run-make/autodiff/type-trees/type-analysis/array/array.check index 6e4197692a7b9..d05ece676ffdc 100644 --- a/tests/run-make/autodiff/type-trees/type-analysis/array/array.check +++ b/tests/run-make/autodiff/type-trees/type-analysis/array/array.check @@ -23,4 +23,4 @@ // CHECK-DAG: %{{[0-9]+}} = load float, ptr %{{[0-9]+}}, align 4, !dbg !{{[0-9]+}}, !noundef !{{[0-9]+}}: {[-1]:Float@float} // CHECK-DAG: %{{[0-9]+}} = fmul float %{{[0-9]+}}, %{{[0-9]+}}, !dbg !{{[0-9]+}}: {[-1]:Float@float} // CHECK-DAG: %{{[0-9]+}} = fadd float %{{[0-9]+}}, %{{[0-9]+}}, !dbg !{{[0-9]+}}: {[-1]:Float@float} -// CHECK-DAG: ret float %{{[0-9]+}}, !dbg !{{[0-9]+}}: {} \ No newline at end of file +// CHECK-DAG: ret float %{{[0-9]+}}, !dbg !{{[0-9]+}}: {} diff --git a/tests/run-make/autodiff/type-trees/type-analysis/array3d/array3d.check b/tests/run-make/autodiff/type-trees/type-analysis/array3d/array3d.check index ed81ad4869acd..b28a8b48ed1ea 100644 --- a/tests/run-make/autodiff/type-trees/type-analysis/array3d/array3d.check +++ b/tests/run-make/autodiff/type-trees/type-analysis/array3d/array3d.check @@ -51,4 +51,4 @@ // CHECK-DAG: %{{[0-9]+}} = load float, ptr %{{[0-9]+}}, align 4, !dbg !{{[0-9]+}}, !noundef !{{[0-9]+}}: {[-1]:Float@float} // CHECK-DAG: %{{[0-9]+}} = fmul float %{{[0-9]+}}, %{{[0-9]+}}, !dbg !{{[0-9]+}}: {[-1]:Float@float} // CHECK-DAG: %{{[0-9]+}} = fadd float %{{[0-9]+}}, %{{[0-9]+}}, !dbg !{{[0-9]+}}: {[-1]:Float@float} -// CHECK-DAG: br i1 %{{[0-9]+}}, label %{{[0-9]+}}, label %{{[0-9]+}}, !dbg !{{[0-9]+}}: {} \ No newline at end of file +// CHECK-DAG: br i1 %{{[0-9]+}}, label %{{[0-9]+}}, label %{{[0-9]+}}, !dbg !{{[0-9]+}}: {} diff --git a/tests/run-make/autodiff/type-trees/type-analysis/box/box.check b/tests/run-make/autodiff/type-trees/type-analysis/box/box.check index 1911e18a13754..17002d3cffc87 100644 --- a/tests/run-make/autodiff/type-trees/type-analysis/box/box.check +++ b/tests/run-make/autodiff/type-trees/type-analysis/box/box.check @@ -9,4 +9,4 @@ // CHECK-DAG: %{{[0-9]+}} = load ptr, ptr %{{[0-9]+}}, align 8, !dbg !{{[0-9]+}}, !nonnull !{{[0-9]+}}, !align !{{[0-9]+}}, !noundef !{{[0-9]+}}: {[-1]:Pointer, [-1,0]:Float@float} // CHECK-DAG: %{{[0-9]+}} = load float, ptr %{{[0-9]+}}, align 4, !dbg !{{[0-9]+}}, !noundef !{{[0-9]+}}: {[-1]:Float@float} // CHECK-DAG: %{{[0-9]+}} = fmul float %{{[0-9]+}}, %{{[0-9]+}}, !dbg !{{[0-9]+}}: {[-1]:Float@float} -// CHECK-DAG: ret float %{{[0-9]+}}, !dbg !{{[0-9]+}}: {} \ No newline at end of file +// CHECK-DAG: ret float %{{[0-9]+}}, !dbg !{{[0-9]+}}: {} diff --git a/tests/run-make/autodiff/type-trees/type-analysis/const_pointer/const_pointer.check b/tests/run-make/autodiff/type-trees/type-analysis/const_pointer/const_pointer.check index e7503453f8e6d..2bd1334a98b8e 100644 --- a/tests/run-make/autodiff/type-trees/type-analysis/const_pointer/const_pointer.check +++ b/tests/run-make/autodiff/type-trees/type-analysis/const_pointer/const_pointer.check @@ -7,4 +7,4 @@ // CHECK: ptr %{{[0-9]+}}: {[-1]:Pointer, [-1,0]:Float@float} // CHECK-DAG: %{{[0-9]+}} = load float, ptr %{{[0-9]+}}, align 4, !dbg !{{[0-9]+}}, !noundef !{{[0-9]+}}: {[-1]:Float@float} // CHECK-DAG: %{{[0-9]+}} = fmul float %{{[0-9]+}}, %{{[0-9]+}}, !dbg !{{[0-9]+}}: {[-1]:Float@float} -// CHECK-DAG: ret float %{{[0-9]+}}, !dbg !{{[0-9]+}}: {} \ No newline at end of file +// CHECK-DAG: ret float %{{[0-9]+}}, !dbg !{{[0-9]+}}: {} diff --git a/tests/run-make/autodiff/type-trees/type-analysis/f32/f32.check b/tests/run-make/autodiff/type-trees/type-analysis/f32/f32.check index 0cc0ffda43d08..4c79c3990a974 100644 --- a/tests/run-make/autodiff/type-trees/type-analysis/f32/f32.check +++ b/tests/run-make/autodiff/type-trees/type-analysis/f32/f32.check @@ -9,4 +9,4 @@ // CHECK-DAG: %{{[0-9]+}} = load float, ptr %{{[0-9]+}}, align 4, !dbg !{{[0-9]+}}, !noundef !{{[0-9]+}}: {[-1]:Float@float} // CHECK-DAG: %{{[0-9]+}} = fmul float %{{[0-9]+}}, %{{[0-9]+}}, !dbg !{{[0-9]+}}: {[-1]:Float@float} -// CHECK-DAG: ret float %{{[0-9]+}}, !dbg !{{[0-9]+}}: {} \ No newline at end of file +// CHECK-DAG: ret float %{{[0-9]+}}, !dbg !{{[0-9]+}}: {} diff --git a/tests/run-make/autodiff/type-trees/type-analysis/f64/f64.check b/tests/run-make/autodiff/type-trees/type-analysis/f64/f64.check index efc49da5ffcc8..bbb769c1ada54 100644 --- a/tests/run-make/autodiff/type-trees/type-analysis/f64/f64.check +++ b/tests/run-make/autodiff/type-trees/type-analysis/f64/f64.check @@ -7,4 +7,4 @@ // CHECK: ptr %{{[0-9]+}}: {[-1]:Pointer, [-1,0]:Float@double} // CHECK-DAG: %{{[0-9]+}} = load double, ptr %{{[0-9]+}}, align 8, !dbg !{{[0-9]+}}, !noundef !{{[0-9]+}}: {[-1]:Float@double} // CHECK-DAG: %{{[0-9]+}} = fmul double %{{[0-9]+}}, %{{[0-9]+}}, !dbg !{{[0-9]+}}: {[-1]:Float@double} -// CHECK-DAG: ret double %{{[0-9]+}}, !dbg !{{[0-9]+}}: {} \ No newline at end of file +// CHECK-DAG: ret double %{{[0-9]+}}, !dbg !{{[0-9]+}}: {} diff --git a/tests/run-make/autodiff/type-trees/type-analysis/i128/i128.check b/tests/run-make/autodiff/type-trees/type-analysis/i128/i128.check index 31a07219e743d..4d93adec006a2 100644 --- a/tests/run-make/autodiff/type-trees/type-analysis/i128/i128.check +++ b/tests/run-make/autodiff/type-trees/type-analysis/i128/i128.check @@ -7,4 +7,4 @@ // CHECK: ptr %{{[0-9]+}}: {[-1]:Pointer, [-1,0]:Integer, [-1,1]:Integer, [-1,2]:Integer, [-1,3]:Integer, [-1,4]:Integer, [-1,5]:Integer, [-1,6]:Integer, [-1,7]:Integer, [-1,8]:Integer, [-1,9]:Integer, [-1,10]:Integer, [-1,11]:Integer, [-1,12]:Integer, [-1,13]:Integer, [-1,14]:Integer, [-1,15]:Integer} // CHECK-DAG: %{{[0-9]+}} = load i128, ptr %{{[0-9]+}}, align 16, !dbg !{{[0-9]+}}, !noundef !{{[0-9]+}}: {[-1]:Integer} // CHECK-DAG: %{{[0-9]+}} = mul i128 %{{[0-9]+}}, %{{[0-9]+}}, !dbg !{{[0-9]+}}: {[-1]:Integer} -// CHECK-DAG: ret i128 %{{[0-9]+}}, !dbg !{{[0-9]+}}: {} \ No newline at end of file +// CHECK-DAG: ret i128 %{{[0-9]+}}, !dbg !{{[0-9]+}}: {} diff --git a/tests/run-make/autodiff/type-trees/type-analysis/i16/i16.check b/tests/run-make/autodiff/type-trees/type-analysis/i16/i16.check index 8cc299532c500..fb9ddeb66b599 100644 --- a/tests/run-make/autodiff/type-trees/type-analysis/i16/i16.check +++ b/tests/run-make/autodiff/type-trees/type-analysis/i16/i16.check @@ -7,4 +7,4 @@ // CHECK: ptr %{{[0-9]+}}: {[-1]:Pointer, [-1,0]:Integer, [-1,1]:Integer} // CHECK-DAG: %{{[0-9]+}} = load i16, ptr %{{[0-9]+}}, align 2, !dbg !{{[0-9]+}}, !noundef !{{[0-9]+}}: {[-1]:Integer} // CHECK-DAG: %{{[0-9]+}} = mul i16 %{{[0-9]+}}, %{{[0-9]+}}, !dbg !{{[0-9]+}}: {[-1]:Integer} -// CHECK-DAG: ret i16 %{{[0-9]+}}, !dbg !{{[0-9]+}}: {} \ No newline at end of file +// CHECK-DAG: ret i16 %{{[0-9]+}}, !dbg !{{[0-9]+}}: {} diff --git a/tests/run-make/autodiff/type-trees/type-analysis/i32/i32.check b/tests/run-make/autodiff/type-trees/type-analysis/i32/i32.check index 4df982887d74a..71d8403da042c 100644 --- a/tests/run-make/autodiff/type-trees/type-analysis/i32/i32.check +++ b/tests/run-make/autodiff/type-trees/type-analysis/i32/i32.check @@ -7,4 +7,4 @@ // CHECK: ptr %{{[0-9]+}}: {[-1]:Pointer, [-1,0]:Integer, [-1,1]:Integer, [-1,2]:Integer, [-1,3]:Integer} // CHECK-DAG: %{{[0-9]+}} = load i32, ptr %{{[0-9]+}}, align 4, !dbg !{{[0-9]+}}, !noundef !{{[0-9]+}}: {[-1]:Integer} // CHECK-DAG: %{{[0-9]+}} = mul i32 %{{[0-9]+}}, %{{[0-9]+}}, !dbg !{{[0-9]+}}: {[-1]:Integer} -// CHECK-DAG: ret i32 %{{[0-9]+}}, !dbg !{{[0-9]+}}: {} \ No newline at end of file +// CHECK-DAG: ret i32 %{{[0-9]+}}, !dbg !{{[0-9]+}}: {} diff --git a/tests/run-make/autodiff/type-trees/type-analysis/i8/i8.check b/tests/run-make/autodiff/type-trees/type-analysis/i8/i8.check index 651a2085bc6f7..c447afc3b1c41 100644 --- a/tests/run-make/autodiff/type-trees/type-analysis/i8/i8.check +++ b/tests/run-make/autodiff/type-trees/type-analysis/i8/i8.check @@ -7,4 +7,4 @@ // CHECK: ptr %{{[0-9]+}}: {[-1]:Pointer, [-1,0]:Integer} // CHECK-DAG: %{{[0-9]+}} = load i8, ptr %{{[0-9]+}}, align 1, !dbg !{{[0-9]+}}, !noundef !{{[0-9]+}}: {[-1]:Integer} // CHECK-DAG: %{{[0-9]+}} = mul i8 %{{[0-9]+}}, %{{[0-9]+}}, !dbg !{{[0-9]+}}: {[-1]:Integer} -// CHECK-DAG: ret i8 %{{[0-9]+}}, !dbg !{{[0-9]+}}: {} \ No newline at end of file +// CHECK-DAG: ret i8 %{{[0-9]+}}, !dbg !{{[0-9]+}}: {} diff --git a/tests/run-make/autodiff/type-trees/type-analysis/isize/isize.check b/tests/run-make/autodiff/type-trees/type-analysis/isize/isize.check index 40ee6edc02c08..daed79d18f5b6 100644 --- a/tests/run-make/autodiff/type-trees/type-analysis/isize/isize.check +++ b/tests/run-make/autodiff/type-trees/type-analysis/isize/isize.check @@ -7,4 +7,4 @@ // CHECK: ptr %{{[0-9]+}}: {[-1]:Pointer, [-1,0]:Integer, [-1,1]:Integer, [-1,2]:Integer, [-1,3]:Integer, [-1,4]:Integer, [-1,5]:Integer, [-1,6]:Integer, [-1,7]:Integer} // CHECK-DAG: %{{[0-9]+}} = load i64, ptr %{{[0-9]+}}, align 8, !dbg !{{[0-9]+}}, !noundef !{{[0-9]+}}: {[-1]:Integer} // CHECK-DAG: %{{[0-9]+}} = mul i64 %{{[0-9]+}}, %{{[0-9]+}}, !dbg !{{[0-9]+}}: {[-1]:Integer} -// CHECK-DAG: ret i64 %{{[0-9]+}}, !dbg !{{[0-9]+}}: {} \ No newline at end of file +// CHECK-DAG: ret i64 %{{[0-9]+}}, !dbg !{{[0-9]+}}: {} diff --git a/tests/run-make/autodiff/type-trees/type-analysis/mut_pointer/mut_pointer.check b/tests/run-make/autodiff/type-trees/type-analysis/mut_pointer/mut_pointer.check index e7503453f8e6d..2bd1334a98b8e 100644 --- a/tests/run-make/autodiff/type-trees/type-analysis/mut_pointer/mut_pointer.check +++ b/tests/run-make/autodiff/type-trees/type-analysis/mut_pointer/mut_pointer.check @@ -7,4 +7,4 @@ // CHECK: ptr %{{[0-9]+}}: {[-1]:Pointer, [-1,0]:Float@float} // CHECK-DAG: %{{[0-9]+}} = load float, ptr %{{[0-9]+}}, align 4, !dbg !{{[0-9]+}}, !noundef !{{[0-9]+}}: {[-1]:Float@float} // CHECK-DAG: %{{[0-9]+}} = fmul float %{{[0-9]+}}, %{{[0-9]+}}, !dbg !{{[0-9]+}}: {[-1]:Float@float} -// CHECK-DAG: ret float %{{[0-9]+}}, !dbg !{{[0-9]+}}: {} \ No newline at end of file +// CHECK-DAG: ret float %{{[0-9]+}}, !dbg !{{[0-9]+}}: {} diff --git a/tests/run-make/autodiff/type-trees/type-analysis/mut_ref/mut_ref.check b/tests/run-make/autodiff/type-trees/type-analysis/mut_ref/mut_ref.check index e7503453f8e6d..2bd1334a98b8e 100644 --- a/tests/run-make/autodiff/type-trees/type-analysis/mut_ref/mut_ref.check +++ b/tests/run-make/autodiff/type-trees/type-analysis/mut_ref/mut_ref.check @@ -7,4 +7,4 @@ // CHECK: ptr %{{[0-9]+}}: {[-1]:Pointer, [-1,0]:Float@float} // CHECK-DAG: %{{[0-9]+}} = load float, ptr %{{[0-9]+}}, align 4, !dbg !{{[0-9]+}}, !noundef !{{[0-9]+}}: {[-1]:Float@float} // CHECK-DAG: %{{[0-9]+}} = fmul float %{{[0-9]+}}, %{{[0-9]+}}, !dbg !{{[0-9]+}}: {[-1]:Float@float} -// CHECK-DAG: ret float %{{[0-9]+}}, !dbg !{{[0-9]+}}: {} \ No newline at end of file +// CHECK-DAG: ret float %{{[0-9]+}}, !dbg !{{[0-9]+}}: {} diff --git a/tests/run-make/autodiff/type-trees/type-analysis/ref/ref.check b/tests/run-make/autodiff/type-trees/type-analysis/ref/ref.check index e7503453f8e6d..2bd1334a98b8e 100644 --- a/tests/run-make/autodiff/type-trees/type-analysis/ref/ref.check +++ b/tests/run-make/autodiff/type-trees/type-analysis/ref/ref.check @@ -7,4 +7,4 @@ // CHECK: ptr %{{[0-9]+}}: {[-1]:Pointer, [-1,0]:Float@float} // CHECK-DAG: %{{[0-9]+}} = load float, ptr %{{[0-9]+}}, align 4, !dbg !{{[0-9]+}}, !noundef !{{[0-9]+}}: {[-1]:Float@float} // CHECK-DAG: %{{[0-9]+}} = fmul float %{{[0-9]+}}, %{{[0-9]+}}, !dbg !{{[0-9]+}}: {[-1]:Float@float} -// CHECK-DAG: ret float %{{[0-9]+}}, !dbg !{{[0-9]+}}: {} \ No newline at end of file +// CHECK-DAG: ret float %{{[0-9]+}}, !dbg !{{[0-9]+}}: {} diff --git a/tests/run-make/autodiff/type-trees/type-analysis/struct/struct.check b/tests/run-make/autodiff/type-trees/type-analysis/struct/struct.check index e7503453f8e6d..2bd1334a98b8e 100644 --- a/tests/run-make/autodiff/type-trees/type-analysis/struct/struct.check +++ b/tests/run-make/autodiff/type-trees/type-analysis/struct/struct.check @@ -7,4 +7,4 @@ // CHECK: ptr %{{[0-9]+}}: {[-1]:Pointer, [-1,0]:Float@float} // CHECK-DAG: %{{[0-9]+}} = load float, ptr %{{[0-9]+}}, align 4, !dbg !{{[0-9]+}}, !noundef !{{[0-9]+}}: {[-1]:Float@float} // CHECK-DAG: %{{[0-9]+}} = fmul float %{{[0-9]+}}, %{{[0-9]+}}, !dbg !{{[0-9]+}}: {[-1]:Float@float} -// CHECK-DAG: ret float %{{[0-9]+}}, !dbg !{{[0-9]+}}: {} \ No newline at end of file +// CHECK-DAG: ret float %{{[0-9]+}}, !dbg !{{[0-9]+}}: {} diff --git a/tests/run-make/autodiff/type-trees/type-analysis/u128/u128.check b/tests/run-make/autodiff/type-trees/type-analysis/u128/u128.check index 31a07219e743d..4d93adec006a2 100644 --- a/tests/run-make/autodiff/type-trees/type-analysis/u128/u128.check +++ b/tests/run-make/autodiff/type-trees/type-analysis/u128/u128.check @@ -7,4 +7,4 @@ // CHECK: ptr %{{[0-9]+}}: {[-1]:Pointer, [-1,0]:Integer, [-1,1]:Integer, [-1,2]:Integer, [-1,3]:Integer, [-1,4]:Integer, [-1,5]:Integer, [-1,6]:Integer, [-1,7]:Integer, [-1,8]:Integer, [-1,9]:Integer, [-1,10]:Integer, [-1,11]:Integer, [-1,12]:Integer, [-1,13]:Integer, [-1,14]:Integer, [-1,15]:Integer} // CHECK-DAG: %{{[0-9]+}} = load i128, ptr %{{[0-9]+}}, align 16, !dbg !{{[0-9]+}}, !noundef !{{[0-9]+}}: {[-1]:Integer} // CHECK-DAG: %{{[0-9]+}} = mul i128 %{{[0-9]+}}, %{{[0-9]+}}, !dbg !{{[0-9]+}}: {[-1]:Integer} -// CHECK-DAG: ret i128 %{{[0-9]+}}, !dbg !{{[0-9]+}}: {} \ No newline at end of file +// CHECK-DAG: ret i128 %{{[0-9]+}}, !dbg !{{[0-9]+}}: {} diff --git a/tests/run-make/autodiff/type-trees/type-analysis/u16/u16.check b/tests/run-make/autodiff/type-trees/type-analysis/u16/u16.check index 8cc299532c500..fb9ddeb66b599 100644 --- a/tests/run-make/autodiff/type-trees/type-analysis/u16/u16.check +++ b/tests/run-make/autodiff/type-trees/type-analysis/u16/u16.check @@ -7,4 +7,4 @@ // CHECK: ptr %{{[0-9]+}}: {[-1]:Pointer, [-1,0]:Integer, [-1,1]:Integer} // CHECK-DAG: %{{[0-9]+}} = load i16, ptr %{{[0-9]+}}, align 2, !dbg !{{[0-9]+}}, !noundef !{{[0-9]+}}: {[-1]:Integer} // CHECK-DAG: %{{[0-9]+}} = mul i16 %{{[0-9]+}}, %{{[0-9]+}}, !dbg !{{[0-9]+}}: {[-1]:Integer} -// CHECK-DAG: ret i16 %{{[0-9]+}}, !dbg !{{[0-9]+}}: {} \ No newline at end of file +// CHECK-DAG: ret i16 %{{[0-9]+}}, !dbg !{{[0-9]+}}: {} diff --git a/tests/run-make/autodiff/type-trees/type-analysis/u32/u32.check b/tests/run-make/autodiff/type-trees/type-analysis/u32/u32.check index 4df982887d74a..71d8403da042c 100644 --- a/tests/run-make/autodiff/type-trees/type-analysis/u32/u32.check +++ b/tests/run-make/autodiff/type-trees/type-analysis/u32/u32.check @@ -7,4 +7,4 @@ // CHECK: ptr %{{[0-9]+}}: {[-1]:Pointer, [-1,0]:Integer, [-1,1]:Integer, [-1,2]:Integer, [-1,3]:Integer} // CHECK-DAG: %{{[0-9]+}} = load i32, ptr %{{[0-9]+}}, align 4, !dbg !{{[0-9]+}}, !noundef !{{[0-9]+}}: {[-1]:Integer} // CHECK-DAG: %{{[0-9]+}} = mul i32 %{{[0-9]+}}, %{{[0-9]+}}, !dbg !{{[0-9]+}}: {[-1]:Integer} -// CHECK-DAG: ret i32 %{{[0-9]+}}, !dbg !{{[0-9]+}}: {} \ No newline at end of file +// CHECK-DAG: ret i32 %{{[0-9]+}}, !dbg !{{[0-9]+}}: {} diff --git a/tests/run-make/autodiff/type-trees/type-analysis/u8/u8.check b/tests/run-make/autodiff/type-trees/type-analysis/u8/u8.check index 651a2085bc6f7..c447afc3b1c41 100644 --- a/tests/run-make/autodiff/type-trees/type-analysis/u8/u8.check +++ b/tests/run-make/autodiff/type-trees/type-analysis/u8/u8.check @@ -7,4 +7,4 @@ // CHECK: ptr %{{[0-9]+}}: {[-1]:Pointer, [-1,0]:Integer} // CHECK-DAG: %{{[0-9]+}} = load i8, ptr %{{[0-9]+}}, align 1, !dbg !{{[0-9]+}}, !noundef !{{[0-9]+}}: {[-1]:Integer} // CHECK-DAG: %{{[0-9]+}} = mul i8 %{{[0-9]+}}, %{{[0-9]+}}, !dbg !{{[0-9]+}}: {[-1]:Integer} -// CHECK-DAG: ret i8 %{{[0-9]+}}, !dbg !{{[0-9]+}}: {} \ No newline at end of file +// CHECK-DAG: ret i8 %{{[0-9]+}}, !dbg !{{[0-9]+}}: {} diff --git a/tests/run-make/autodiff/type-trees/type-analysis/union/union.check b/tests/run-make/autodiff/type-trees/type-analysis/union/union.check index e7503453f8e6d..2bd1334a98b8e 100644 --- a/tests/run-make/autodiff/type-trees/type-analysis/union/union.check +++ b/tests/run-make/autodiff/type-trees/type-analysis/union/union.check @@ -7,4 +7,4 @@ // CHECK: ptr %{{[0-9]+}}: {[-1]:Pointer, [-1,0]:Float@float} // CHECK-DAG: %{{[0-9]+}} = load float, ptr %{{[0-9]+}}, align 4, !dbg !{{[0-9]+}}, !noundef !{{[0-9]+}}: {[-1]:Float@float} // CHECK-DAG: %{{[0-9]+}} = fmul float %{{[0-9]+}}, %{{[0-9]+}}, !dbg !{{[0-9]+}}: {[-1]:Float@float} -// CHECK-DAG: ret float %{{[0-9]+}}, !dbg !{{[0-9]+}}: {} \ No newline at end of file +// CHECK-DAG: ret float %{{[0-9]+}}, !dbg !{{[0-9]+}}: {} diff --git a/tests/run-make/autodiff/type-trees/type-analysis/usize/usize.check b/tests/run-make/autodiff/type-trees/type-analysis/usize/usize.check index 40ee6edc02c08..daed79d18f5b6 100644 --- a/tests/run-make/autodiff/type-trees/type-analysis/usize/usize.check +++ b/tests/run-make/autodiff/type-trees/type-analysis/usize/usize.check @@ -7,4 +7,4 @@ // CHECK: ptr %{{[0-9]+}}: {[-1]:Pointer, [-1,0]:Integer, [-1,1]:Integer, [-1,2]:Integer, [-1,3]:Integer, [-1,4]:Integer, [-1,5]:Integer, [-1,6]:Integer, [-1,7]:Integer} // CHECK-DAG: %{{[0-9]+}} = load i64, ptr %{{[0-9]+}}, align 8, !dbg !{{[0-9]+}}, !noundef !{{[0-9]+}}: {[-1]:Integer} // CHECK-DAG: %{{[0-9]+}} = mul i64 %{{[0-9]+}}, %{{[0-9]+}}, !dbg !{{[0-9]+}}: {[-1]:Integer} -// CHECK-DAG: ret i64 %{{[0-9]+}}, !dbg !{{[0-9]+}}: {} \ No newline at end of file +// CHECK-DAG: ret i64 %{{[0-9]+}}, !dbg !{{[0-9]+}}: {} diff --git a/tests/run-make/autodiff/type-trees/type-analysis/vec/vec.check b/tests/run-make/autodiff/type-trees/type-analysis/vec/vec.check index cdb70eb83fc19..d07260b80dcc3 100644 --- a/tests/run-make/autodiff/type-trees/type-analysis/vec/vec.check +++ b/tests/run-make/autodiff/type-trees/type-analysis/vec/vec.check @@ -15,4 +15,4 @@ // CHECK-DAG: %{{[0-9]+}} = icmp eq i64 %{{[0-9]+}}, %{{[0-9]+}}, !dbg !{{[0-9]+}}: {[-1]:Integer} // CHECK-DAG: br i1 %{{[0-9]+}}, label %{{[0-9]+}}, label %{{[0-9]+}}, !dbg !{{[0-9]+}}: {} // CHECK-DAG: %{{[0-9]+}} = phi float [ -0.000000e+00, %{{[0-9]+}} ], [ %{{[0-9]+}}, %{{[0-9]+}} ], !dbg !{{[0-9]+}}: {[-1]:Float@float} -// CHECK-DAG: ret float %{{[0-9]+}}, !dbg !{{[0-9]+}}: {} \ No newline at end of file +// CHECK-DAG: ret float %{{[0-9]+}}, !dbg !{{[0-9]+}}: {} From 468c817cc0f314f4827ceccb98aeb732d65f2ef3 Mon Sep 17 00:00:00 2001 From: Michael Baumgartner Date: Sun, 28 Jun 2026 18:22:48 +0200 Subject: [PATCH 25/29] Address missing final newlines --- .ecformat_ignore | 1 + .editorconfig | 8 ++++++++ .github/ISSUE_TEMPLATE/diagnostics.yaml | 2 +- tests/debuginfo/text-to-include-1.txt | 2 +- tests/debuginfo/text-to-include-2.txt | 2 +- tests/debuginfo/text-to-include-3.txt | 2 +- tests/run-make-cargo/thumb-none-qemu/example/memory.x | 2 +- tests/run-make/raw-dylib-stdcall-ordinal/exporter-gnu.def | 2 +- .../run-make/raw-dylib-stdcall-ordinal/exporter-msvc.def | 2 +- tests/run-make/wasm-exceptions-nostd/verify.mjs | 2 +- tests/rustdoc-ui/argfile/commandline-argfile-badutf8.args | 2 +- tests/rustdoc-ui/argfile/commandline-argfile.args | 2 +- tests/ui/argfile/commandline-argfile-badutf8.args | 2 +- tests/ui/argfile/commandline-argfile.args | 2 +- .../shell-argfiles/shell-argfiles-via-argfile-shell.args | 2 +- tests/ui/shell-argfiles/shell-argfiles-via-argfile.args | 2 +- 16 files changed, 23 insertions(+), 14 deletions(-) diff --git a/.ecformat_ignore b/.ecformat_ignore index 1c6e7999986df..c48882fe0f5bb 100644 --- a/.ecformat_ignore +++ b/.ecformat_ignore @@ -33,6 +33,7 @@ src/etc/installer/gfx/* *.ico *.woff *.woff2 +tests/run-make/checksum-freshness/binary_file tests/ui/macros/not-utf8.bin # Some special cases cannot be handled: diff --git a/.editorconfig b/.editorconfig index 563f69aaf1309..be6f8a0849504 100644 --- a/.editorconfig +++ b/.editorconfig @@ -34,6 +34,11 @@ end_of_line = crlf [tests/ui/{include-macros/data.bin,json/json-bom-plus-crlf*.rs}] charset = utf-8-bom end_of_line = crlf +# these specific files have no trailing newline to test on these +[tests/ui/{lint/unused_parens_multibyte_recovery.rs,parser/{macro/macro-missing-right-paren.rs,missing_right_paren.rs}}] +insert_final_newline = false +[tests/{pretty/issue-74745.rs,ui/{parser/issues/issue-{62524,68730,58094-missing-right-square-bracket}.rs,type/issue-91268.rs}}] +insert_final_newline = false [src/llvm-project] indent_style = unset @@ -56,6 +61,9 @@ indent_size = 1 [*.{json,json5,yml,yaml,natvis,nix}] indent_size = 2 +[{src/doc/full-toc.inc,src/tools/nix-dev-shell/envrc-flake}] +indent_size = 2 + # You should NOT modify these files with your editor, # but if you do it anyway use the correct formatting. [Cargo.lock] diff --git a/.github/ISSUE_TEMPLATE/diagnostics.yaml b/.github/ISSUE_TEMPLATE/diagnostics.yaml index 54bf2bc6ee242..eb7a54e91e83e 100644 --- a/.github/ISSUE_TEMPLATE/diagnostics.yaml +++ b/.github/ISSUE_TEMPLATE/diagnostics.yaml @@ -75,4 +75,4 @@ body: label: Anything else? description: If you have more details you want to give us to reproduce this issue, please add it here validations: - required: false \ No newline at end of file + required: false diff --git a/tests/debuginfo/text-to-include-1.txt b/tests/debuginfo/text-to-include-1.txt index ba055272a3fa7..91e2445c4aa9d 100644 --- a/tests/debuginfo/text-to-include-1.txt +++ b/tests/debuginfo/text-to-include-1.txt @@ -1 +1 @@ -some text to include in another file as string 1 \ No newline at end of file +some text to include in another file as string 1 diff --git a/tests/debuginfo/text-to-include-2.txt b/tests/debuginfo/text-to-include-2.txt index a59d2057eb46b..dbf811872d9be 100644 --- a/tests/debuginfo/text-to-include-2.txt +++ b/tests/debuginfo/text-to-include-2.txt @@ -1 +1 @@ -some text to include in another file as string 2. \ No newline at end of file +some text to include in another file as string 2. diff --git a/tests/debuginfo/text-to-include-3.txt b/tests/debuginfo/text-to-include-3.txt index 6163f7dd48cd4..eeed83b3d46e6 100644 --- a/tests/debuginfo/text-to-include-3.txt +++ b/tests/debuginfo/text-to-include-3.txt @@ -1 +1 @@ -some text to include in another file as string 3.. \ No newline at end of file +some text to include in another file as string 3.. diff --git a/tests/run-make-cargo/thumb-none-qemu/example/memory.x b/tests/run-make-cargo/thumb-none-qemu/example/memory.x index dc7ad967a42a8..82cf9c7e4a951 100644 --- a/tests/run-make-cargo/thumb-none-qemu/example/memory.x +++ b/tests/run-make-cargo/thumb-none-qemu/example/memory.x @@ -20,4 +20,4 @@ MEMORY /* The location of the .text section can be overridden using the `_stext` symbol. By default it will place after .vector_table */ -/* _stext = ORIGIN(FLASH) + 0x40c; */ \ No newline at end of file +/* _stext = ORIGIN(FLASH) + 0x40c; */ diff --git a/tests/run-make/raw-dylib-stdcall-ordinal/exporter-gnu.def b/tests/run-make/raw-dylib-stdcall-ordinal/exporter-gnu.def index 8d28d714b7e64..6953820154131 100644 --- a/tests/run-make/raw-dylib-stdcall-ordinal/exporter-gnu.def +++ b/tests/run-make/raw-dylib-stdcall-ordinal/exporter-gnu.def @@ -1,4 +1,4 @@ LIBRARY exporter EXPORTS exported_function_stdcall@4 @15 NONAME - @exported_function_fastcall@4 @18 NONAME \ No newline at end of file + @exported_function_fastcall@4 @18 NONAME diff --git a/tests/run-make/raw-dylib-stdcall-ordinal/exporter-msvc.def b/tests/run-make/raw-dylib-stdcall-ordinal/exporter-msvc.def index 5a4c79a58edfd..6be9f3f6c179d 100644 --- a/tests/run-make/raw-dylib-stdcall-ordinal/exporter-msvc.def +++ b/tests/run-make/raw-dylib-stdcall-ordinal/exporter-msvc.def @@ -1,4 +1,4 @@ LIBRARY exporter EXPORTS _exported_function_stdcall@4 @15 NONAME - @exported_function_fastcall@4 @18 NONAME \ No newline at end of file + @exported_function_fastcall@4 @18 NONAME diff --git a/tests/run-make/wasm-exceptions-nostd/verify.mjs b/tests/run-make/wasm-exceptions-nostd/verify.mjs index e6c44d89d331d..fea4a26878aad 100644 --- a/tests/run-make/wasm-exceptions-nostd/verify.mjs +++ b/tests/run-make/wasm-exceptions-nostd/verify.mjs @@ -72,4 +72,4 @@ function assert_equal(captured_output, expected_output) { } } -await main(); \ No newline at end of file +await main(); diff --git a/tests/rustdoc-ui/argfile/commandline-argfile-badutf8.args b/tests/rustdoc-ui/argfile/commandline-argfile-badutf8.args index c070b0c2400d8..90f81682e4dce 100644 --- a/tests/rustdoc-ui/argfile/commandline-argfile-badutf8.args +++ b/tests/rustdoc-ui/argfile/commandline-argfile-badutf8.args @@ -1,2 +1,2 @@ --cfg -unbroken€ \ No newline at end of file +unbroken� diff --git a/tests/rustdoc-ui/argfile/commandline-argfile.args b/tests/rustdoc-ui/argfile/commandline-argfile.args index 972938bf6c8dd..c3b7e91b5adeb 100644 --- a/tests/rustdoc-ui/argfile/commandline-argfile.args +++ b/tests/rustdoc-ui/argfile/commandline-argfile.args @@ -1,2 +1,2 @@ --cfg -unbroken \ No newline at end of file +unbroken diff --git a/tests/ui/argfile/commandline-argfile-badutf8.args b/tests/ui/argfile/commandline-argfile-badutf8.args index c070b0c2400d8..90f81682e4dce 100644 --- a/tests/ui/argfile/commandline-argfile-badutf8.args +++ b/tests/ui/argfile/commandline-argfile-badutf8.args @@ -1,2 +1,2 @@ --cfg -unbroken€ \ No newline at end of file +unbroken� diff --git a/tests/ui/argfile/commandline-argfile.args b/tests/ui/argfile/commandline-argfile.args index 972938bf6c8dd..c3b7e91b5adeb 100644 --- a/tests/ui/argfile/commandline-argfile.args +++ b/tests/ui/argfile/commandline-argfile.args @@ -1,2 +1,2 @@ --cfg -unbroken \ No newline at end of file +unbroken diff --git a/tests/ui/shell-argfiles/shell-argfiles-via-argfile-shell.args b/tests/ui/shell-argfiles/shell-argfiles-via-argfile-shell.args index 4e66d5a039529..218d3d667014f 100644 --- a/tests/ui/shell-argfiles/shell-argfiles-via-argfile-shell.args +++ b/tests/ui/shell-argfiles/shell-argfiles-via-argfile-shell.args @@ -1 +1 @@ -"--cfg" "shell_args_set" \ No newline at end of file +"--cfg" "shell_args_set" diff --git a/tests/ui/shell-argfiles/shell-argfiles-via-argfile.args b/tests/ui/shell-argfiles/shell-argfiles-via-argfile.args index d0af54e24e33c..97e8cee872732 100644 --- a/tests/ui/shell-argfiles/shell-argfiles-via-argfile.args +++ b/tests/ui/shell-argfiles/shell-argfiles-via-argfile.args @@ -1 +1 @@ --Zshell-argfiles \ No newline at end of file +-Zshell-argfiles From ae4e459975e0d049949c9577a437700ed58e8022 Mon Sep 17 00:00:00 2001 From: Michael Baumgartner Date: Sun, 28 Jun 2026 19:32:31 +0200 Subject: [PATCH 26/29] Address remaining indentation errors Adjust shell scripts, without .sh extension, to 4 spaces, ignore remaining mixed files and adjust EditorConfig for some files. --- .ecformat_ignore | 8 ++++++++ .editorconfig | 6 +++--- src/etc/installer/pkg/postinstall | 2 +- src/etc/rust-gdb | 12 ++++++------ src/etc/rust-gdbgui | 16 ++++++++-------- 5 files changed, 26 insertions(+), 18 deletions(-) diff --git a/.ecformat_ignore b/.ecformat_ignore index c48882fe0f5bb..5463d35cbea1f 100644 --- a/.ecformat_ignore +++ b/.ecformat_ignore @@ -68,18 +68,26 @@ src/ci/docker/host-x86_64/disabled/dist-x86_64-dragonfly/patch-toolchain *.coverage *.cpp *.css +*.err *.fixed *.goml *.h *.js *.ld *.py +*.rs *.stderr *.stdout *.ts *.wxs tests/run-make/linker-warning/*.txt tests/run-make/macos-deployment-target-warning/*.txt +library/std/src/sys/pal/sgx/abi/entry.S +tests/pretty/block-comment-wchar.pp +tests/run-make-cargo/thumb-none-qemu/example/memory.x +src/bootstrap/mk/Makefile.in +src/etc/rust_analyzer_eglot.el +src/librustdoc/html/static/fonts/README.txt # The first { in these files is always indented with one space *.mir # Alignment and some test files without final newline diff --git a/.editorconfig b/.editorconfig index be6f8a0849504..03cacd99f2024 100644 --- a/.editorconfig +++ b/.editorconfig @@ -58,10 +58,10 @@ trim_trailing_whitespace = false # Therefore, pressing tab should insert a single space to encourage situative accurate indentations. indent_size = 1 -[*.{json,json5,yml,yaml,natvis,nix}] +[*.{json,json5,yml,yaml,askama,ll,natvis,nix}] indent_size = 2 -[{src/doc/full-toc.inc,src/tools/nix-dev-shell/envrc-flake}] +[{src/doc/full-toc.inc,src/etc/xhelp,src/tools/nix-dev-shell/envrc-flake}] indent_size = 2 # You should NOT modify these files with your editor, @@ -75,7 +75,7 @@ indent_size = 2 [src/etc/completions/*.fish] indent_style = tab -[{Makefile,.gitmodules}] +[{Makefile,Makefile.in,.gitmodules}] indent_style = tab # The license texts should NEVER be modified. diff --git a/src/etc/installer/pkg/postinstall b/src/etc/installer/pkg/postinstall index fb035a48690b0..a9fc79af6e853 100755 --- a/src/etc/installer/pkg/postinstall +++ b/src/etc/installer/pkg/postinstall @@ -16,7 +16,7 @@ fi if [ "$package_id" = "org.rust-lang.uninstall" ]; then if [ ! -e "$dest_dir/lib/rustlib/uninstall.sh" ]; then - exit 1 + exit 1 fi sh "$dest_dir/lib/rustlib/uninstall.sh" else diff --git a/src/etc/rust-gdb b/src/etc/rust-gdb index 56068a3191f58..3ad5c518ed678 100755 --- a/src/etc/rust-gdb +++ b/src/etc/rust-gdb @@ -5,9 +5,9 @@ set -e # Prefer rustc in the same directory as this script DIR="$(dirname "$0")" if [ -x "$DIR/rustc" ]; then - RUSTC="$DIR/rustc" + RUSTC="$DIR/rustc" else - RUSTC="rustc" + RUSTC="rustc" fi # Find out where the pretty printer Python module is @@ -21,8 +21,8 @@ RUSTC_COMMIT_HASH="$("$RUSTC" -vV | sed -n 's/commit-hash: \([a-zA-Z0-9_]*\)/\1/ # different/specific command (defaults to `gdb`). RUST_GDB="${RUST_GDB:-gdb}" PYTHONPATH="$PYTHONPATH:$GDB_PYTHON_MODULE_DIRECTORY" exec ${RUST_GDB} \ - --directory="$GDB_PYTHON_MODULE_DIRECTORY" \ - -iex "add-auto-load-safe-path $GDB_PYTHON_MODULE_DIRECTORY" \ - -iex "set substitute-path /rustc/$RUSTC_COMMIT_HASH $RUSTC_SYSROOT/lib/rustlib/src/rust" \ - "$@" + --directory="$GDB_PYTHON_MODULE_DIRECTORY" \ + -iex "add-auto-load-safe-path $GDB_PYTHON_MODULE_DIRECTORY" \ + -iex "set substitute-path /rustc/$RUSTC_COMMIT_HASH $RUSTC_SYSROOT/lib/rustlib/src/rust" \ + "$@" diff --git a/src/etc/rust-gdbgui b/src/etc/rust-gdbgui index 471810cbb18f1..eb2565b9f3fd5 100755 --- a/src/etc/rust-gdbgui +++ b/src/etc/rust-gdbgui @@ -13,7 +13,7 @@ pretty printers loaded. Simple usage : rust-gdbgui target/debug/myprog With arguments: rust-gdbgui 'target/debug/myprog arg1 arg2...' - (note the quotes) + (note the quotes) Hints @@ -34,9 +34,9 @@ fi # Prefer rustc in the same directory as this script DIR="$(dirname "$0")" if [ -x "$DIR/rustc" ]; then - RUSTC="$DIR/rustc" + RUSTC="$DIR/rustc" else - RUSTC="rustc" + RUSTC="rustc" fi # Find out where the pretty printer Python module is @@ -56,12 +56,12 @@ RUST_GDBGUI="${RUST_GDBGUI:-gdbgui}" # These arguments get passed through to GDB and make it load the # Rust pretty printers. GDB_ARGS="--directory=\"$GDB_PYTHON_MODULE_DIRECTORY\" \ - -iex \"add-auto-load-safe-path $GDB_PYTHON_MODULE_DIRECTORY\" \ - -iex \"set substitute-path /rustc/$RUSTC_COMMIT_HASH $RUSTC_SYSROOT/lib/rustlib/src/rust\"" + -iex \"add-auto-load-safe-path $GDB_PYTHON_MODULE_DIRECTORY\" \ + -iex \"set substitute-path /rustc/$RUSTC_COMMIT_HASH $RUSTC_SYSROOT/lib/rustlib/src/rust\"" # Finally we execute gdbgui. PYTHONPATH="$PYTHONPATH:$GDB_PYTHON_MODULE_DIRECTORY" \ - exec ${RUST_GDBGUI} \ - --gdb-cmd "${RUST_GDB} ${GDB_ARGS}" \ - "${@}" + exec ${RUST_GDBGUI} \ + --gdb-cmd "${RUST_GDB} ${GDB_ARGS}" \ + "${@}" From 1fbae84f30d90621e419d0caf0813d6cfc6067ce Mon Sep 17 00:00:00 2001 From: Michael Baumgartner Date: Mon, 29 Jun 2026 10:53:42 +0200 Subject: [PATCH 27/29] Fix handling of final newlines in .args files Remove all added final newlines as test like tests/ui/argfile/commandline-argfile-badutf8.rs fail in the CI job aarch64-gnu-llvm-21-1 Therefore, set insert_final_newline = false for all the args files for the tests as they seem to have no final newline intentional. --- .editorconfig | 3 +++ tests/rustdoc-ui/argfile/commandline-argfile-badutf8.args | 2 +- tests/rustdoc-ui/argfile/commandline-argfile.args | 2 +- tests/ui/argfile/commandline-argfile-badutf8.args | 2 +- tests/ui/argfile/commandline-argfile.args | 2 +- tests/ui/shell-argfiles/shell-argfiles-via-argfile-shell.args | 2 +- tests/ui/shell-argfiles/shell-argfiles-via-argfile.args | 2 +- 7 files changed, 9 insertions(+), 6 deletions(-) diff --git a/.editorconfig b/.editorconfig index 03cacd99f2024..2ba2f9e3b5940 100644 --- a/.editorconfig +++ b/.editorconfig @@ -39,6 +39,9 @@ end_of_line = crlf insert_final_newline = false [tests/{pretty/issue-74745.rs,ui/{parser/issues/issue-{62524,68730,58094-missing-right-square-bracket}.rs,type/issue-91268.rs}}] insert_final_newline = false +# Most args files have to be without final newline, otherwise tests in aarch64-gnu-llvm-21-1 fail +[tests/**.args] +insert_final_newline = false [src/llvm-project] indent_style = unset diff --git a/tests/rustdoc-ui/argfile/commandline-argfile-badutf8.args b/tests/rustdoc-ui/argfile/commandline-argfile-badutf8.args index 90f81682e4dce..4e3522fed534c 100644 --- a/tests/rustdoc-ui/argfile/commandline-argfile-badutf8.args +++ b/tests/rustdoc-ui/argfile/commandline-argfile-badutf8.args @@ -1,2 +1,2 @@ --cfg -unbroken� +unbroken� \ No newline at end of file diff --git a/tests/rustdoc-ui/argfile/commandline-argfile.args b/tests/rustdoc-ui/argfile/commandline-argfile.args index c3b7e91b5adeb..972938bf6c8dd 100644 --- a/tests/rustdoc-ui/argfile/commandline-argfile.args +++ b/tests/rustdoc-ui/argfile/commandline-argfile.args @@ -1,2 +1,2 @@ --cfg -unbroken +unbroken \ No newline at end of file diff --git a/tests/ui/argfile/commandline-argfile-badutf8.args b/tests/ui/argfile/commandline-argfile-badutf8.args index 90f81682e4dce..4e3522fed534c 100644 --- a/tests/ui/argfile/commandline-argfile-badutf8.args +++ b/tests/ui/argfile/commandline-argfile-badutf8.args @@ -1,2 +1,2 @@ --cfg -unbroken� +unbroken� \ No newline at end of file diff --git a/tests/ui/argfile/commandline-argfile.args b/tests/ui/argfile/commandline-argfile.args index c3b7e91b5adeb..972938bf6c8dd 100644 --- a/tests/ui/argfile/commandline-argfile.args +++ b/tests/ui/argfile/commandline-argfile.args @@ -1,2 +1,2 @@ --cfg -unbroken +unbroken \ No newline at end of file diff --git a/tests/ui/shell-argfiles/shell-argfiles-via-argfile-shell.args b/tests/ui/shell-argfiles/shell-argfiles-via-argfile-shell.args index 218d3d667014f..4e66d5a039529 100644 --- a/tests/ui/shell-argfiles/shell-argfiles-via-argfile-shell.args +++ b/tests/ui/shell-argfiles/shell-argfiles-via-argfile-shell.args @@ -1 +1 @@ -"--cfg" "shell_args_set" +"--cfg" "shell_args_set" \ No newline at end of file diff --git a/tests/ui/shell-argfiles/shell-argfiles-via-argfile.args b/tests/ui/shell-argfiles/shell-argfiles-via-argfile.args index 97e8cee872732..d0af54e24e33c 100644 --- a/tests/ui/shell-argfiles/shell-argfiles-via-argfile.args +++ b/tests/ui/shell-argfiles/shell-argfiles-via-argfile.args @@ -1 +1 @@ --Zshell-argfiles +-Zshell-argfiles \ No newline at end of file From 23f04693d8cd386dd06f0b4b3430cd309007d1e8 Mon Sep 17 00:00:00 2001 From: Michael Baumgartner Date: Mon, 29 Jun 2026 12:19:10 +0200 Subject: [PATCH 28/29] Undo changes on .args files completely Removing the final newlines in this two files did not undo all changes in these files, which lead to similar errors as before. --- tests/rustdoc-ui/argfile/commandline-argfile-badutf8.args | 2 +- tests/ui/argfile/commandline-argfile-badutf8.args | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/rustdoc-ui/argfile/commandline-argfile-badutf8.args b/tests/rustdoc-ui/argfile/commandline-argfile-badutf8.args index 4e3522fed534c..c070b0c2400d8 100644 --- a/tests/rustdoc-ui/argfile/commandline-argfile-badutf8.args +++ b/tests/rustdoc-ui/argfile/commandline-argfile-badutf8.args @@ -1,2 +1,2 @@ --cfg -unbroken� \ No newline at end of file +unbroken€ \ No newline at end of file diff --git a/tests/ui/argfile/commandline-argfile-badutf8.args b/tests/ui/argfile/commandline-argfile-badutf8.args index 4e3522fed534c..c070b0c2400d8 100644 --- a/tests/ui/argfile/commandline-argfile-badutf8.args +++ b/tests/ui/argfile/commandline-argfile-badutf8.args @@ -1,2 +1,2 @@ --cfg -unbroken� \ No newline at end of file +unbroken€ \ No newline at end of file From 4a53e21c34cc75a6a215142f5915b72d419c8ae7 Mon Sep 17 00:00:00 2001 From: Michael Baumgartner Date: Tue, 30 Jun 2026 15:11:42 +0200 Subject: [PATCH 29/29] Adjust the handling for fish completion scripts --- .ecformat_ignore | 6 ++++++ .editorconfig | 4 ---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/.ecformat_ignore b/.ecformat_ignore index 5463d35cbea1f..117a138a008be 100644 --- a/.ecformat_ignore +++ b/.ecformat_ignore @@ -99,3 +99,9 @@ src/ci/docker/scripts/solaris-toolchain.sh # Shell scripts with alignments with previous line src/ci/docker/host-x86_64/disabled/dist-x86_64-haiku/llvm-config.sh src/etc/pre-push.sh + +# The clap_complete output uses tabs but there is a fix for the next version: +# https://github.com/clap-rs/clap/pull/6422 +# When src/bootstrap/Cargo.toml is using a clap_complete version with that fix, +# this ignore can be removed. +src/etc/completions/*.fish diff --git a/.editorconfig b/.editorconfig index 2ba2f9e3b5940..6b933f73d05ab 100644 --- a/.editorconfig +++ b/.editorconfig @@ -73,10 +73,6 @@ indent_size = 2 indent_size = 1 [yarn.lock] indent_size = 2 -# The completions are auto generated with clap_complete and this uses tabs for fish shell -# Asked for the reason there: https://github.com/clap-rs/clap/discussions/6418 -[src/etc/completions/*.fish] -indent_style = tab [{Makefile,Makefile.in,.gitmodules}] indent_style = tab