Fix build err autodiff libs by vayunbiyani · Pull Request #138553 · rust-lang/rust (original) (raw)

#20 exporting to docker image format
#20 sending tarball 19.7s done
#20 DONE 25.7s
##[endgroup]
Setting extra environment values for docker:  --env ENABLE_GCC_CODEGEN=1 --env GCC_EXEC_PREFIX=/usr/lib/gcc/
[CI_JOB_NAME=x86_64-gnu-llvm-18]
[CI_JOB_NAME=x86_64-gnu-llvm-18]
debug: `DISABLE_CI_RUSTC_IF_INCOMPATIBLE` configured.
---
sccache: Listening on address 127.0.0.1:4226
##[group]Configure the build
configure: processing command line
configure: 
configure: build.configure-args := ['--build=x86_64-unknown-linux-gnu', '--llvm-root=/usr/lib/llvm-18', '--enable-llvm-link-shared', '--set', 'rust.randomize-layout=true', '--set', 'rust.thin-lto-import-instr-limit=10', '--set', 'build.print-step-timings', '--enable-verbose-tests', '--set', 'build.metrics', '--enable-verbose-configure', '--enable-sccache', '--disable-manage-submodules', '--enable-locked-deps', '--enable-cargo-native-static', '--set', 'rust.codegen-units-std=1', '--set', 'dist.compression-profile=balanced', '--dist-compression-formats=xz', '--set', 'rust.lld=false', '--disable-dist-src', '--release-channel=nightly', '--enable-debug-assertions', '--enable-overflow-checks', '--enable-llvm-assertions', '--set', 'rust.verify-llvm-ir', '--set', 'rust.codegen-backends=llvm,cranelift,gcc', '--set', 'llvm.static-libstdcpp', '--enable-new-symbol-mangling']
configure: build.build          := x86_64-unknown-linux-gnu
configure: target.x86_64-unknown-linux-gnu.llvm-config := /usr/lib/llvm-18/bin/llvm-config
configure: llvm.link-shared     := True
configure: rust.randomize-layout := True
configure: rust.thin-lto-import-instr-limit := 10
---

error[E0433]: failed to resolve: use of undeclared type `SimpleCx`
   --> compiler/rustc_codegen_llvm/src/lib.rs:119:13
    |
119 |             SimpleCx::new(module_llvm.llmod(), &module_llvm.llcx, tcx.data_layout.pointer_size);
    |             ^^^^^^^^ use of undeclared type `SimpleCx`
    |
help: consider importing this type alias
    |
24  + use crate::context::SimpleCx;
    |

   Compiling rustc_passes v0.0.0 (/checkout/compiler/rustc_passes)
[RUSTC-TIMING] rustc_sanitizers test:false 6.220
error[E0560]: struct `GenericCx<'_, SCx<'_>>` has no field named `llmod`
   --> compiler/rustc_codegen_llvm/src/builder/autodiff.rs:289:25
    |
289 |     let cx = SimpleCx { llmod: module_llvm.llmod(), llcx: module_llvm.llcx };
    |                         ^^^^^ field does not exist
    |
   ::: compiler/rustc_codegen_llvm/src/context.rs:67:19
    |
67  | pub(crate) struct GenericCx<'ll, T: Borrow<SCx<'ll>>>(T, PhantomData<SCx<'ll>>);
    |                   --------- `GenericCx<'_, SCx<'_>>` defined here
    |
help: `GenericCx<'_, SCx<'_>>` is a tuple struct, use the appropriate syntax
    |
289 -     let cx = SimpleCx { llmod: module_llvm.llmod(), llcx: module_llvm.llcx };
289 +     let cx = GenericCx<'_, SCx<'_>>(/* T */, /* std:📑:PhantomData<SCx<'ll>> */);
    |

error[E0560]: struct `GenericCx<'_, SCx<'_>>` has no field named `llcx`
   --> compiler/rustc_codegen_llvm/src/builder/autodiff.rs:289:53
    |
289 |     let cx = SimpleCx { llmod: module_llvm.llmod(), llcx: module_llvm.llcx };
    |                                                     ^^^^ field does not exist
    |
   ::: compiler/rustc_codegen_llvm/src/context.rs:67:19
    |
67  | pub(crate) struct GenericCx<'ll, T: Borrow<SCx<'ll>>>(T, PhantomData<SCx<'ll>>);
    |                   --------- `GenericCx<'_, SCx<'_>>` defined here
    |
help: `GenericCx<'_, SCx<'_>>` is a tuple struct, use the appropriate syntax
    |
289 -     let cx = SimpleCx { llmod: module_llvm.llmod(), llcx: module_llvm.llcx };
289 +     let cx = GenericCx<'_, SCx<'_>>(/* T */, /* std:📑:PhantomData<SCx<'ll>> */);
    |

Some errors have detailed explanations: E0432, E0433, E0560.
For more information about an error, try `rustc --explain E0432`.
[RUSTC-TIMING] rustc_codegen_llvm test:false 3.841