From 837d9045c5cf40b2ebf4b4ae2a02f35f8c7e0825 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?John=20K=C3=A5re=20Alsaker?= Date: Tue, 12 Mar 2024 02:12:28 +0100 Subject: [PATCH] Link `std` statically in `rustc_driver` --- src/main.rs | 3 +++ tests/compile-test.rs | 3 +++ 2 files changed, 6 insertions(+) diff --git a/src/main.rs b/src/main.rs index c9af2138a72..c9853e53f3b 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,3 +1,6 @@ +// We need this feature as it changes `dylib` linking behavior and allows us to link to +// `rustc_driver`. +#![feature(rustc_private)] // warn on lints, that are included in `rust-lang/rust`s bootstrap #![warn(rust_2018_idioms, unused_lifetimes)] diff --git a/tests/compile-test.rs b/tests/compile-test.rs index c7080e5dcdc..64253514fbe 100644 --- a/tests/compile-test.rs +++ b/tests/compile-test.rs @@ -1,3 +1,6 @@ +// We need this feature as it changes `dylib` linking behavior and allows us to link to +// `rustc_driver`. +#![feature(rustc_private)] #![warn(rust_2018_idioms, unused_lifetimes)] #![allow(unused_extern_crates)]