From 7dc599673b03c12500ca6d8476f30eea4b66cfa9 Mon Sep 17 00:00:00 2001 From: Philipp Krones Date: Tue, 27 Feb 2024 19:12:48 +0100 Subject: [PATCH] Use non-inline on windows memchr version --- 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..fe4ce595c6c98 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#f2e2936815bf211ece60a0251b53a617e1d678ac" 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..b1d2c2b3c775b 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#f2e2936815bf211ece60a0251b53a617e1d678ac\"", +]; /// Checks for external package sources. `root` is the path to the directory that contains the /// workspace `Cargo.toml`.