From ad75ebb6b6273af8d024c4d90ad0a099272eac8f Mon Sep 17 00:00:00 2001 From: clubby789 Date: Thu, 22 Feb 2024 16:25:08 +0000 Subject: [PATCH 1/2] Bump `memchr` to 2.6 --- .github/workflows/ci.yml | 9 ++++++--- Cargo.lock | 4 ++-- compiler/rustc_ast/Cargo.toml | 2 +- src/ci/github-actions/ci.yml | 17 +++++++++++------ 4 files changed, 20 insertions(+), 12 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8b0a33841ad99..db4e54fefd72d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -607,10 +607,13 @@ jobs: strategy: matrix: include: - - name: dist-x86_64-linux + - name: x86_64-mingw env: - CODEGEN_BACKENDS: "llvm,cranelift" - os: ubuntu-20.04-16core-64gb + SCRIPT: make ci-mingw + RUST_CONFIGURE_ARGS: "--build=x86_64-pc-windows-gnu --enable-profiler" + NO_DOWNLOAD_CI_LLVM: 1 + CUSTOM_MINGW: 1 + os: windows-2019-8core-32gb defaults: run: shell: "${{ contains(matrix.os, 'windows') && 'msys2 {0}' || 'bash' }}" diff --git a/Cargo.lock b/Cargo.lock index 4e00c9034bd9b..c1f179a783bc6 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2372,9 +2372,9 @@ dependencies = [ [[package]] name = "memchr" -version = "2.5.0" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" +checksum = "76fc44e2588d5b436dbc3c6cf62aef290f90dab6235744a93dfe1cc18f451e2c" dependencies = [ "compiler_builtins", "rustc-std-workspace-core", diff --git a/compiler/rustc_ast/Cargo.toml b/compiler/rustc_ast/Cargo.toml index 087f6a192b5c8..31502018325bd 100644 --- a/compiler/rustc_ast/Cargo.toml +++ b/compiler/rustc_ast/Cargo.toml @@ -7,7 +7,7 @@ edition = "2021" # FIXME: bumping memchr to 2.7.1 causes linker errors in MSVC thin-lto # tidy-alphabetical-start bitflags = "2.4.1" -memchr = "=2.5.0" +memchr = "=2.6.0" rustc_data_structures = { path = "../rustc_data_structures" } rustc_index = { path = "../rustc_index" } rustc_lexer = { path = "../rustc_lexer" } diff --git a/src/ci/github-actions/ci.yml b/src/ci/github-actions/ci.yml index 58d5dec9ba520..d7b61e5e629c0 100644 --- a/src/ci/github-actions/ci.yml +++ b/src/ci/github-actions/ci.yml @@ -755,13 +755,18 @@ jobs: strategy: matrix: include: - - &dist-x86_64-linux - name: dist-x86_64-linux + - &x86_64-mingw + name: x86_64-mingw env: - CODEGEN_BACKENDS: llvm,cranelift - <<: *job-linux-16c - - + SCRIPT: make ci-mingw + RUST_CONFIGURE_ARGS: >- + --build=x86_64-pc-windows-gnu + --enable-profiler + # We are intentionally allowing an old toolchain on this builder (and that's + # incompatible with LLVM downloads today). + NO_DOWNLOAD_CI_LLVM: 1 + CUSTOM_MINGW: 1 + <<: *job-windows-8c master: name: master runs-on: ubuntu-latest From d6c1e1df4409a6757a7417b460dcecedc52fa6b2 Mon Sep 17 00:00:00 2001 From: Philipp Krones Date: Tue, 27 Feb 2024 18:06:32 +0100 Subject: [PATCH 2/2] Try if #[used] attribute is sufficient --- Cargo.lock | 3 +-- Cargo.toml | 1 + compiler/rustc_ast/Cargo.toml | 2 +- src/tools/tidy/src/extdeps.rs | 5 ++++- 4 files changed, 7 insertions(+), 4 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index c1f179a783bc6..b6b03d0f67f0c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2373,8 +2373,7 @@ dependencies = [ [[package]] name = "memchr" version = "2.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76fc44e2588d5b436dbc3c6cf62aef290f90dab6235744a93dfe1cc18f451e2c" +source = "git+https://github.com/flip1995/memchr.git#c499391ed499ddd5402a6c8bfbff55d6376657e5" dependencies = [ "compiler_builtins", "rustc-std-workspace-core", diff --git a/Cargo.toml b/Cargo.toml index 2ea16c2266615..d57d8cebe92e8 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -118,6 +118,7 @@ strip = true rustc-std-workspace-core = { path = 'library/rustc-std-workspace-core' } rustc-std-workspace-alloc = { path = 'library/rustc-std-workspace-alloc' } rustc-std-workspace-std = { path = 'library/rustc-std-workspace-std' } +memchr = { git = "https://github.com/flip1995/memchr.git" } [patch."https://github.com/rust-lang/rust-clippy"] clippy_lints = { path = "src/tools/clippy/clippy_lints" } diff --git a/compiler/rustc_ast/Cargo.toml b/compiler/rustc_ast/Cargo.toml index 31502018325bd..b27d3232f94fa 100644 --- a/compiler/rustc_ast/Cargo.toml +++ b/compiler/rustc_ast/Cargo.toml @@ -7,7 +7,7 @@ edition = "2021" # FIXME: bumping memchr to 2.7.1 causes linker errors in MSVC thin-lto # tidy-alphabetical-start bitflags = "2.4.1" -memchr = "=2.6.0" +memchr = "2.6.0" rustc_data_structures = { path = "../rustc_data_structures" } rustc_index = { path = "../rustc_index" } rustc_lexer = { path = "../rustc_lexer" } diff --git a/src/tools/tidy/src/extdeps.rs b/src/tools/tidy/src/extdeps.rs index ff71ca537256f..4881d6e05a0ae 100644 --- a/src/tools/tidy/src/extdeps.rs +++ b/src/tools/tidy/src/extdeps.rs @@ -4,7 +4,10 @@ use std::fs; use std::path::Path; /// List of allowed sources for packages. -const ALLOWED_SOURCES: &[&str] = &["\"registry+https://github.com/rust-lang/crates.io-index\""]; +const ALLOWED_SOURCES: &[&str] = &[ + "\"registry+https://github.com/rust-lang/crates.io-index\"", + "\"git+https://github.com/flip1995/memchr.git#c499391ed499ddd5402a6c8bfbff55d6376657e5\"", +]; /// Checks for external package sources. `root` is the path to the directory that contains the /// workspace `Cargo.toml`.