Skip to content

Conversation

workingjubilee
Copy link
Member

@workingjubilee workingjubilee commented Sep 26, 2025

Fixes #730 for good.

There was a subtle change in how appleclang interprets command lines between Xcode 16.2 and Xcode 16.4, which caused the cc-rs settings of first setting debug(false) and then passing an explicit debuginfo setting to fail. This might have been inherited from upstream clang, and that is unclear to me. In any case it seems we can just pass -g1 and that works fine.

@workingjubilee
Copy link
Member Author

...ok

@workingjubilee workingjubilee changed the title attempt experimental fix of macos 15 Fix line-tables-only on macOS 15 Sep 26, 2025
@workingjubilee workingjubilee force-pushed the investigate-macos-15-further branch from 127c65b to a3c48a6 Compare September 26, 2025 04:49
@workingjubilee
Copy link
Member Author

@madsmtm I am losing my mind that this was effectively the only problem.

Copy link
Contributor

@madsmtm madsmtm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know why that would be either. Maybe it's meant to be like "-g enables debuginfo", and "-g1 tweaks debuginfo, if it's enabled"?

Similar to how rustc's -Cdwarf-version doesn't have any effect without -Cdebuginfo.

cc::Build::new()
.opt_level(0)
.debug(false)
.flag("-g1")
Copy link
Contributor

@madsmtm madsmtm Sep 26, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: Really should be:

Suggested change
.flag("-g1")
.flag("-gline-tables-only")

For clarity.

(If that is supported by all tested compiler versions)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tried that.

Breaks on half the platforms because that's a clang-only option and gcc doesn't support it, and cc will opportunistically find and use gcc instead.

@workingjubilee workingjubilee force-pushed the investigate-macos-15-further branch from a3c48a6 to 1cea408 Compare September 26, 2025 16:35
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.

macOS 15 fails line-tables-only because of change in C debuginfo
2 participants