diff options
| author | bjorn3 <17426603+bjorn3@users.noreply.github.com> | 2025-05-27 10:30:47 +0000 |
|---|---|---|
| committer | bjorn3 <17426603+bjorn3@users.noreply.github.com> | 2025-05-27 15:49:28 +0000 |
| commit | 026baa1c6fb397e9bd2c171d750c939232c13a58 (patch) | |
| tree | 97d5f72a7f8a5b801ddfa36fea6cc82a86129061 /compiler/rustc_proc_macro | |
| parent | b5eb9893f42a469d330046089539f908d4728384 (diff) | |
| download | rust-026baa1c6fb397e9bd2c171d750c939232c13a58.tar.gz rust-026baa1c6fb397e9bd2c171d750c939232c13a58.zip | |
Do not get proc_macro from the sysroot in rustc
With the stage0 refactor the proc_macro version found in the sysroot will no longer always match the proc_macro version that proc-macros get compiled with by the rustc executable that uses this proc_macro. This will cause problems as soon as the ABI of the bridge gets changed to implement new features or change the way existing features work. To fix this, this commit changes rustc crates to depend directly on the local version of proc_macro which will also be used in the sysroot that rustc will build.
Diffstat (limited to 'compiler/rustc_proc_macro')
| -rw-r--r-- | compiler/rustc_proc_macro/Cargo.toml | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/compiler/rustc_proc_macro/Cargo.toml b/compiler/rustc_proc_macro/Cargo.toml new file mode 100644 index 00000000000..4a7c0d78ede --- /dev/null +++ b/compiler/rustc_proc_macro/Cargo.toml @@ -0,0 +1,21 @@ +# We need to use a separate crate including library/proc_macro as opposed to a +# direct path dependency on library/proc_macro because doing the latter will +# cause two copies of libproc_macro.rlib to end up in the sysroot, breaking +# proc-macro crates. In addition it confuses the workspace_members function of +# bootstrap. + +[package] +name = "rustc_proc_macro" +version = "0.0.0" +edition = "2024" + +[lib] +path = "../../library/proc_macro/src/lib.rs" +test = false +doctest = false + +[dependencies] +rustc-literal-escaper = "0.0.2" + +[features] +rustc-dep-of-std = [] |
