Skip to content
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: Reduce and cleanup verbose output for SCU builds #83996

Merged
merged 1 commit into from
Oct 26, 2023

Conversation

akien-mga
Copy link
Member

Verbose output is meant for debugging the SCU mode itself and can be triggered by changing the _verbose bool manually.

Prefix all prints with "SCU:" for context, and print the processed folders all at once instead of when adding the sources.

Build outputs before and after the PR

scons verbose=yes null build before the PR:

pyston-scons -j7 p=linuxbsd dev_build=yes dev_mode=yes linker=mold scu_build=all 2>&1 | tee -a build.log
scons: Reading SConscript files ...
=============================
Single Compilation Unit Build
=============================
Generating SCU build files... (max includes per scu 1024)
generating: scu_core.gen.cpp
generating: scu_core_crypto.gen.cpp
generating: scu_core_debugger.gen.cpp
generating: scu_core_extension.gen.cpp
generating: scu_core_input.gen.cpp
generating: scu_core_io.gen.cpp
generating: scu_core_math.gen.cpp
generating: scu_core_object.gen.cpp
generating: scu_core_os.gen.cpp
generating: scu_core_string.gen.cpp
generating: scu_core_variant.gen.cpp
generating: scu_core_variant_exception.gen.cpp
generating: scu_drivers_unix.gen.cpp
generating: scu_drivers_png.gen.cpp
generating: scu_editor.gen.cpp
generating: scu_editor_1.gen.cpp
generating: scu_editor_2.gen.cpp
generating: scu_editor_exception.gen.cpp
generating: scu_editor_debugger.gen.cpp
generating: scu_editor_debugger_debug_adapter.gen.cpp
generating: scu_editor_export.gen.cpp
generating: scu_editor_gui.gen.cpp
generating: scu_editor_import.gen.cpp
generating: scu_editor_plugins.gen.cpp
generating: scu_editor_plugins_gizmos.gen.cpp
generating: scu_editor_plugins_tiles.gen.cpp
generating: scu_platform_android_export.gen.cpp
generating: scu_platform_ios_export.gen.cpp
generating: scu_platform_linuxbsd_export.gen.cpp
generating: scu_platform_macos_export.gen.cpp
generating: scu_platform_web_export.gen.cpp
generating: scu_platform_windows_export.gen.cpp
generating: scu_modules_gltf.gen.cpp
generating: scu_modules_gltf_structures.gen.cpp
generating: scu_modules_gltf_editor.gen.cpp
generating: scu_modules_gltf_extensions.gen.cpp
generating: scu_modules_gltf_extensions_physics.gen.cpp
generating: scu_modules_navigation.gen.cpp
generating: scu_modules_webrtc.gen.cpp
generating: scu_modules_websocket.gen.cpp
generating: scu_modules_gridmap.gen.cpp
generating: scu_modules_multiplayer.gen.cpp
generating: scu_modules_multiplayer_editor.gen.cpp
generating: scu_modules_openxr.gen.cpp
generating: scu_modules_openxr_exception.gen.cpp
generating: scu_modules_openxr_action_map.gen.cpp
generating: scu_modules_openxr_editor.gen.cpp
generating: scu_modules_csg.gen.cpp
generating: scu_modules_gdscript.gen.cpp
generating: scu_modules_gdscript_editor.gen.cpp
generating: scu_modules_gdscript_language_server.gen.cpp
generating: scu_scene_2d.gen.cpp
generating: scu_scene_3d.gen.cpp
generating: scu_scene_animation.gen.cpp
generating: scu_scene_gui.gen.cpp
generating: scu_scene_main.gen.cpp
generating: scu_scene_resources.gen.cpp
generating: scu_servers.gen.cpp
generating: scu_servers_rendering.gen.cpp
generating: scu_servers_rendering_storage.gen.cpp
generating: scu_servers_rendering_renderer_rd.gen.cpp
generating: scu_servers_rendering_renderer_rd_effects.gen.cpp
generating: scu_servers_rendering_renderer_rd_environment.gen.cpp
generating: scu_servers_rendering_renderer_rd_storage_rd.gen.cpp
generating: scu_servers_physics_2d.gen.cpp
generating: scu_servers_physics_3d.gen.cpp
generating: scu_servers_physics_3d_joints.gen.cpp
generating: scu_servers_audio.gen.cpp
generating: scu_servers_audio_effects.gen.cpp
Using linker program: mold
Building for platform "linuxbsd", architecture "x86_64", target "editor".
NOTE: Developer build, with debug optimization level and debug symbols (unless overridden).
SCU building core
SCU building core/os
SCU building core/math
SCU building core/crypto
SCU building core/io
SCU building core/debugger
SCU building core/input
SCU building core/variant
SCU building core/extension
SCU building core/object
SCU building core/string
SCU building servers
SCU building servers/physics_3d
SCU building servers/physics_3d/joints
SCU building servers/physics_2d
SCU building servers/rendering
SCU building servers/rendering/renderer_rd
SCU building servers/rendering/renderer_rd/effects
SCU building servers/rendering/renderer_rd/environment
SCU building servers/rendering/renderer_rd/storage_rd
SCU building servers/rendering/storage
SCU building servers/audio
SCU building servers/audio/effects
SCU building scene/main
SCU building scene/gui
SCU building scene/3d
SCU building scene/2d
SCU building scene/animation
SCU building scene/resources
SCU building platform/android/export
SCU building platform/ios/export
SCU building platform/linuxbsd/export
SCU building platform/macos/export
SCU building platform/web/export
SCU building platform/windows/export
SCU building editor
SCU building editor/debugger
SCU building editor/debugger/debug_adapter
SCU building editor/export
SCU building editor/gui
SCU building editor/import
SCU building editor/plugins
SCU building editor/plugins/gizmos
SCU building editor/plugins/tiles
SCU building drivers/unix
SCU building drivers/png
SCU building modules/websocket
SCU building modules/webrtc
SCU building modules/openxr
SCU building modules/openxr/action_map
SCU building modules/openxr/editor
SCU building modules/navigation
SCU building modules/multiplayer
SCU building modules/multiplayer/editor
SCU building modules/gridmap
SCU building modules/gltf
SCU building modules/gltf/structures
SCU building modules/gltf/extensions
SCU building modules/gltf/extensions/physics
SCU building modules/gltf/editor
SCU building modules/gdscript
SCU building modules/gdscript/editor
SCU building modules/gdscript/language_server
SCU building modules/csg
Checking for C header file mntent.h... (cached) yes
scons: done reading SConscript files.
scons: Building targets ...
progress_finish(["progress_finish"], [])
scons: done building targets.
[Time elapsed: 00:00:03.983]

scons verbose=yes null build with this PR:

$ gobuild_linux
pyston-scons -j7 p=linuxbsd dev_build=yes dev_mode=yes linker=mold scu_build=all 2>&1 | tee -a build.log
scons: Reading SConscript files ...
Single Compilation Unit mode enabled.
SCU: Generating build files... (max includes per SCU: 1024)
Using linker program: mold
Building for platform "linuxbsd", architecture "x86_64", target "editor".
NOTE: Developer build, with debug optimization level and debug symbols (unless overridden).
Checking for C header file mntent.h... (cached) yes
scons: done reading SConscript files.
scons: Building targets ...
progress_finish(["progress_finish"], [])
scons: done building targets.
[Time elapsed: 00:00:03.933]

scons verbose=yes null build with the _verbose flag enabled manually in scu_builders.py, for debugging:

$ gobuild_linux
pyston-scons -j7 p=linuxbsd dev_build=yes dev_mode=yes linker=mold scu_build=all 2>&1 | tee -a build.log
scons: Reading SConscript files ...
Single Compilation Unit mode enabled.
SCU: Generating build files... (max includes per SCU: 1024)
SCU: Generating: scu_core.gen.cpp
SCU: Generating: scu_core_crypto.gen.cpp
SCU: Generating: scu_core_debugger.gen.cpp
SCU: Generating: scu_core_extension.gen.cpp
SCU: Generating: scu_core_input.gen.cpp
SCU: Generating: scu_core_io.gen.cpp
SCU: Generating: scu_core_math.gen.cpp
SCU: Generating: scu_core_object.gen.cpp
SCU: Generating: scu_core_os.gen.cpp
SCU: Generating: scu_core_string.gen.cpp
SCU: Generating: scu_core_variant.gen.cpp
SCU: Generating: scu_core_variant_exception.gen.cpp
SCU: Generating: scu_drivers_unix.gen.cpp
SCU: Generating: scu_drivers_png.gen.cpp
SCU: Generating: scu_editor.gen.cpp
SCU: Generating: scu_editor_1.gen.cpp
SCU: Generating: scu_editor_2.gen.cpp
SCU: Generating: scu_editor_exception.gen.cpp
SCU: Generating: scu_editor_debugger.gen.cpp
SCU: Generating: scu_editor_debugger_debug_adapter.gen.cpp
SCU: Generating: scu_editor_export.gen.cpp
SCU: Generating: scu_editor_gui.gen.cpp
SCU: Generating: scu_editor_import.gen.cpp
SCU: Generating: scu_editor_plugins.gen.cpp
SCU: Generating: scu_editor_plugins_gizmos.gen.cpp
SCU: Generating: scu_editor_plugins_tiles.gen.cpp
SCU: Generating: scu_platform_android_export.gen.cpp
SCU: Generating: scu_platform_ios_export.gen.cpp
SCU: Generating: scu_platform_linuxbsd_export.gen.cpp
SCU: Generating: scu_platform_macos_export.gen.cpp
SCU: Generating: scu_platform_web_export.gen.cpp
SCU: Generating: scu_platform_windows_export.gen.cpp
SCU: Generating: scu_modules_gltf.gen.cpp
SCU: Generating: scu_modules_gltf_structures.gen.cpp
SCU: Generating: scu_modules_gltf_editor.gen.cpp
SCU: Generating: scu_modules_gltf_extensions.gen.cpp
SCU: Generating: scu_modules_gltf_extensions_physics.gen.cpp
SCU: Generating: scu_modules_navigation.gen.cpp
SCU: Generating: scu_modules_webrtc.gen.cpp
SCU: Generating: scu_modules_websocket.gen.cpp
SCU: Generating: scu_modules_gridmap.gen.cpp
SCU: Generating: scu_modules_multiplayer.gen.cpp
SCU: Generating: scu_modules_multiplayer_editor.gen.cpp
SCU: Generating: scu_modules_openxr.gen.cpp
SCU: Generating: scu_modules_openxr_exception.gen.cpp
SCU: Generating: scu_modules_openxr_action_map.gen.cpp
SCU: Generating: scu_modules_openxr_editor.gen.cpp
SCU: Generating: scu_modules_csg.gen.cpp
SCU: Generating: scu_modules_gdscript.gen.cpp
SCU: Generating: scu_modules_gdscript_editor.gen.cpp
SCU: Generating: scu_modules_gdscript_language_server.gen.cpp
SCU: Generating: scu_scene_2d.gen.cpp
SCU: Generating: scu_scene_3d.gen.cpp
SCU: Generating: scu_scene_animation.gen.cpp
SCU: Generating: scu_scene_gui.gen.cpp
SCU: Generating: scu_scene_main.gen.cpp
SCU: Generating: scu_scene_resources.gen.cpp
SCU: Generating: scu_servers.gen.cpp
SCU: Generating: scu_servers_rendering.gen.cpp
SCU: Generating: scu_servers_rendering_storage.gen.cpp
SCU: Generating: scu_servers_rendering_renderer_rd.gen.cpp
SCU: Generating: scu_servers_rendering_renderer_rd_effects.gen.cpp
SCU: Generating: scu_servers_rendering_renderer_rd_environment.gen.cpp
SCU: Generating: scu_servers_rendering_renderer_rd_storage_rd.gen.cpp
SCU: Generating: scu_servers_physics_2d.gen.cpp
SCU: Generating: scu_servers_physics_3d.gen.cpp
SCU: Generating: scu_servers_physics_3d_joints.gen.cpp
SCU: Generating: scu_servers_audio.gen.cpp
SCU: Generating: scu_servers_audio_effects.gen.cpp
SCU: Processed folders: ['core', 'core/crypto', 'core/debugger', 'core/extension', 'core/input', 'core/io', 'core/math', 'core/object', 'core/os', 'core/string', 'core/variant', 'drivers/png', 'drivers/unix', 'editor', 'editor/debugger', 'editor/debugger/debug_adapter', 'editor/export', 'editor/gui', 'editor/import', 'editor/plugins', 'editor/plugins/gizmos', 'editor/plugins/tiles', 'modules/csg', 'modules/gdscript', 'modules/gdscript/editor', 'modules/gdscript/language_server', 'modules/gltf', 'modules/gltf/editor', 'modules/gltf/extensions', 'modules/gltf/extensions/physics', 'modules/gltf/structures', 'modules/gridmap', 'modules/multiplayer', 'modules/multiplayer/editor', 'modules/navigation', 'modules/openxr', 'modules/openxr/action_map', 'modules/openxr/editor', 'modules/webrtc', 'modules/websocket', 'platform/android/export', 'platform/ios/export', 'platform/linuxbsd/export', 'platform/macos/export', 'platform/web/export', 'platform/windows/export', 'scene/2d', 'scene/3d', 'scene/animation', 'scene/gui', 'scene/main', 'scene/resources', 'servers', 'servers/audio', 'servers/audio/effects', 'servers/physics_2d', 'servers/physics_3d', 'servers/physics_3d/joints', 'servers/rendering', 'servers/rendering/renderer_rd', 'servers/rendering/renderer_rd/effects', 'servers/rendering/renderer_rd/environment', 'servers/rendering/renderer_rd/storage_rd', 'servers/rendering/storage']
Using linker program: mold
Building for platform "linuxbsd", architecture "x86_64", target "editor".
NOTE: Developer build, with debug optimization level and debug symbols (unless overridden).
Checking for C header file mntent.h... (cached) yes
scons: done reading SConscript files.
scons: Building targets ...
progress_finish(["progress_finish"], [])
scons: done building targets.
[Time elapsed: 00:00:03.970]

@akien-mga akien-mga added enhancement topic:buildsystem cherrypick:3.x Considered for cherry-picking into a future 3.x release labels Oct 26, 2023
@akien-mga akien-mga added this to the 4.x milestone Oct 26, 2023
@akien-mga akien-mga requested a review from a team as a code owner October 26, 2023 11:27
Verbose output is meant for debugging the SCU mode itself and can be
triggered by changing the `_verbose` bool manually.

Prefix all prints with "SCU:" for context, and print the processed
folders all at once instead of when adding the sources.
@akien-mga
Copy link
Member Author

akien-mga commented Oct 26, 2023

Following @lawnjelly's feedback, I restored the header styling to make sure the mention that SCU is enabled isn't missed:

print("=============================")
print("Single Compilation Unit Build")
print("=============================")

@lawnjelly: Personally I'd be tempted to keep the ######### lines, just because it's easy to miss without, and it's probably the most major build option as it affects a lot of things. But maybe that's my own cognitive bias. 😀

@akien-mga akien-mga modified the milestones: 4.x, 4.2 Oct 26, 2023
@akien-mga akien-mga merged commit 4113a0c into godotengine:master Oct 26, 2023
15 checks passed
@akien-mga akien-mga deleted the scons-reduce-scu-verbosity branch October 26, 2023 14:06
@akien-mga akien-mga removed the cherrypick:3.x Considered for cherry-picking into a future 3.x release label Jan 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants