Skip to content

Use fetched Catch2 and simplify vcpkg dependencies#9

Merged
huangminghuang merged 1 commit into
masterfrom
feature/catch2-fetchcontent-fuzz-cleanup
May 15, 2026
Merged

Use fetched Catch2 and simplify vcpkg dependencies#9
huangminghuang merged 1 commit into
masterfrom
feature/catch2-fetchcontent-fuzz-cleanup

Conversation

@huangminghuang
Copy link
Copy Markdown
Contributor

@huangminghuang huangminghuang commented May 15, 2026

Summary

This removes Catch2 and LLVM from the vcpkg manifest/custom registry path. softfloat is now the only vcpkg dependency for eos-vm.

Catch2 is only used when ENABLE_TESTS=ON. The wire-sys-vm registry port explicitly configures eos-vm with tests disabled, so depending on Catch2 during vcpkg packaging was unnecessary in the first place. On top of that, eos-vm intentionally uses an old Catch2 revision, matching the original eos-vm external/Catch2 submodule commit. That old Catch2 version is not shared by the other repos in the Wire system. Maintaining an independent vcpkg Catch2 port, with a no-posix-signals configuration used only by this repo's tests, adds registry maintenance without providing reuse value.

Instead, eos-vm tests now use CMake FetchContent pinned to the historical Catch2 commit:

  • 9c741fe96073ed620ffc032afbed1f3c789d2b68

This keeps the Catch2 choice local to eos-vm tests and lets the shared Wire vcpkg registry stop carrying repo-specific Catch2 behavior.

LLVM is removed for the same reason: it is not used by the sys-vm library or packaging path. The VM JIT is hand-written machine-code emission, not LLVM. The only local LLVM-related use was the fuzz-test setup, so the fuzz CMake now checks whether the active compiler supports -fsanitize=fuzzer,address directly instead of forcing every vcpkg consumer to install a large LLVM package.

Changes

  • Remove catch2 and llvm from vcpkg.json; softfloat is now the only vcpkg dependency.
  • Trim vcpkg-configuration.json so the Wire custom registry only owns softfloat for this repo.
  • Remove global find_package(Catch2) and find_package(LLVM) from dependency setup.
  • Use FetchContent for the pinned Catch2 test dependency.
  • Keep CATCH_CONFIG_NO_POSIX_SIGNALS on test targets.
  • Update direct signal-handler tests to pass explicit allocator arguments and document the empty-memory-range behavior.
  • Update fuzz test wiring to check compiler support for -fsanitize=fuzzer,address instead of depending on a vcpkg LLVM package.
  • Fix the fuzz harness for the current sysio::vm API and add a VM watchdog so long-running wasm corpus inputs are rejected cleanly.

Validation

  • Fresh configure with ENABLE_TESTS=OFF passes; vcpkg resolves only softfloat plus helper ports.
  • Fresh configure/build with tests enabled passed for the main test targets during local validation.
  • Signal/trap smoke tests passed with the fetched Catch2 revision.
  • Fuzz support was tested with clang-18:
    • compiler probe for -fsanitize=fuzzer,address passes
    • LLVMFuzzer-wasm_fuzz_test builds
    • ctest -R wasm_libfuzzer passes with the full current corpus

Notes

No changes are required in wire-vcpkg-registry for this PR, but after this lands the custom Catch2 port there should be removable if no other repo depends on it.

@huangminghuang huangminghuang requested review from heifner and jglanz May 15, 2026 01:49
@huangminghuang huangminghuang merged commit 31ad852 into master May 15, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants