Skip to content

juliac: Add rudimentary Windows support #57481

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

topolarity
Copy link
Member

This was essentially working as-is, except for our reliance on a C compiler.

Not sure how we feel about having an Artifacts.toml floating around our contrib folder, but I'm not aware of an alternative other than moving juliac.jl to a subdirectory.

This was essentially working as-is, except for our reliance on a C
compiler.
@topolarity topolarity added the trimming Issues with trimming functionality or PR's relevant to its performance/functionality label Feb 20, 2025
@ViralBShah
Copy link
Member

It feels a bit odd to have Artifacts.toml in contrib. How about having it all in contrib/juliac?

@ViralBShah ViralBShah added the backport 1.12 Change should be backported to release-1.12 label Feb 20, 2025
@KristofferC KristofferC mentioned this pull request Feb 21, 2025
24 tasks
@JeffBezanson
Copy link
Member

Let's make juliac depend on PackageCompiler so we don't have to copy code from there.

@gitboy16
Copy link
Contributor

Why not move the whole juliac code to PackageCompiler?
I read somewhere that they had similar source code.

@JeffBezanson
Copy link
Member

Yeah we could do that; I think PackageCompiler.jl can be an app with juliac as its main function, and we can install it by default like an stdlib.

@gitboy16
Copy link
Contributor

gitboy16 commented Mar 2, 2025

Whether you decide to install PackageCompiler.jl by default or not is a decision for you and the development team. Just would like to bring to your attention that julia installation size has increased with each version. I will stop there as I don't want to enter in an offtopic conversation and link some interesting discussions/comments done by members of the Julia community:
https://discourse.julialang.org/t/minimal-julia-what-do-you-want-in-julia-or-not/113569
https://discourse.julialang.org/t/why-hasnt-linearalgebra-been-removed-from-the-default-sysimage/126395
And again I wanted to thank you for this amazing language and work you and your team have done!

@ViralBShah
Copy link
Member

ViralBShah commented Mar 2, 2025

juliac is just 158 lines. The discussion on what should ship within Julia is a separate discussion, that is being discussed elsewhere as you pointed out.

It may be worthwhile thought to think about the terminology, since we have many more stages of compilation than most other language ecosystems, and we call all of them compiler (or maybe disambiguate the terms in our documentation):

  1. juliac is the sort of thing that can be called like gcc from a Makefile.
  2. There's Base.Compiler, which is the actual compiler.
  3. There's what we call system images that ship with Julia.
  4. There's PackageCompiler, which actually helps build a system image (and also executables and shared libraries) - basically doing more than the name suggests.
  5. There's Pkg itself, which now has app, which to the casual user will suggest some form of compilation.
  6. There's StaticCompiler and its ecosystem.
  7. There's GPUCompiler and its ecosystem.

@gitboy16
Copy link
Contributor

GCC can be updated to v15 both in this PR and PackageCompiler. What is missing to merge this PR please?

@ViralBShah
Copy link
Member

ViralBShah commented May 14, 2025

Can this be included in 1.12?

EDIT: I See it is marked for backport to 1.12. But probably should be merged to master first, right?

@gitboy16
Copy link
Contributor

gitboy16 commented May 14, 2025

It seems to be marked for backport in 1.12 so I assume the answer is yes? Plus, if I am not mistaken, the functionality is marked as experimental so I guess it can be changed/removed at any time in the future... On windows I have manually installed a compiler (gcc) and successfully created an exe file and a shared library (not without a bit of pain), so this PR is not strictly needed but it makes life much easier...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport 1.12 Change should be backported to release-1.12 trimming Issues with trimming functionality or PR's relevant to its performance/functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants