From af9c754690a98472d3976c22ec098c9802d4284c Mon Sep 17 00:00:00 2001 From: Tao Zhu <82401714+taozhu-chicago@users.noreply.github.com> Date: Sat, 21 Oct 2023 13:33:10 -0500 Subject: [PATCH] Crates have identical build.rs to frozen-abi can just be symlink (#33787) crates have identical build.rs to frozen-abi can just be symlink --- accounts-db/build.rs | 28 +--------------------------- cost-model/build.rs | 28 +--------------------------- ledger/build.rs | 28 +--------------------------- vote/build.rs | 28 +--------------------------- 4 files changed, 4 insertions(+), 108 deletions(-) mode change 100644 => 120000 accounts-db/build.rs mode change 100644 => 120000 cost-model/build.rs mode change 100644 => 120000 ledger/build.rs mode change 100644 => 120000 vote/build.rs diff --git a/accounts-db/build.rs b/accounts-db/build.rs deleted file mode 100644 index c9550c1c5..000000000 --- a/accounts-db/build.rs +++ /dev/null @@ -1,27 +0,0 @@ -extern crate rustc_version; -use rustc_version::{version_meta, Channel}; - -fn main() { - // Copied and adapted from - // https://github.com/Kimundi/rustc-version-rs/blob/1d692a965f4e48a8cb72e82cda953107c0d22f47/README.md#example - // Licensed under Apache-2.0 + MIT - match version_meta().unwrap().channel { - Channel::Stable => { - println!("cargo:rustc-cfg=RUSTC_WITHOUT_SPECIALIZATION"); - } - Channel::Beta => { - println!("cargo:rustc-cfg=RUSTC_WITHOUT_SPECIALIZATION"); - } - Channel::Nightly => { - println!("cargo:rustc-cfg=RUSTC_WITH_SPECIALIZATION"); - } - Channel::Dev => { - println!("cargo:rustc-cfg=RUSTC_WITH_SPECIALIZATION"); - // See https://github.com/solana-labs/solana/issues/11055 - // We may be running the custom `rust-bpf-builder` toolchain, - // which currently needs `#![feature(proc_macro_hygiene)]` to - // be applied. - println!("cargo:rustc-cfg=RUSTC_NEEDS_PROC_MACRO_HYGIENE"); - } - } -} diff --git a/accounts-db/build.rs b/accounts-db/build.rs new file mode 120000 index 000000000..ae66c237c --- /dev/null +++ b/accounts-db/build.rs @@ -0,0 +1 @@ +../frozen-abi/build.rs \ No newline at end of file diff --git a/cost-model/build.rs b/cost-model/build.rs deleted file mode 100644 index c9550c1c5..000000000 --- a/cost-model/build.rs +++ /dev/null @@ -1,27 +0,0 @@ -extern crate rustc_version; -use rustc_version::{version_meta, Channel}; - -fn main() { - // Copied and adapted from - // https://github.com/Kimundi/rustc-version-rs/blob/1d692a965f4e48a8cb72e82cda953107c0d22f47/README.md#example - // Licensed under Apache-2.0 + MIT - match version_meta().unwrap().channel { - Channel::Stable => { - println!("cargo:rustc-cfg=RUSTC_WITHOUT_SPECIALIZATION"); - } - Channel::Beta => { - println!("cargo:rustc-cfg=RUSTC_WITHOUT_SPECIALIZATION"); - } - Channel::Nightly => { - println!("cargo:rustc-cfg=RUSTC_WITH_SPECIALIZATION"); - } - Channel::Dev => { - println!("cargo:rustc-cfg=RUSTC_WITH_SPECIALIZATION"); - // See https://github.com/solana-labs/solana/issues/11055 - // We may be running the custom `rust-bpf-builder` toolchain, - // which currently needs `#![feature(proc_macro_hygiene)]` to - // be applied. - println!("cargo:rustc-cfg=RUSTC_NEEDS_PROC_MACRO_HYGIENE"); - } - } -} diff --git a/cost-model/build.rs b/cost-model/build.rs new file mode 120000 index 000000000..ae66c237c --- /dev/null +++ b/cost-model/build.rs @@ -0,0 +1 @@ +../frozen-abi/build.rs \ No newline at end of file diff --git a/ledger/build.rs b/ledger/build.rs deleted file mode 100644 index c9550c1c5..000000000 --- a/ledger/build.rs +++ /dev/null @@ -1,27 +0,0 @@ -extern crate rustc_version; -use rustc_version::{version_meta, Channel}; - -fn main() { - // Copied and adapted from - // https://github.com/Kimundi/rustc-version-rs/blob/1d692a965f4e48a8cb72e82cda953107c0d22f47/README.md#example - // Licensed under Apache-2.0 + MIT - match version_meta().unwrap().channel { - Channel::Stable => { - println!("cargo:rustc-cfg=RUSTC_WITHOUT_SPECIALIZATION"); - } - Channel::Beta => { - println!("cargo:rustc-cfg=RUSTC_WITHOUT_SPECIALIZATION"); - } - Channel::Nightly => { - println!("cargo:rustc-cfg=RUSTC_WITH_SPECIALIZATION"); - } - Channel::Dev => { - println!("cargo:rustc-cfg=RUSTC_WITH_SPECIALIZATION"); - // See https://github.com/solana-labs/solana/issues/11055 - // We may be running the custom `rust-bpf-builder` toolchain, - // which currently needs `#![feature(proc_macro_hygiene)]` to - // be applied. - println!("cargo:rustc-cfg=RUSTC_NEEDS_PROC_MACRO_HYGIENE"); - } - } -} diff --git a/ledger/build.rs b/ledger/build.rs new file mode 120000 index 000000000..ae66c237c --- /dev/null +++ b/ledger/build.rs @@ -0,0 +1 @@ +../frozen-abi/build.rs \ No newline at end of file diff --git a/vote/build.rs b/vote/build.rs deleted file mode 100644 index c9550c1c5..000000000 --- a/vote/build.rs +++ /dev/null @@ -1,27 +0,0 @@ -extern crate rustc_version; -use rustc_version::{version_meta, Channel}; - -fn main() { - // Copied and adapted from - // https://github.com/Kimundi/rustc-version-rs/blob/1d692a965f4e48a8cb72e82cda953107c0d22f47/README.md#example - // Licensed under Apache-2.0 + MIT - match version_meta().unwrap().channel { - Channel::Stable => { - println!("cargo:rustc-cfg=RUSTC_WITHOUT_SPECIALIZATION"); - } - Channel::Beta => { - println!("cargo:rustc-cfg=RUSTC_WITHOUT_SPECIALIZATION"); - } - Channel::Nightly => { - println!("cargo:rustc-cfg=RUSTC_WITH_SPECIALIZATION"); - } - Channel::Dev => { - println!("cargo:rustc-cfg=RUSTC_WITH_SPECIALIZATION"); - // See https://github.com/solana-labs/solana/issues/11055 - // We may be running the custom `rust-bpf-builder` toolchain, - // which currently needs `#![feature(proc_macro_hygiene)]` to - // be applied. - println!("cargo:rustc-cfg=RUSTC_NEEDS_PROC_MACRO_HYGIENE"); - } - } -} diff --git a/vote/build.rs b/vote/build.rs new file mode 120000 index 000000000..ae66c237c --- /dev/null +++ b/vote/build.rs @@ -0,0 +1 @@ +../frozen-abi/build.rs \ No newline at end of file