Unverified 提交 66ff5240 authored 作者: satoren's avatar satoren

fix format

上级 b0a1ed4a
...@@ -55,14 +55,17 @@ fn main() { ...@@ -55,14 +55,17 @@ fn main() {
#[cfg(target_os = "macos")] #[cfg(target_os = "macos")]
{ {
let path = Command::new("xcrun") let path = Command::new("xcrun")
.args(&[ .args(&["--show-sdk-path"])
"--show-sdk-path"
])
.output() .output()
.expect("Failed to start") .expect("Failed to start")
.stdout; .stdout;
let libpath = format!("{}/usr/lib", String::from_utf8(path).expect("Failed to decode path").trim()); let libpath = format!(
"{}/usr/lib",
String::from_utf8(path)
.expect("Failed to decode path")
.trim()
);
println!("cargo:rustc-link-search={}", libpath); println!("cargo:rustc-link-search={}", libpath);
println!("cargo:rustc-cdylib-link-arg=-stdlib=libc++"); println!("cargo:rustc-cdylib-link-arg=-stdlib=libc++");
println!("cargo:rustc-link-lib=dylib=c++"); println!("cargo:rustc-link-lib=dylib=c++");
......
Markdown 格式
0% 或
您添加了 0 人 到此讨论。请谨慎行事。
请先完成此评论的编辑!
请 注册 或者 后发表评论