mirror of
https://github.com/NaC-L/Mergen.git
synced 2026-05-12 09:40:34 +00:00
eb10474eb8
Lifter improvements: - PathSolver.ipp: enhanced path memoization, switch-target diagnostics - GEPTracker.ipp: expanded value tracking, graceful bail-out paths - Semantics_Misc.ipp: clean up CPUID handler (remove dead comments, simplify constant emission) Rewrite infrastructure: - instruction_microtests.json: add jumptable manifest entries (calc_jumptable, jumptable_basic, jumptable_dense) with semantic cases - golden_ir_hashes.json: add hashes for new jumptable samples - build_samples.cmd: support C jumptable /O2 compilation pass - oracle vectors: regenerated (oracle_vectors.json trimmed to current seed set, full-handler vectors updated with new handlers) - run_microtests.cmd / run_all_handlers.cmd: script improvements - test.py: add jumptable semantic cases to coverage Dev scripts: - configure_iced/zydis.cmd, build_iced/zydis.cmd: improved toolchain detection and MERGEN_BUILD_JOBS support Review automation: - format_comment.py, invariant_guard.py, risk_map.py, shard_pr.py: minor fixes aligned with verify_plan public API rename Docs: - REWRITE_BASELINE.md: updated coverage summary and script docs - REVIEWER_RULES.md: minor formatting
44 lines
1.4 KiB
Batchfile
44 lines
1.4 KiB
Batchfile
@echo off
|
|
setlocal
|
|
|
|
rem --- clang-cl auto-detects MSVC headers/libs; no VsDevCmd needed ---
|
|
|
|
:resolve_cargo
|
|
set "CARGO_BIN=%USERPROFILE%\.cargo\bin"
|
|
if exist "%CARGO_BIN%\cargo.exe" set "PATH=%CARGO_BIN%;%PATH%"
|
|
|
|
:resolve_cmake
|
|
set "CMAKE_BIN="
|
|
for /f "usebackq delims=" %%I in (`where cmake 2^>nul`) do (
|
|
set "CMAKE_BIN=%%I"
|
|
goto found_cmake
|
|
)
|
|
if exist "C:\Program Files\CMake\bin\cmake.exe" set "CMAKE_BIN=C:\Program Files\CMake\bin\cmake.exe"
|
|
|
|
:found_cmake
|
|
if not defined CMAKE_BIN (
|
|
echo ERROR: CMake not found in PATH
|
|
exit /b 1
|
|
)
|
|
|
|
:resolve_llvm
|
|
set "LLVM_CMAKE_DIR=%LLVM_DIR%"
|
|
if not defined LLVM_CMAKE_DIR (
|
|
if exist "%~dp0..\..\..\llvm18-install\lib\cmake\llvm\LLVMConfig.cmake" set "LLVM_CMAKE_DIR=%~dp0..\..\..\llvm18-install\lib\cmake\llvm"
|
|
)
|
|
if not defined LLVM_CMAKE_DIR (
|
|
echo ERROR: LLVM_DIR is not set and no local llvm18-install was found
|
|
exit /b 1
|
|
)
|
|
|
|
:resolve_compiler
|
|
for %%I in ("%~dp0..\.." ) do set "REPO_ROOT=%%~fI"
|
|
|
|
set "MERGEN_C_COMPILER=%CMAKE_C_COMPILER%"
|
|
if not defined MERGEN_C_COMPILER set "MERGEN_C_COMPILER=clang-cl"
|
|
set "MERGEN_CXX_COMPILER=%CMAKE_CXX_COMPILER%"
|
|
if not defined MERGEN_CXX_COMPILER set "MERGEN_CXX_COMPILER=%MERGEN_C_COMPILER%"
|
|
|
|
:configure
|
|
"%CMAKE_BIN%" -G Ninja -S "%REPO_ROOT%" -B "%REPO_ROOT%\build_iced" -DCMAKE_BUILD_TYPE=Release -DLLVM_DIR="%LLVM_CMAKE_DIR%" -DCMAKE_C_COMPILER="%MERGEN_C_COMPILER%" -DCMAKE_CXX_COMPILER="%MERGEN_CXX_COMPILER%" -DCMAKE_EXPORT_COMPILE_COMMANDS=ON
|
|
exit /b %errorlevel% |