We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Some Linux distros use LLVM libc++ instead of GNU libstdc++. Would support for this in build.rs be possible?
The text was updated successfully, but these errors were encountered:
Hi @Ella-0, thanks for the request. But unfortunately I at the moment won't have the bandwidth to work on this. Patches welcome!! :)
Sorry, something went wrong.
The following fixes it. I would create a PR but I do not want to sign the CLA.
diff --git a/shaderc-sys/build/build.rs b/shaderc-sys/build/build.rs index 946309e..50f76ee 100644 --- a/shaderc-sys/build/build.rs +++ b/shaderc-sys/build/build.rs @@ -253,9 +253,13 @@ fn main() { } { match (target_os.as_str(), target_env.as_str()) { ("linux", _) => { + use std::process::Command; println!("cargo:rustc-link-search=native={}", search_dir_str); println!("cargo:rustc-link-lib={}={}", lib_kind, lib_name); - println!("cargo:rustc-link-lib=dylib=stdc++"); + match Command::new("cc").arg("-nostdlib").arg("-lstdc++").output() { + Ok(_) => println!("cargo:rustc-link-lib=dylib=stdc++"), + Err(_) => println!("cargo:rustc-link-lib=dylib=c++"), + } return; } ("windows", "msvc") => {
No branches or pull requests
Some Linux distros use LLVM libc++ instead of GNU libstdc++. Would support for this in build.rs be possible?
The text was updated successfully, but these errors were encountered: