Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add compiler.is_clang_cl() helper. #856

Open
riidefi opened this issue Aug 16, 2023 · 0 comments
Open

Add compiler.is_clang_cl() helper. #856

riidefi opened this issue Aug 16, 2023 · 0 comments

Comments

@riidefi
Copy link

riidefi commented Aug 16, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant