Skip to content

feat: aot compilation into executable #331

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 12 commits into
base: main
Choose a base branch
from

Conversation

Samy-33
Copy link
Contributor

@Samy-33 Samy-33 commented May 11, 2025

Requires clojure.core to be compiled into the project's target directory for now.

@Samy-33 Samy-33 requested a review from jeaye May 11, 2025 07:05
Copy link
Member

@jeaye jeaye left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very exciting! This is so cool to see coming together, Saket. I think it needs cleanup, but I'm cool with the overall structure of this as a first pass. I know we talked about getting something working and merged first and then building on it, so we're right on track for that.

The key thing we're missing is tests, which will need to go in test/bash/aot. We can chat this week about how that test suite works and the types of things we'll want to test for. No need to wait until Thursday, if you want to meet sooner.

@Samy-33 Samy-33 force-pushed the fix/current-module-var branch from 18292b9 to 81e9699 Compare May 18, 2025 08:59
@Samy-33 Samy-33 self-assigned this May 18, 2025
@Samy-33
Copy link
Contributor Author

Samy-33 commented May 18, 2025

All tasks done.

@Samy-33
Copy link
Contributor Author

Samy-33 commented May 19, 2025 via email

@jeaye
Copy link
Member

jeaye commented May 19, 2025

No, I'm not using CXX yet. Just using clang++ doesn't work. I found llvm::sys::Program::FindProgramByName("clang++"). I'll see if this works.

Sounds like Clang isn't searching for the binary. It expects an absolute path. Using FindProgramByName sounds like a good way to do that. If not, we can use getenv_s on PATH to look for it manually. Much better to rely on LLVM to do this for us.

@Samy-33 Samy-33 force-pushed the fix/current-module-var branch from c5b698e to c8e8fcd Compare May 31, 2025 11:33
@Samy-33 Samy-33 requested a review from jeaye May 31, 2025 12:03
@Samy-33 Samy-33 force-pushed the fix/current-module-var branch from a257b99 to 8c68640 Compare May 31, 2025 12:27
diags,
"jank_aot_compilation",
vfs);
driver.setCheckInputsExist(false);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the reasoning for this being false?

@Samy-33
Copy link
Contributor Author

Samy-33 commented Jun 10, 2025 via email

@jeaye
Copy link
Member

jeaye commented Jun 10, 2025

When do we use -DVARS vs cli args?

When you install jank on your machine, you need to be able to customize, with each invocation, if you want incremental GC or not. Defines happen at compile time. If we use a define, you can't choose, since the jank binary you install will only have the define it was compiled with.

You wouldn't use a -DJANK_MODULE_PATH, right? The module path is specific to the user's computer, their project, etc. It's not something we can know when building the jank compiler. Same with the type of GC the user wants to use.

If we want to use CLI args, this will be passed again as a parameter to jank_init. It already has 4 args as of now. Increasing number of args didn't feel like a good idea for an API fn. WDYT?

I don't get it, dude. We have opts literally right above the code that was removed. Just put the code back. 😂

image

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