cc-rs
cc-rs copied to clipboard
Add `compiler.is_clang_cl()` helper.
Motivating example:
The following boilerplate is required to enable compilation with SSE3 intrinsics.
let compiler = build.get_compiler();
let is_clang_cl = compiler.path().ends_with("clang-cl.exe") || compiler.path().ends_with("clang-cl");
if compiler.is_like_gnu() || compiler.is_like_clang() || is_clang_cl {
#[cfg(target_arch = "x86_64")]
build.flag("-mssse3");
}
cc-rs should provide and maintain a is_clang_cl helper to make this process more robust and convenient.