disable generation of lttng tracepoints if no tracing feature set
Signed-off-by: Fabrizio <fab@pop-os.localdomain>
This commit is contained in:
parent
7550842126
commit
36d3ce3a09
File diff suppressed because it is too large
Load Diff
|
@ -14,4 +14,4 @@ chrono = "0.4"
|
|||
lttng-ust = { version = "0.1.0", optional = true }
|
||||
|
||||
[build-dependencies]
|
||||
lttng-ust-generate = "0.1.0"
|
||||
lttng-ust-generate = "0.1.0"
|
||||
|
|
11
build.rs
11
build.rs
|
@ -1,9 +1,11 @@
|
|||
use std::env;
|
||||
use std::path::PathBuf;
|
||||
|
||||
#[cfg(feature = "tracing")]
|
||||
use lttng_ust_generate::{Provider, Generator, CTFType, CIntegerType};
|
||||
|
||||
fn main() {
|
||||
#[cfg(feature = "tracing")]
|
||||
fn setup_tracepoints() {
|
||||
// the provider is called calendar
|
||||
let mut provider = Provider::new("calendar");
|
||||
|
||||
|
@ -22,4 +24,9 @@ fn main() {
|
|||
.output_file_name(PathBuf::from(env::var("OUT_DIR").unwrap()).join("tracepoints.rs"))
|
||||
.generate()
|
||||
.expect("Unable to generate tracepoint bindings");
|
||||
}
|
||||
}
|
||||
|
||||
fn main() {
|
||||
#[cfg(feature = "tracing")]
|
||||
setup_tracepoints();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue