-
Notifications
You must be signed in to change notification settings - Fork 115
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
Conversation
… (sys-type: visualc)
👷 Deploy request for elastic-ritchie-8f47f9 pending review.Visit the deploys page to approve it
|
@fare want to do first pass? |
There was a problem hiding this 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.
src/build/build-bach.ss
Outdated
(visualc ".obj") | ||
(else ".o"))) | ||
|
||
(def (path->string-literal path) |
There was a problem hiding this comment.
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.
src/gerbil/compiler/driver.ss
Outdated
@@ -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)) |
There was a problem hiding this comment.
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?
Updated according to your suggestions, thanks! @fare |
There was a problem hiding this 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!
You're welcome! And part 2 is ready now :D |
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.