diff --git a/boring-sys/build/main.rs b/boring-sys/build/main.rs index 542d9663..d9c26b45 100644 --- a/boring-sys/build/main.rs +++ b/boring-sys/build/main.rs @@ -581,13 +581,16 @@ fn main() { if !config.env.docs_rs { emit_link_directives(&config); } - if config.features.prefix_symbols - && ["macos", "ios", "windows"].contains(&config.target_os.as_str()) - { - panic!("The `prefix_symbols` feature is not supported on macOS/iOS or windows targets."); - } + if config.features.prefix_symbols { - prefix_symbols(&config); + match config.target_os.as_str() { + "macos" | "ios" | "windows" => { + panic!( + "The `prefix_symbols` feature is not supported on macOS/iOS or windows targets." + ); + } + _ => prefix_symbols(&config), + } } generate_bindings(&config); }