Skip to content
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

Preliminary native windows support, part 1: building bach with MSVC… #1290

Merged
merged 2 commits into from
Jan 8, 2025

Conversation

rujialiu
Copy link
Contributor

@rujialiu rujialiu commented Jan 3, 2025

This is part 1 with minimal changes. Maybe some utilities should be moved elsewhere but I don't know what's the best place, so I just keep things together for easier review.

This change will be enough to build bach, but batch scripts are not included yet.

Copy link

netlify bot commented Jan 3, 2025

👷 Deploy request for elastic-ritchie-8f47f9 pending review.

Visit the deploys page to approve it

Name Link
🔨 Latest commit 40340f8

@rujialiu
Copy link
Contributor Author

rujialiu commented Jan 3, 2025

#585

@vyzo
Copy link
Collaborator

vyzo commented Jan 3, 2025

@fare want to do first pass?

@vyzo vyzo requested a review from fare January 3, 2025 16:46
Copy link
Collaborator

@fare fare left a comment

Choose a reason for hiding this comment

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

Minor things you might want to improve, but overall LGTM.

(visualc ".obj")
(else ".o")))

(def (path->string-literal path)
Copy link
Collaborator

Choose a reason for hiding this comment

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

This function is Windows specific, so should either be in a cond-expand, or, preferably, have a name that reflects it is windows-specific. I suspect the 100% correct code is closer to escape-windows-token-within-double-quotes from uiop/launch-program.lisp: https://gitlab.common-lisp.net/asdf/asdf/-/blob/master/uiop/launch-program.lisp
I understand if you don't use the 100% correct version, but then at the very least, there should be a comment in the code that explains within which parameters the function is correct enough that we stick to.

Alternatively, object->string might work well enough.

@@ -222,23 +235,23 @@ namespace: gxc
(libgerbil-scm (map find-static-module-file libgerbil-deps))
(libgerbil-scm (fold-libgerbil-runtime-scm gerbil-staticdir libgerbil-scm))
(libgerbil-c (map (cut replace-extension <> ".c") libgerbil-scm))
(libgerbil-o (map (cut replace-extension <> ".o") libgerbil-scm))
(libgerbil-o (map (cut replace-extension <> compiler-obj-suffix) libgerbil-scm))
Copy link
Collaborator

Choose a reason for hiding this comment

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

Name this function, e.g. path-extension-to-object or replace-extension-with-object while you're at it, similarly for the other functions?

@rujialiu
Copy link
Contributor Author

rujialiu commented Jan 6, 2025

Updated according to your suggestions, thanks! @fare

Copy link
Collaborator

@vyzo vyzo left a comment

Choose a reason for hiding this comment

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

simple and reasonable, lets merge it.

Thank you!

@vyzo vyzo merged commit a3161a5 into mighty-gerbils:master Jan 8, 2025
4 checks passed
@rujialiu
Copy link
Contributor Author

rujialiu commented Jan 8, 2025

simple and reasonable, lets merge it.

Thank you!

You're welcome! And part 2 is ready now :D

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.

3 participants