-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.rs
24 lines (20 loc) · 822 Bytes
/
build.rs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
//! spcasm build script. This script's responsibility is to run the LALRPOP parser generator, and generate `shadow_rs`
//! based build information for binaries.
#[allow(unused_extern_crates)]
extern crate lalrpop;
fn main() {
// Make Cargo rebuild when the parser generator input file changes.
println!("cargo:rerun-if-changed=src/parser/asm.lalrpop");
lalrpop::Configuration::new().use_cargo_dir_conventions().process_file("src/parser/asm.lalrpop").unwrap();
#[cfg(feature = "binaries")]
{
use std::collections::BTreeSet;
// hide sensitive information
let mut denied = BTreeSet::new();
denied.insert(shadow_rs::CARGO_MANIFEST_DIR);
denied.insert(shadow_rs::COMMIT_EMAIL);
denied.insert(shadow_rs::CARGO_TREE);
denied.insert(shadow_rs::GIT_STATUS_FILE);
shadow_rs::new_deny(denied).unwrap();
}
}