diff --git a/src/ci/docker/host-aarch64/dist-aarch64-linux/Dockerfile b/src/ci/docker/host-aarch64/dist-aarch64-linux/Dockerfile index 2b8a3f829c608..b47f91905ac11 100644 --- a/src/ci/docker/host-aarch64/dist-aarch64-linux/Dockerfile +++ b/src/ci/docker/host-aarch64/dist-aarch64-linux/Dockerfile @@ -89,6 +89,7 @@ ENV RUST_CONFIGURE_ARGS \ --set llvm.thin-lto=true \ --set llvm.libzstd=true \ --set llvm.ninja=false \ + --set llvm.enzyme=true \ --set rust.debug-assertions=false \ --set rust.jemalloc \ --set rust.use-lld=true \ 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 ae5bf8946dd94..8932319b9cd25 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 @@ -90,6 +90,7 @@ ENV RUST_CONFIGURE_ARGS \ --set target.x86_64-unknown-linux-gnu.ranlib=/rustroot/bin/llvm-ranlib \ --set llvm.thin-lto=true \ --set llvm.ninja=false \ + --set llvm.enzyme=true \ --set llvm.libzstd=true \ --set rust.jemalloc \ --set rust.use-lld=true \ 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 83c2aa8cfb3b7..d30754c15022f 100644 --- a/src/ci/docker/host-x86_64/x86_64-gnu/Dockerfile +++ b/src/ci/docker/host-x86_64/x86_64-gnu/Dockerfile @@ -30,4 +30,5 @@ ENV RUST_CONFIGURE_ARGS \ --enable-profiler \ --enable-compiler-docs \ --set llvm.libzstd=true + --set llvm.enzyme=true \ ENV SCRIPT python3 ../x.py --stage 2 test diff --git a/src/ci/github-actions/jobs.yml b/src/ci/github-actions/jobs.yml index cb2bec5a9dfa6..b05296f1d9699 100644 --- a/src/ci/github-actions/jobs.yml +++ b/src/ci/github-actions/jobs.yml @@ -369,7 +369,7 @@ auto: - name: dist-x86_64-apple env: SCRIPT: ./x.py dist bootstrap --include-default-paths --host=x86_64-apple-darwin --target=x86_64-apple-darwin - RUST_CONFIGURE_ARGS: --enable-full-tools --enable-sanitizers --enable-profiler --set rust.jemalloc --set rust.lto=thin --set rust.codegen-units=1 + RUST_CONFIGURE_ARGS: --enable-full-tools --enable-sanitizers --enable-profiler --set llvm.enzyme=true --set rust.jemalloc --set rust.lto=thin --set rust.codegen-units=1 RUSTC_RETRY_LINKER_ON_SEGFAULT: 1 # Ensure that host tooling is built to support our minimum support macOS version. MACOSX_DEPLOYMENT_TARGET: 10.12 @@ -387,7 +387,7 @@ auto: SCRIPT: ./x.py dist bootstrap --include-default-paths --host='' --target=aarch64-apple-ios,x86_64-apple-ios,aarch64-apple-ios-sim,aarch64-apple-ios-macabi,x86_64-apple-ios-macabi # Mac Catalyst cannot currently compile the sanitizer: # https://github.com/rust-lang/rust/issues/129069 - RUST_CONFIGURE_ARGS: --enable-sanitizers --enable-profiler --set rust.jemalloc --set target.aarch64-apple-ios-macabi.sanitizers=false --set target.x86_64-apple-ios-macabi.sanitizers=false + RUST_CONFIGURE_ARGS: --enable-sanitizers --enable-profiler --set rust.jemalloc --set llvm.enzyme=true --set target.aarch64-apple-ios-macabi.sanitizers=false --set target.x86_64-apple-ios-macabi.sanitizers=false RUSTC_RETRY_LINKER_ON_SEGFAULT: 1 # Ensure that host tooling is built to support our minimum support macOS version. # FIXME(madsmtm): This might be redundant, as we're not building host tooling here (?) @@ -419,6 +419,7 @@ auto: --enable-profiler --set rust.jemalloc --set llvm.ninja=false + --set llvm.enzyme=true --set rust.lto=thin --set rust.codegen-units=1 RUSTC_RETRY_LINKER_ON_SEGFAULT: 1 @@ -601,6 +602,7 @@ auto: SCRIPT: python x.py dist bootstrap --include-default-paths RUST_CONFIGURE_ARGS: >- --build=x86_64-pc-windows-gnu + --set llvm.enzyme=true --enable-full-tools DIST_REQUIRE_ALL_TOOLS: 1 CODEGEN_BACKENDS: llvm,cranelift diff --git a/tests/ui/autodiff/visibility.rs b/tests/ui/autodiff/visibility.rs deleted file mode 100644 index dfaec03aef01f..0000000000000 --- a/tests/ui/autodiff/visibility.rs +++ /dev/null @@ -1,17 +0,0 @@ -//@ ignore-enzyme -//@ revisions: std_autodiff no_std_autodiff -//@[no_std_autodiff] check-pass -//@ proc-macro: my_macro.rs -#![crate_type = "lib"] -#![feature(autodiff)] - -#[cfg(std_autodiff)] -use std::autodiff::autodiff; - -extern crate my_macro; -use my_macro::autodiff; // bring `autodiff` in scope - -#[autodiff] -//[std_autodiff]~^^^ ERROR the name `autodiff` is defined multiple times -//[std_autodiff]~^^ ERROR this rustc version does not support autodiff -fn foo() {} diff --git a/tests/ui/autodiff/visibility.std_autodiff.stderr b/tests/ui/autodiff/visibility.std_autodiff.stderr deleted file mode 100644 index 720c9a00170e9..0000000000000 --- a/tests/ui/autodiff/visibility.std_autodiff.stderr +++ /dev/null @@ -1,24 +0,0 @@ -error[E0252]: the name `autodiff` is defined multiple times - --> $DIR/visibility.rs:12:5 - | -LL | use std::autodiff::autodiff; - | ----------------------- previous import of the macro `autodiff` here -... -LL | use my_macro::autodiff; // bring `autodiff` in scope - | ^^^^^^^^^^^^^^^^^^ `autodiff` reimported here - | - = note: `autodiff` must be defined only once in the macro namespace of this module -help: you can use `as` to change the binding name of the import - | -LL | use my_macro::autodiff as other_autodiff; // bring `autodiff` in scope - | +++++++++++++++++ - -error: this rustc version does not support autodiff - --> $DIR/visibility.rs:14:1 - | -LL | #[autodiff] - | ^^^^^^^^^^^ - -error: aborting due to 2 previous errors - -For more information about this error, try `rustc --explain E0252`. diff --git a/tests/ui/feature-gates/feature-gate-autodiff-use.has_support.stderr b/tests/ui/feature-gates/feature-gate-autodiff-use.has_support.stderr deleted file mode 100644 index 15ef257fbd84d..0000000000000 --- a/tests/ui/feature-gates/feature-gate-autodiff-use.has_support.stderr +++ /dev/null @@ -1,23 +0,0 @@ -error[E0658]: use of unstable library feature `autodiff` - --> $DIR/feature-gate-autodiff-use.rs:13:3 - | -LL | #[autodiff(dfoo, Reverse)] - | ^^^^^^^^ - | - = note: see issue #124509 for more information - = help: add `#![feature(autodiff)]` to the crate attributes to enable - = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date - -error[E0658]: use of unstable library feature `autodiff` - --> $DIR/feature-gate-autodiff-use.rs:9:5 - | -LL | use std::autodiff::autodiff; - | ^^^^^^^^^^^^^^^^^^^^^^^ - | - = note: see issue #124509 for more information - = help: add `#![feature(autodiff)]` to the crate attributes to enable - = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date - -error: aborting due to 2 previous errors - -For more information about this error, try `rustc --explain E0658`. diff --git a/tests/ui/feature-gates/feature-gate-autodiff-use.no_support.stderr b/tests/ui/feature-gates/feature-gate-autodiff-use.no_support.stderr deleted file mode 100644 index f59e495545202..0000000000000 --- a/tests/ui/feature-gates/feature-gate-autodiff-use.no_support.stderr +++ /dev/null @@ -1,29 +0,0 @@ -error[E0658]: use of unstable library feature `autodiff` - --> $DIR/feature-gate-autodiff-use.rs:13:3 - | -LL | #[autodiff(dfoo, Reverse)] - | ^^^^^^^^ - | - = note: see issue #124509 for more information - = help: add `#![feature(autodiff)]` to the crate attributes to enable - = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date - -error: this rustc version does not support autodiff - --> $DIR/feature-gate-autodiff-use.rs:13:1 - | -LL | #[autodiff(dfoo, Reverse)] - | ^^^^^^^^^^^^^^^^^^^^^^^^^^ - -error[E0658]: use of unstable library feature `autodiff` - --> $DIR/feature-gate-autodiff-use.rs:9:5 - | -LL | use std::autodiff::autodiff; - | ^^^^^^^^^^^^^^^^^^^^^^^ - | - = note: see issue #124509 for more information - = help: add `#![feature(autodiff)]` to the crate attributes to enable - = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date - -error: aborting due to 3 previous errors - -For more information about this error, try `rustc --explain E0658`. diff --git a/tests/ui/feature-gates/feature-gate-autodiff-use.rs b/tests/ui/feature-gates/feature-gate-autodiff-use.rs deleted file mode 100644 index 602e830b0b21c..0000000000000 --- a/tests/ui/feature-gates/feature-gate-autodiff-use.rs +++ /dev/null @@ -1,17 +0,0 @@ -//@ revisions: has_support no_support -//@[no_support] ignore-enzyme -//@[has_support] needs-enzyme - -// This checks that without enabling the autodiff feature, we can't import std::autodiff::autodiff; - -#![crate_type = "lib"] - -use std::autodiff::autodiff; -//[has_support]~^ ERROR use of unstable library feature `autodiff` -//[no_support]~^^ ERROR use of unstable library feature `autodiff` - -#[autodiff(dfoo, Reverse)] -//[has_support]~^ ERROR use of unstable library feature `autodiff` [E0658] -//[no_support]~^^ ERROR use of unstable library feature `autodiff` [E0658] -//[no_support]~| ERROR this rustc version does not support autodiff -fn foo() {}