Skip to content

Set MACOSX_DEPLOYMENT_TARGET#445

Merged
yutannihilation merged 7 commits intomainfrom
feat/set-MACOSX_DEPLOYMENT_TARGET
Apr 13, 2026
Merged

Set MACOSX_DEPLOYMENT_TARGET#445
yutannihilation merged 7 commits intomainfrom
feat/set-MACOSX_DEPLOYMENT_TARGET

Conversation

@yutannihilation
Copy link
Copy Markdown
Owner

@yutannihilation yutannihilation commented Apr 13, 2026

Close #442

Problem

On macOS, downstream packages get this linker warning during R CMD check:

ld: warning: object file (...unwind_protect_wrapper.o) was built for newer 'macOS' version (26.2) than being linked (15.0)

unwind_protect_wrapper.o is compiled by the cc crate in savvy's build.rs. When MACOSX_DEPLOYMENT_TARGET is unset, cc falls back to xcrun --show-sdk-version (e.g. 26.2), which mismatches R's deployment target (e.g. 15.0).

So far, downstream packages have worked around this in their own configure script (cf. yutannihilation/string2path#202, yutannihilation/string2path#208). It would be nicer to fix it once in savvy itself.

Fix

Propagate MACOSX_DEPLOYMENT_TARGET just the same as yutannihilation/string2path#208 does

@yutannihilation yutannihilation merged commit 9aa8cc7 into main Apr 13, 2026
@yutannihilation yutannihilation deleted the feat/set-MACOSX_DEPLOYMENT_TARGET branch April 13, 2026 12:46
@yutannihilation yutannihilation changed the title Set MACOSX_DEPLOYMENT_TARGET in build.rs Set MACOSX_DEPLOYMENT_TARGET Apr 13, 2026
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

Successfully merging this pull request may close these issues.

Always override CC and CFLAGS?

1 participant