-
-
Notifications
You must be signed in to change notification settings - Fork 21.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SCons: Improve debug symbol logic & cleanup #91669
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Windows now correctly checks for both debug_symbols and separate_debug_symbols before attempting separation; previously, it only checked for the former.
This was intentional, MinGW build should check for executable size and force debug symbols if it's too large (see #79875), but seems like the logic is already broken by #85319, the following two lines were likely accidentally removed during rebase:
# Force separate debug symbols if executable size is larger than 1.9 GB.
if env["separate_debug_symbols"] or os.stat(target[0]).st_size >= 2040109465:
4d5cc34
to
cb42781
Compare
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
It only looks for a prefixed executable when checking if Windows is a supported platform, ensuring no false positives. If Windows is supported & selected for building, the |
I have missed that it's checking for |
I'd prefer it on a standalone PR to fix the regression only. Build system changes have a high risk of breaking specific configs so I prefer we first fix the known issues, before adding potential new ones by fast tracking an enhancement PR. |
cb42781
to
800bca3
Compare
That's a really good point. Removed the fix from this PR & migrated the code to #91734 instead. |
b86dee4
to
aa1ad48
Compare
• Relocate `arrange_program_clean` from Windows `SCsub` to `methods.py`; refactor as an universal environment function • Remove `platform_*_builders.py` files, logic relocated and refactored in respective SCsub files
aa1ad48
to
1299334
Compare
Changing to a draft now that this is a dependency of #91847. |
Depends on #91847
This PR improves the debugsymbol logic overall in a number of ways:
--clean
to SCons. Logic to support something similar already existed in the WindowsSCSub
viaarrange_program_clean
, but that's now been migrated tomethods.py
& refactored as a universal environment function.platform_*_builders.py
have been migrated to their respectiveSCSub
, being cleaned up in the process. Consequently, the original files have been removed, as they only had that single function & the files themselves became redundant once subprocess dependencies were removed1.Windows now correctly checks for bothEDIT: Working as intended.debug_symbols
andseparate_debug_symbols
before attempting separation; previously, it only checked for the former.objcopy
andstrip
exist indetect.py
instead ofSCSub
, and throws a proper error if they're missing. This allows pulling their MinGW paths only once & will alert the user to issues prior to building instead of at the very last second..debugsymbol
extension to program stem instead of the existing name (.exe.debugsymbols
→.debugsymbols
). This matches the naming scheme of the other Windows program files that require explicit cleanup (.ilk
,.exp
,.pdb
,.lib
).Footnotes
SCons: Remove
run_in_subprocess
&subprocess_main
dependencies #89393 ↩