Fix NO_VM_COMPILED CMake wiring for unsupported CPU builds#54
Draft
cursor[bot] wants to merge 1 commit intomainfrom
Draft
Fix NO_VM_COMPILED CMake wiring for unsupported CPU builds#54cursor[bot] wants to merge 1 commit intomainfrom
cursor[bot] wants to merge 1 commit intomainfrom
Conversation
- Track NO_VM_COMPILED during CPU branch selection instead of calling target_compile_definitions before qcommon targets exist (invalid CMake). - Apply NO_VM_COMPILED=1 to qcommon and qcommon_ded only when no JIT backend is selected (e.g. RISC-V cross builds). - Normalize elseif chain indentation for PowerPC. Co-authored-by: Tim Fox <timfox@outlook.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Corrects the QVM JIT vs interpreter build selection in the top-level
CMakeLists.txt. The previousELSE()branch calledtarget_compile_definitionsonqcommon/qcommon_dedbefore those targets were created (invalid CMake), and the follow-upIF(NO_VM_COMPILED)never ran becauseNO_VM_COMPILEDwas never set.Flags removed / gates simplified
NO_VM_COMPILEDgate: The dead/invalid path that tried to apply-DNO_VM_COMPILEDin the CPUELSE()beforeadd_library(qcommon …)is removed. The macro is now applied only afterqcommon/qcommon_dedexist, when no JIT backend source is selected.Why this is safe to change
vm_*.cfiles as before;NO_VM_COMPILEDstays off, matching prior intent.NO_VM_COMPILED=1instead of silently building without the define (which could mismatchvm.cexpectations vs. accidentally linked JIT objects).Behavioral parity checks
cmake -B … -S . -G Ninjaon native x86_64: configures successfully;cmake --build … --target qcommon qcommon_dedsucceeds.-DCMAKE_SYSTEM_NAME=Linux -DCMAKE_SYSTEM_PROCESSOR=riscv64:build.ninjashows-DNO_VM_COMPILED=1onqcommonsources and novm_x86.c(etc.) objects;cmake --build … --target qcommonsucceeds.Notes
r_ext_*remain user-tunable and were not removed.