2022-08-15 12:41:14 +03:00
|
|
|
use vergen::{vergen, Config};
|
2022-08-09 04:49:06 +03:00
|
|
|
|
2022-08-03 06:38:05 +03:00
|
|
|
// Validate conflict between host / plugin features
|
|
|
|
#[cfg(all(
|
|
|
|
feature = "plugin_transform",
|
|
|
|
any(
|
|
|
|
feature = "plugin_transform_host_native",
|
|
|
|
feature = "plugin_transform_host_js"
|
|
|
|
)
|
|
|
|
))]
|
|
|
|
compile_error!(
|
|
|
|
"'plugin_transform' and 'plugin_transform_host*' features are mutually exclusive. If you're \
|
|
|
|
writing a plugin, use 'plugin_transform' feature. If you're writing a custom SWC binary to \
|
|
|
|
run plugin, use 'plugin_transform_host_*' instead."
|
|
|
|
);
|
|
|
|
|
2022-08-05 08:11:40 +03:00
|
|
|
#[cfg(all(feature = "__plugin_transform", feature = "common_concurrent"))]
|
|
|
|
compile_error!("plugin transform cannot enable concurrent mode.");
|
|
|
|
|
|
|
|
#[cfg(all(feature = "transforms", feature = "transforms_concurrent"))]
|
|
|
|
compile_error!(
|
|
|
|
"'transforms' and 'transforms_concurrent' features are mutually exclusive. Please choose only \
|
|
|
|
one feature."
|
|
|
|
);
|
|
|
|
|
2022-08-03 06:38:05 +03:00
|
|
|
fn main() {
|
2022-08-15 12:41:14 +03:00
|
|
|
vergen(Config::default()).expect("Build time metadata should be available");
|
2022-08-03 06:38:05 +03:00
|
|
|
}
|