20 lines
824 B
Diff
20 lines
824 B
Diff
diff --git a/rutabaga_gfx/build.rs b/rutabaga_gfx/build.rs
|
|
index bd5a9be96..d2244c4c6 100644
|
|
--- a/rutabaga_gfx/build.rs
|
|
+++ b/rutabaga_gfx/build.rs
|
|
@@ -194,9 +194,14 @@ fn gfxstream() -> Result<()> {
|
|
pkg_config::Config::new().probe("libdrm")?;
|
|
}
|
|
|
|
+ let mut use_clang = target_os.contains("macos");
|
|
+ if std::env::var("USE_CLANG").is_ok() {
|
|
+ use_clang = true;
|
|
+ }
|
|
+
|
|
// Need to link against libc++ or libstdc++. Apple is clang-only, while by default other
|
|
// Unix platforms use libstdc++.
|
|
- if target_os.contains("macos") {
|
|
+ if use_clang {
|
|
println!("cargo:rustc-link-lib=dylib=c++");
|
|
} else if target_os.contains("linux") || target_os.contains("nto") {
|
|
println!("cargo:rustc-link-lib=dylib=stdc++");
|