Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DNM: Try using memchr without inlining on windows #121671

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -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' }}"
5 changes: 2 additions & 3 deletions Cargo.lock
Original file line number Diff line number Diff line change
@@ -2372,9 +2372,8 @@ dependencies = [

[[package]]
name = "memchr"
version = "2.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d"
version = "2.6.0"
source = "git+https://github.com/flip1995/memchr.git#f2e2936815bf211ece60a0251b53a617e1d678ac"
dependencies = [
"compiler_builtins",
"rustc-std-workspace-core",
1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -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" }
2 changes: 1 addition & 1 deletion compiler/rustc_ast/Cargo.toml
Original file line number Diff line number Diff line change
@@ -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" }
17 changes: 11 additions & 6 deletions src/ci/github-actions/ci.yml
Original file line number Diff line number Diff line change
@@ -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
5 changes: 4 additions & 1 deletion src/tools/tidy/src/extdeps.rs
Original file line number Diff line number Diff line change
@@ -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`.