Skip to content

Add cmake support for compiler bootstrap #1615

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
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

aleksisch
Copy link
Contributor

@aleksisch aleksisch commented Apr 1, 2025

This PR introduces cmake support to conveniently bootstrap compiler in a future.
Since we're adding standalone contexts and rewrite some parts of compiler to das we need to be able to build it (das files useless without das compiler).

  1. First we need to create das compiler from available .cpp and .h files. I wasn't able to find a good way to do it in CMake without copy, so all generated files will be copied to build folder (to ignore the fact that they are generated).
  2. Build stage0 compiler from this files (target daslang-stage0)
  3. Later on we will use this compiler for transpilation of das files into cpp.
  4. Transpile all required files (daslib & standalone contexts) to cpp and build regular daslang
  5. Enjoy

In future we may want to automatically update target daslang-stage0 if files, which responsible for transpilation are changed to be always up to date (right now it's only ast_aot_cpp.cpp).

@aleksisch aleksisch changed the title Remove cpp printer Add cmake support for compiler bootstrap Apr 2, 2025
@aleksisch aleksisch force-pushed the remove-cpp-printer branch from 74e00db to bd5e22c Compare April 2, 2025 12:12
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.

1 participant