Skip to content

Commit 2a7b5c0

Browse files
author
Heesoo Yang
committed
Add ir feature flag that makes the ir pub
1 parent 89a9faa commit 2a7b5c0

File tree

3 files changed

+7
-0
lines changed

3 files changed

+7
-0
lines changed

Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ pretty_assertions = "1.4.0"
4141

4242
[features]
4343
default = ["clap"]
44+
ir = []
4445

4546
[[bin]]
4647
name = "cbindgen"

src/bindgen/mod.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,9 @@ mod config;
4545
mod declarationtyperesolver;
4646
mod dependencies;
4747
mod error;
48+
#[cfg(feature = "ir")]
49+
pub mod ir;
50+
#[cfg(not(feature = "ir"))]
4851
mod ir;
4952
mod language_backend;
5053
mod library;

src/lib.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ extern crate quote;
1414
extern crate syn;
1515
extern crate toml;
1616

17+
#[cfg(feature = "ir")]
18+
pub mod bindgen;
19+
#[cfg(not(feature = "ir"))]
1720
mod bindgen;
1821

1922
pub use crate::bindgen::*;

0 commit comments

Comments
 (0)