Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions tools/build_with_debinfo.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,9 @@ def create_build_plan() -> list[tuple[str, str]]:
if line.startswith(": &&") and line.endswith("&& :"):
line = line[4:-4]
line = line.replace("-O2", "-g").replace("-O3", "-g")
# Build Metal shaders with debug infomation
if "xcrun metal " in line and "-frecord-sources" not in line:
line += " -frecord-sources -gline-tables-only"
Copy link
Member

Choose a reason for hiding this comment

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

Thanks for this. I wonder why we're passing -gline-tables-only rather than -g0 or -g1 -- I assume we don't care about frame variables and other info for now (in particular for profiling).

try:
name = line.split("-o ", 1)[1].split(" ")[0]
rc.append((name, line))
Expand Down
Loading