Skip to content

Conversation

R-Goc
Copy link

@R-Goc R-Goc commented Aug 23, 2025

Dbghelp is a large library and is known to increase startup times when loaded as a dll. When using /DELAYLOAD windows will automatically load the library on the first call to one of its functions.

Dbghelp is a large library and is known to increase startup times when
loaded as a dll. When using /DELAYLOAD windows will automatically
load the library on the first call to one of its functions.
@R-Goc
Copy link
Author

R-Goc commented Aug 23, 2025

Not sure if this should be default ON or OFF.

Copy link
Owner

@jeremy-rifkin jeremy-rifkin left a comment

Choose a reason for hiding this comment

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

LGTM thanks! I think off is the better default for now since that will preserve existing library behavior and default loading behavior.

@@ -276,6 +276,11 @@ if(CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang")
SET(CMAKE_CXX_ARCHIVE_FINISH "<CMAKE_RANLIB> -no_warning_for_no_symbols -c <TARGET>")
endif()

if(CPPTRACE_DELAYLOAD_DBGHELP AND BUILD_SHARED_LIBS AND MSVC)
Copy link
Owner

Choose a reason for hiding this comment

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

I think this should also check if we're actually using dbghelp, i.e. CPPTRACE_UNWIND_WITH_DBGHELP OR CPPTRACE_GET_SYMBOLS_WITH_DBGHELP OR CPPTRACE_DEMANGLE_WITH_WINAPI. Unfortunately it'll be a bit of a nasty condition :)

@jeremy-rifkin jeremy-rifkin changed the base branch from main to dev September 17, 2025 03:00
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.

2 participants