snapshot: preserve the uncommitted Canary instrumentation (not authored here)
Some checks failed
Orchestrator / Commit Message Validation (push) Has been skipped
Orchestrator / Lint (push) Failing after 2m0s
Orchestrator / Windows (x86-64) (push) Has been skipped
Orchestrator / Linux (x86-64) (push) Has been skipped
Orchestrator / Create Release (push) Has been skipped
Some checks failed
Orchestrator / Commit Message Validation (push) Has been skipped
Orchestrator / Lint (push) Failing after 2m0s
Orchestrator / Windows (x86-64) (push) Has been skipped
Orchestrator / Linux (x86-64) (push) Has been skipped
Orchestrator / Create Release (push) Has been skipped
Working-tree snapshot taken 2026-07-28 so this work is not lost. To be clear about provenance: NONE of this was written in the session that committed it — it is pre-existing uncommitted work on phase-a-tracing, last committed 2026-07-09, from the xenia-rs decoder/deadlock investigation. It is recorded verbatim, not reviewed and not tested. Contents: 24 tracked modifications (ppc_emit_memory, xex_module, object_table, shim_utils, xboxkrnl threading/rtl, xevent/xobject/xthread, memory) plus the untracked probe sources audit_68_host_mem_watch, audit_69_event_signal_watch, audit_70_semaphore_release_watch, phase_b_snapshot, and cmake/toolchains. Deliberately excluded: build-cross/ (51 GB of build output) and vkd3d-proton.cache. Note third_party/snappy is a submodule pointer change whose target may not be pushed anywhere, so this branch is a preservation record rather than a guaranteed-buildable tree. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -78,6 +78,20 @@ file(MAKE_DIRECTORY "${PROJECT_SOURCE_DIR}/scratch")
|
||||
# Python for shader compilation scripts
|
||||
find_package(Python3 REQUIRED COMPONENTS Interpreter)
|
||||
|
||||
# Generate build-tree version.h via xenia-build.py's generate_version_h()
|
||||
# (normally invoked by `xb premake`/`xb build`; CMake-direct flows need it too).
|
||||
execute_process(
|
||||
COMMAND ${Python3_EXECUTABLE} -c "import importlib.util,sys; spec=importlib.util.spec_from_file_location('xb',r'${PROJECT_SOURCE_DIR}/xenia-build.py'); m=importlib.util.module_from_spec(spec); spec.loader.exec_module(m); m.generate_version_h(r'${CMAKE_BINARY_DIR}')"
|
||||
WORKING_DIRECTORY "${PROJECT_SOURCE_DIR}"
|
||||
RESULT_VARIABLE _xenia_version_rc
|
||||
)
|
||||
if(NOT _xenia_version_rc EQUAL 0)
|
||||
message(WARNING "version.h generation failed (rc=${_xenia_version_rc}); writing stub.")
|
||||
file(WRITE "${CMAKE_BINARY_DIR}/version.h"
|
||||
"#ifndef GENERATED_VERSION_H_\n#define GENERATED_VERSION_H_\n#define XE_BUILD_BRANCH \"unknown\"\n#define XE_BUILD_COMMIT \"unknown\"\n#define XE_BUILD_COMMIT_SHORT \"unknown\"\n#define XE_BUILD_DATE __DATE__\n#endif\n"
|
||||
)
|
||||
endif()
|
||||
|
||||
# Include helpers
|
||||
include(cmake/XeniaHelpers.cmake)
|
||||
|
||||
@@ -142,8 +156,17 @@ if(MSVC)
|
||||
|
||||
# --- Per-configuration MSVC flags ---
|
||||
# Checked
|
||||
string(APPEND CMAKE_C_FLAGS_CHECKED " /RTCsu /fsanitize=address")
|
||||
string(APPEND CMAKE_CXX_FLAGS_CHECKED " /RTCsu /fsanitize=address")
|
||||
# /RTCsu is MSVC-only; clang-cl ignores it with a per-TU warning. Gate it
|
||||
# so the Checked config stays quiet when cross-compiling with clang-cl.
|
||||
# ASan (/fsanitize=address) stays active in both branches.
|
||||
if(CMAKE_CXX_COMPILER_FRONTEND_VARIANT STREQUAL "MSVC"
|
||||
AND NOT CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
|
||||
string(APPEND CMAKE_C_FLAGS_CHECKED " /RTCsu /fsanitize=address")
|
||||
string(APPEND CMAKE_CXX_FLAGS_CHECKED " /RTCsu /fsanitize=address")
|
||||
else()
|
||||
string(APPEND CMAKE_C_FLAGS_CHECKED " /fsanitize=address")
|
||||
string(APPEND CMAKE_CXX_FLAGS_CHECKED " /fsanitize=address")
|
||||
endif()
|
||||
string(APPEND CMAKE_EXE_LINKER_FLAGS_CHECKED " /INCREMENTAL:NO")
|
||||
add_compile_definitions($<$<CONFIG:Checked>:DEBUG>)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user