mirror of
https://github.com/roc-lang/roc.git
synced 2025-08-04 20:28:02 +00:00
Merge branch 'main' into rebuild-platform
This commit is contained in:
commit
550baded7f
657 changed files with 33813 additions and 21987 deletions
|
@ -1083,6 +1083,10 @@ fn link_macos(
|
|||
.args(input_paths)
|
||||
.args(extra_link_flags());
|
||||
|
||||
if get_xcode_version() >= 15.0 {
|
||||
ld_command.arg("-ld_classic");
|
||||
}
|
||||
|
||||
let sdk_path = "/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib";
|
||||
if Path::new(sdk_path).exists() {
|
||||
ld_command.arg(format!("-L{sdk_path}"));
|
||||
|
@ -1165,6 +1169,24 @@ fn get_macos_version() -> String {
|
|||
.join(".")
|
||||
}
|
||||
|
||||
fn get_xcode_version() -> f32 {
|
||||
let mut cmd = Command::new("xcodebuild");
|
||||
cmd.arg("-version");
|
||||
debug_print_command(&cmd);
|
||||
|
||||
cmd.output()
|
||||
.map_err(|_| ())
|
||||
.and_then(|out| String::from_utf8(out.stdout).map_err(|_| ()))
|
||||
.and_then(|str| {
|
||||
str.split_whitespace()
|
||||
.nth(1)
|
||||
.map(|s| s.to_string())
|
||||
.ok_or(())
|
||||
})
|
||||
.and_then(|version| version.parse::<f32>().map_err(|_| ()))
|
||||
.unwrap_or(0.0)
|
||||
}
|
||||
|
||||
fn link_wasm32(
|
||||
_target: Target,
|
||||
output_path: PathBuf,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue