Skip to content

Latest commit

 

History

History
84 lines (60 loc) · 2.46 KB

File metadata and controls

84 lines (60 loc) · 2.46 KB

Building Aburiscript

This page describes the supported dependency model for building and distributing Aburiscript.

LLVM Dependency Policy

Aburiscript depends on LLVM for IR construction, optimization, and final code emission. For public source builds, LLVM is an external dependency.

  • Supported LLVM line: 18.x
  • The repository does not vendor LLVM.
  • The build expects a standard LLVMConfig.cmake installation.
  • If you distribute prebuilt aburi binaries, bundle the exact LLVM runtime libraries you linked against or declare them as an explicit package dependency for that release.

Configure From Source

The safest way to point CMake at LLVM is through LLVM_DIR with an LLVM 18 installation:

cmake -S . -B build -DCMAKE_BUILD_TYPE=Release -DLLVM_DIR=/path/to/llvm-18/lib/cmake/llvm

You can also point CMake at the LLVM prefix instead:

cmake -S . -B build -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH=/path/to/llvm-18

Then build with:

cmake --build build

By default, this configures only the compiler targets. To include the public runtime smoke suite, enable:

-DABURI_BUILD_PUBLIC_TESTS=ON

For example:

cmake -S . -B build -DCMAKE_BUILD_TYPE=Debug -DLLVM_DIR=/path/to/llvm-18/lib/cmake/llvm -DABURI_BUILD_PUBLIC_TESTS=ON

Platform Notes

  • If you prefer deriving LLVM_DIR with llvm-config, make sure you use the LLVM 18 binary specifically. For example:
/path/to/llvm-18/bin/llvm-config --cmakedir
  • Homebrew users should prefer the versioned prefix, for example $(brew --prefix llvm@18).
  • Linux package-manager installs often place LLVMConfig.cmake under /usr/lib/llvm-18/lib/cmake/llvm or a similar versioned prefix.
  • CI jobs should pass LLVM_DIR or CMAKE_PREFIX_PATH explicitly rather than relying on a developer-local install layout.

Public Test Harness

The public repository includes a lightweight runtime smoke suite under public_tests/.

  • Enable it with -DABURI_BUILD_PUBLIC_TESTS=ON.
  • Run it with ctest -R public_tests_runtime from the build directory.
  • The harness compiles each sample with aburi, runs the result, and expects the standard success exit code 67.

Release Guidance

  • Source release: require an external LLVM 18.x installation.
  • Binary release: bundle or explicitly depend on the exact LLVM build used for that artifact.
  • Public smoke tests should remain self-contained and runnable from the public repository layout alone.