More build fixes
This commit is contained in:
parent
bcc7968424
commit
ea7cd4638c
@ -1,4 +1,4 @@
|
|||||||
// Generated by the DN single header generator 2025-11-09 15:08:50
|
// Generated by the DN single header generator 2025-11-09 15:37:40
|
||||||
|
|
||||||
#define DN_BASE_INC_CPP
|
#define DN_BASE_INC_CPP
|
||||||
|
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
// Generated by the DN single header generator 2025-11-09 15:08:50
|
// Generated by the DN single header generator 2025-11-09 15:37:40
|
||||||
|
|
||||||
#if !defined(DN_BASE_INC_H)
|
#if !defined(DN_BASE_INC_H)
|
||||||
#define DN_BASE_INC_H
|
#define DN_BASE_INC_H
|
||||||
|
|||||||
@ -544,7 +544,7 @@ void DN_Demo()
|
|||||||
DN_ProfilerTSCNowFunc *tsc_now = DN_OS_PerfCounterNow;
|
DN_ProfilerTSCNowFunc *tsc_now = DN_OS_PerfCounterNow;
|
||||||
DN_U64 tsc_frequency = DN_OS_PerfCounterFrequency();
|
DN_U64 tsc_frequency = DN_OS_PerfCounterFrequency();
|
||||||
#else
|
#else
|
||||||
DN_ProfilerTSCNowFunc *tsc_now = __rdtsc;
|
DN_ProfilerTSCNowFunc *tsc_now = nullptr;
|
||||||
DN_U64 tsc_frequency = DN_OS_EstimateTSCPerSecond(100);
|
DN_U64 tsc_frequency = DN_OS_EstimateTSCPerSecond(100);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -644,21 +644,21 @@ void DN_Demo()
|
|||||||
{
|
{
|
||||||
DN_OSTLSTMem tmem = DN_OS_TLSTMem(nullptr);
|
DN_OSTLSTMem tmem = DN_OS_TLSTMem(nullptr);
|
||||||
|
|
||||||
// NOTE: DN_StackTrace_Walk
|
// NOTE: DN_StackTraceWalk
|
||||||
//
|
//
|
||||||
// Generate a stack trace as a series of addresses to the base of the
|
// Generate a stack trace as a series of addresses to the base of the
|
||||||
// functions on the call-stack at the current instruction pointer. The
|
// functions on the call-stack at the current instruction pointer. The
|
||||||
// addresses are stored in order from the current executing function
|
// addresses are stored in order from the current executing function
|
||||||
// first to the most ancestor function last in the walk.
|
// first to the most ancestor function last in the walk.
|
||||||
DN_StackTraceWalkResult walk = DN_StackTrace_Walk(tmem.arena, /*depth limit*/ 128);
|
DN_StackTraceWalkResult walk = DN_StackTraceWalk(tmem.arena, /*depth limit*/ 128);
|
||||||
|
|
||||||
// Loop over the addresses produced in the stack trace
|
// Loop over the addresses produced in the stack trace
|
||||||
for (DN_StackTraceWalkResultIterator it = {}; DN_StackTrace_WalkResultIterate(&it, &walk);) {
|
for (DN_StackTraceWalkResultIterator it = {}; DN_StackTraceWalkResultIterate(&it, &walk);) {
|
||||||
// NOTE: DN_StackTrace_RawFrameToFrame
|
// NOTE: DN_StackTraceRawFrameToFrame
|
||||||
//
|
//
|
||||||
// Converts the base address into a human readable stack trace
|
// Converts the base address into a human readable stack trace
|
||||||
// entry (e.g. address, line number, file and function name).
|
// entry (e.g. address, line number, file and function name).
|
||||||
DN_StackTraceFrame frame = DN_StackTrace_RawFrameToFrame(tmem.arena, it.raw_frame);
|
DN_StackTraceFrame frame = DN_StackTraceRawFrameToFrame(tmem.arena, it.raw_frame);
|
||||||
|
|
||||||
// You may then print out the frame like so
|
// You may then print out the frame like so
|
||||||
if (0)
|
if (0)
|
||||||
@ -668,14 +668,14 @@ void DN_Demo()
|
|||||||
// If you load new shared-libraries into the address space it maybe
|
// If you load new shared-libraries into the address space it maybe
|
||||||
// necessary to call into 'ReloadSymbols' to ensure that the OS is able
|
// necessary to call into 'ReloadSymbols' to ensure that the OS is able
|
||||||
// to resolve the new addresses.
|
// to resolve the new addresses.
|
||||||
DN_StackTrace_ReloadSymbols();
|
DN_StackTraceReloadSymbols();
|
||||||
|
|
||||||
// NOTE: DN_StackTrace_GetFrames
|
// NOTE: DN_StackTraceGetFrames
|
||||||
//
|
//
|
||||||
// Helper function to create a stack trace and automatically convert the
|
// Helper function to create a stack trace and automatically convert the
|
||||||
// raw frames into human readable frames. This function effectively
|
// raw frames into human readable frames. This function effectively
|
||||||
// calls 'Walk' followed by 'RawFrameToFrame'.
|
// calls 'Walk' followed by 'RawFrameToFrame'.
|
||||||
DN_Slice<DN_StackTraceFrame> frames = DN_StackTrace_GetFrames(tmem.arena, /*depth limit*/ 128);
|
DN_Slice<DN_StackTraceFrame> frames = DN_StackTraceGetFrames(tmem.arena, /*depth limit*/ 128);
|
||||||
(void)frames;
|
(void)frames;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -2488,6 +2488,8 @@ static DN_UTCore DN_Tests_Win()
|
|||||||
|
|
||||||
static DN_UTCore DN_Tests_Net()
|
static DN_UTCore DN_Tests_Net()
|
||||||
{
|
{
|
||||||
|
DN_UTCore result = DN_UT_Init();
|
||||||
|
#if defined(DN_UNIT_TESTS_WITH_NET)
|
||||||
DN_Str8 label = {};
|
DN_Str8 label = {};
|
||||||
DN_NETInterface net_interface = {};
|
DN_NETInterface net_interface = {};
|
||||||
#if defined(DN_PLATFORM_EMSCRIPTEN)
|
#if defined(DN_PLATFORM_EMSCRIPTEN)
|
||||||
@ -2498,7 +2500,6 @@ static DN_UTCore DN_Tests_Net()
|
|||||||
label = DN_Str8Lit("CURL");
|
label = DN_Str8Lit("CURL");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
DN_UTCore result = DN_UT_Init();
|
|
||||||
if (label.size) {
|
if (label.size) {
|
||||||
DN_UT_LogF(&result, "DN_NET\n");
|
DN_UT_LogF(&result, "DN_NET\n");
|
||||||
|
|
||||||
@ -2571,6 +2572,7 @@ static DN_UTCore DN_Tests_Net()
|
|||||||
}
|
}
|
||||||
DN_ArenaDeinit(&arena);
|
DN_ArenaDeinit(&arena);
|
||||||
}
|
}
|
||||||
|
#endif // defined(DN_UNIT_TESTS_WITH_NET)
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1049,7 +1049,7 @@ void DN_INI_UnitTests()
|
|||||||
DN_INI_Assert(parse.total_sections_count == 1);
|
DN_INI_Assert(parse.total_sections_count == 1);
|
||||||
DN_INI_Assert(parse.total_fields_count == 2);
|
DN_INI_Assert(parse.total_fields_count == 2);
|
||||||
|
|
||||||
char parse_memory[300];
|
char parse_memory[350];
|
||||||
DN_INI_Assert(parse.memory_required <= sizeof(parse_memory));
|
DN_INI_Assert(parse.memory_required <= sizeof(parse_memory));
|
||||||
|
|
||||||
parse = DN_INI_ParseFromPtr(EXAMPLE, sizeof(EXAMPLE) - 1, parse_memory, sizeof(parse_memory));
|
parse = DN_INI_ParseFromPtr(EXAMPLE, sizeof(EXAMPLE) - 1, parse_memory, sizeof(parse_memory));
|
||||||
|
|||||||
@ -34,7 +34,7 @@ pushd %build_dir%
|
|||||||
:: GR- Disable C RTTI
|
:: GR- Disable C RTTI
|
||||||
:: Oi Use CPU Intrinsics
|
:: Oi Use CPU Intrinsics
|
||||||
:: Z7 Combine multi-debug files to one debug file
|
:: Z7 Combine multi-debug files to one debug file
|
||||||
set flags=%flags% -D DN_UNIT_TESTS_WITH_KECCAK %script_dir%\Source\Extra\dn_tests_main.cpp
|
set flags=%flags% -D DN_UNIT_TESTS_WITH_KECCAK -D DN_UNIT_TESTS_WITH_NET %script_dir%\Source\Extra\dn_tests_main.cpp
|
||||||
set msvc_driver_flags=-EHa -GR- -Od -Oi -Z7 -wd4201 -W4 -nologo %flags% -fsanitize=address
|
set msvc_driver_flags=-EHa -GR- -Od -Oi -Z7 -wd4201 -W4 -nologo %flags% -fsanitize=address
|
||||||
|
|
||||||
where /q emcc && (
|
where /q emcc && (
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user