Files
Library/src/Stacktrace/module.cmake
T
faumarayandClaude Opus 5.5 cd237207d4
Release / release (push) Failing after 5s
Log: one facade state per process, in a LogState library
Void::Log::Detail::state() was a static in an inline function, which is
one object per DLL on Windows: a sink set from one DLL never saw events
from another (a plugin's log lines, or any module but the one that set
it). The state now lives in Void::LogState, a small compiled module with
no dependencies, linked by every module that includes the facade
(Async, System, Stacktrace, Testing; the rest through them), so
INTERFACE modules can still log and no dependency cycle appears.

Tests: VoidTests 1242 pass, 3 skip; run_with_args_builds_correct_argv
and run_stdin_forwarded_to_cat fail on NixOS, which has no
/bin/echo or /bin/cat (exit 127).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-27 05:43:45 +03:00

18 lines
459 B
CMake

if(WIN32 AND NOT CYGWIN)
set(_void_stacktrace_target Boost::stacktrace_windbg)
else()
set(_void_stacktrace_target Boost::stacktrace_addr2line)
endif()
void_add_module(Stacktrace
INTERNAL_DEPS Functional LogState
EXTERNAL_DEPS ${_void_stacktrace_target}
DEPS_UNIX dl
OPTIONS_UNIX -g -fno-omit-frame-pointer
)
if(BUILD_SHARED_LIBS)
target_compile_definitions(Void_Stacktrace
PRIVATE BOOST_STACKTRACE_DYN_LINK)
endif()