diff options
| author | Stefan Boberg <[email protected]> | 2026-03-16 10:52:45 +0100 |
|---|---|---|
| committer | GitHub Enterprise <[email protected]> | 2026-03-16 10:52:45 +0100 |
| commit | 79e10a165cf09dc2cc120b3a226c51f87c235f20 (patch) | |
| tree | cf51b07e097904044b4bf65bc3fe0ad14134074f /src/zencore/memtrack | |
| parent | Linux build improvements (#843) (diff) | |
| download | zen-79e10a165cf09dc2cc120b3a226c51f87c235f20.tar.xz zen-79e10a165cf09dc2cc120b3a226c51f87c235f20.zip | |
Enable cross compilation of Windows targets on Linux (#839)
This PR makes it *possible* to do a Windows build on Linux via `clang-cl`.
It doesn't actually change any build process. No policy change, just mechanics and some code fixes to clear clang compilation.
The code fixes are mainly related to #include file name casing, to match the on-disk casing of the SDK files (via xwin).
Diffstat (limited to 'src/zencore/memtrack')
| -rw-r--r-- | src/zencore/memtrack/callstacktrace.cpp | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/src/zencore/memtrack/callstacktrace.cpp b/src/zencore/memtrack/callstacktrace.cpp index 013c51535..ccbea1282 100644 --- a/src/zencore/memtrack/callstacktrace.cpp +++ b/src/zencore/memtrack/callstacktrace.cpp @@ -193,8 +193,12 @@ private: std::atomic_uint32_t CallstackIdCounter{1}; // 0 is reserved for "unknown callstack" }; +} // namespace zen + # if UE_CALLSTACK_TRACE_USE_UNWIND_TABLES +namespace zen { + /* * Windows' x64 binaries contain a ".pdata" section that describes the location * and size of its functions and details on how to unwind them. The unwind @@ -908,10 +912,12 @@ FBacktracer::GetBacktraceId(void* AddressOfReturnAddress) // queue (i.e. the processing thread has caught up processing). return CallstackTracer.AddCallstack(BacktraceEntry); } -} +} // namespace zen # else // UE_CALLSTACK_TRACE_USE_UNWIND_TABLES +namespace zen { + //////////////////////////////////////////////////////////////////////////////// class FBacktracer { @@ -921,8 +927,8 @@ public: static FBacktracer* Get(); inline uint32_t GetBacktraceId(void* AddressOfReturnAddress); uint32_t GetBacktraceId(uint64_t ReturnAddress); - void AddModule(uintptr_t Base, const char16_t* Name) {} - void RemoveModule(uintptr_t Base) {} + void AddModule(uintptr_t /*Base*/, const char16_t* /*Name*/) {} + void RemoveModule(uintptr_t /*Base*/) {} private: static FBacktracer* Instance; @@ -963,6 +969,7 @@ FBacktracer::GetBacktraceId(void* AddressOfReturnAddress) uint32_t FBacktracer::GetBacktraceId(uint64_t ReturnAddress) { + ZEN_UNUSED(ReturnAddress); # if !UE_BUILD_SHIPPING uint64_t StackFrames[256]; int32_t NumStackFrames = FPlatformStackWalk::CaptureStackBackTrace(StackFrames, UE_ARRAY_COUNT(StackFrames)); @@ -1006,7 +1013,8 @@ FBacktracer::GetBacktraceId(uint64_t ReturnAddress) return 0; } -} + +} // namespace zen # endif // UE_CALLSTACK_TRACE_USE_UNWIND_TABLES |