swift
[Dependency Scan] Do not pass clang's `-dwarf-debug-flags` to swift
#79179
Merged

[Dependency Scan] Do not pass clang's `-dwarf-debug-flags` to swift #79179

cachemeifyoucan
cachemeifyoucan155 days ago

When turning on directCC1 scanning, swift will ask clang driver to expand all cc1 flags and pass that explicitly on command-line. In such case, if RC_DEBUG_OPTIONS env is set on darwin platform, it will cause clang driver to encode all the options it gets and pass those clang driver options as a cc1 options -dwarf-debug-flags.

After the change, swift scanner will no longer generate a long -Xcc -dwarf-debug-flag -Xcc <long list of flags> for later compilation. Losing such information in DWARF doesn't affect swift debugging. It will instead, make command-line a lot shorter, save spaces in swift binary module, and make swift caching build more reliable.

rdar://144267483

cachemeifyoucan [Dependency Scan] Do not pass clang's `-dwarf-debug-flags` to swift
c3550e81
cachemeifyoucan cachemeifyoucan requested a review from adrian-prantl adrian-prantl 155 days ago
cachemeifyoucan cachemeifyoucan requested a review from augusto2112 augusto2112 155 days ago
cachemeifyoucan cachemeifyoucan requested a review from artemcm artemcm 155 days ago
cachemeifyoucan cachemeifyoucan requested a review from zoecarver zoecarver 155 days ago
cachemeifyoucan cachemeifyoucan requested a review from hyp hyp 155 days ago
cachemeifyoucan cachemeifyoucan requested a review from egorzhdan egorzhdan 155 days ago
cachemeifyoucan cachemeifyoucan requested a review from beccadax beccadax 155 days ago
cachemeifyoucan cachemeifyoucan requested a review from ian-twilightcoder ian-twilightcoder 155 days ago
cachemeifyoucan cachemeifyoucan requested a review from Xazax-hun Xazax-hun 155 days ago
cachemeifyoucan
cachemeifyoucan155 days ago

@swift-ci please smoke test

adrian-prantl
adrian-prantl commented on 2025-02-06
adrian-prantl155 days ago

This LGTM. The embedded clang's flags are not interesting in the use case RC_DEBUG_OPTIONS is intended for.

adrian-prantl
adrian-prantl approved these changes on 2025-02-06
cachemeifyoucan cachemeifyoucan merged e17556a5 into main 155 days ago

Login to write a write a comment.

Login via GitHub

Assignees
No one assigned
Labels
Milestone