Skip to content

Commit

Permalink
Auto merge of rust-lang#121671 - flip1995:memchr-no-inline-bump, r=<try>
Browse files Browse the repository at this point in the history
DNM: Try using memchr without inlining on windows

Another attempt at rust-lang#121465, trying to fix the issue on windows to unblock the Clippy sync.

(Does specifying a git dependency even work or will the `tidy` tool complain? 🤔)

[memchr patch](BurntSushi/memchr@0310038)

r? `@ghost`
  • Loading branch information
bors committed Feb 27, 2024
2 parents 9afdb8d + e3ea0db commit 29627ed
Show file tree
Hide file tree
Showing 5 changed files with 44 additions and 28 deletions.
9 changes: 6 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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' }}"
Expand Down
39 changes: 22 additions & 17 deletions Cargo.lock
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ version = "1.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b2969dcb958b36655471fc61f7e416fa76033bdd4bfed0678d8fee1e2d07a1f0"
dependencies = [
"memchr",
"memchr 2.6.0",
]

[[package]]
Expand Down Expand Up @@ -338,7 +338,7 @@ version = "1.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6798148dccfbff0fae41c7574d2fa8f1ef3492fba0face179de5d8d447d67b05"
dependencies = [
"memchr",
"memchr 2.6.0",
"regex-automata 0.3.7",
"serde",
]
Expand Down Expand Up @@ -1514,7 +1514,7 @@ dependencies = [
"futures-macro",
"futures-sink",
"futures-task",
"memchr",
"memchr 2.6.0",
"pin-project-lite",
"pin-utils",
"slab",
Expand Down Expand Up @@ -1944,7 +1944,7 @@ dependencies = [
"globset",
"lazy_static",
"log",
"memchr",
"memchr 2.6.0",
"regex",
"same-file",
"thread_local",
Expand Down Expand Up @@ -2343,7 +2343,7 @@ dependencies = [
"env_logger",
"handlebars",
"log",
"memchr",
"memchr 2.6.0",
"once_cell",
"opener",
"pulldown-cmark 0.10.0",
Expand Down Expand Up @@ -2372,14 +2372,19 @@ 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",
]

[[package]]
name = "memchr"
version = "2.7.1"
source = "git+https://github.com/flip1995/memchr.git#d7eb96b8a8a7bae925b86d4df1c852af6721e806"

[[package]]
name = "memmap2"
version = "0.2.3"
Expand Down Expand Up @@ -2524,7 +2529,7 @@ version = "7.1.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a"
dependencies = [
"memchr",
"memchr 2.6.0",
"minimal-lexical",
]

Expand Down Expand Up @@ -2599,7 +2604,7 @@ dependencies = [
"flate2",
"hashbrown",
"indexmap",
"memchr",
"memchr 2.6.0",
"rustc-std-workspace-alloc",
"rustc-std-workspace-core",
"ruzstd",
Expand Down Expand Up @@ -2823,7 +2828,7 @@ version = "2.7.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "219c0dcc30b6a27553f9cc242972b67f75b60eb0db71f0b5462f38b058c41546"
dependencies = [
"memchr",
"memchr 2.6.0",
"thiserror",
"ucd-trie",
]
Expand Down Expand Up @@ -3011,7 +3016,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "57206b407293d2bcd3af849ce869d52068623f19e1b5ff8e8778e3309439682b"
dependencies = [
"bitflags 2.4.2",
"memchr",
"memchr 2.6.0",
"unicase",
]

Expand All @@ -3022,7 +3027,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "dce76ce678ffc8e5675b22aa1405de0b7037e2fdf8913fea40d1926c6fe1e6e7"
dependencies = [
"bitflags 2.4.2",
"memchr",
"memchr 2.6.0",
"pulldown-cmark-escape",
"unicase",
]
Expand Down Expand Up @@ -3170,7 +3175,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "12de2eff854e5fa4b1295edd650e227e9d8fb0c9e90b12e7f36d6a6811791a29"
dependencies = [
"aho-corasick",
"memchr",
"memchr 2.6.0",
"regex-automata 0.3.7",
"regex-syntax 0.7.5",
]
Expand All @@ -3190,7 +3195,7 @@ version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e9368763f5a9b804326f3af749e16f9abf378d227bcdee7634b13d8f17793782"
dependencies = [
"memchr",
"memchr 2.6.0",
]

[[package]]
Expand All @@ -3200,7 +3205,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "49530408a136e16e5b486e883fbb6ba058e8e4e8ae6621a77b048b314336e629"
dependencies = [
"aho-corasick",
"memchr",
"memchr 2.6.0",
"regex-syntax 0.7.5",
]

Expand Down Expand Up @@ -3431,7 +3436,7 @@ name = "rustc_ast"
version = "0.0.0"
dependencies = [
"bitflags 2.4.2",
"memchr",
"memchr 2.7.1",
"rustc_data_structures",
"rustc_index",
"rustc_lexer",
Expand Down Expand Up @@ -6332,7 +6337,7 @@ version = "0.5.40"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f593a95398737aeed53e489c785df13f3618e41dbcd6718c6addbf1395aa6876"
dependencies = [
"memchr",
"memchr 2.6.0",
]

[[package]]
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_ast/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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 = { git = "https://github.com/flip1995/memchr.git" }
rustc_data_structures = { path = "../rustc_data_structures" }
rustc_index = { path = "../rustc_index" }
rustc_lexer = { path = "../rustc_lexer" }
Expand Down
17 changes: 11 additions & 6 deletions src/ci/github-actions/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 4 additions & 1 deletion src/tools/tidy/src/extdeps.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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#d7eb96b8a8a7bae925b86d4df1c852af6721e806\"",
];

/// Checks for external package sources. `root` is the path to the directory that contains the
/// workspace `Cargo.toml`.
Expand Down

0 comments on commit 29627ed

Please sign in to comment.