8000 Implement a better build system · Issue #78 · boltlang/Bolt · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Implement a better build system #78

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
samvv opened this issue May 4, 2025 · 0 comments
Open

Implement a better build system #78

samvv opened this issue May 4, 2025 · 0 comments
Assignees
Labels
enhancement New feature or request priority:low If possible, oher issues should be taken care of first

Comments

@samvv
Copy link
Collaborator
samvv commented May 4, 2025

Right now the Python script that builds Bolt is just an ugly file full of shortcuts and assumptions. Ideally, we can declaratively specify the build file in a build language that automatically does the caching for us.

This build language could simply be a subset of the Bolt language itself, where each expression is persistently cached on disk. That way, download, unzip and compile only happens once.

Very hypothetical example for LLVM:

let source = 
    download f"https://github.com/llvm/llvm-project/archive/refs/tags/llvmorg-{version}.tar.gz"
  |> extract ~strip_components:1

let configure
    ~version:string
    ~prefix:string
    ?(assertions = false)
    ?(targets: llvm_target[] = [ Host ])
  = cmake_generate
      (source version)
      ~defines:{
        "CMAKE_INSTALL_PREFIX" = prefix,
        "LLVM_ENABLE_ASSERTIONS" = assertions,
        "LLVM_TARGETS_TO_BUILD" = ";".join(targets),
      }

let build *args = configure *args |> cmake_build

let package *args =
  build *args ~prefix=install_dir |> cmake_install
@samvv samvv added enhancement New feature or request priority:low If possible, oher issues should be taken care of first labels May 4, 2025
@samvv samvv self-assigned this May 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request priority:low If possible, oher issues should be taken care of first
Projects
None yet
Development

No branches or pull requests

1 participant
0