Skip to content
This repository was archived by the owner on Jan 22, 2025. It is now read-only.

Commit 95490ff

Browse files
Aaron1011mvines
authored andcommitted
Apply #![feature(proc_macro_hygiene)] when needed
This allows the rust-bpf-builder toolchain to build the sdk
1 parent e7387f6 commit 95490ff

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

sdk/build.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,11 @@ fn main() {
1717
}
1818
Channel::Dev => {
1919
println!("cargo:rustc-cfg=RUSTC_WITH_SPECIALIZATION");
20+
// See https://github.com/solana-labs/solana/issues/11055
21+
// We may be running the custom `rust-bpf-builder` toolchain,
22+
// which currently needs `#![feature(proc_macro_hygiene)]` to
23+
// be applied.
24+
println!("cargo:rustc-cfg=RUSTC_NEEDS_PROC_MACRO_HYGIENE");
2025
}
2126
}
2227
}

sdk/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#![cfg_attr(RUSTC_WITH_SPECIALIZATION, feature(specialization))]
2+
#![cfg_attr(RUSTC_NEEDS_PROC_MACRO_HYGIENE, feature(proc_macro_hygiene))]
23

34
// Allows macro expansion of `use ::solana_sdk::*` to work within this crate
45
extern crate self as solana_sdk;

0 commit comments

Comments
 (0)