-
Notifications
You must be signed in to change notification settings - Fork 6
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
Build with dylib #7
base: trunk
Are you sure you want to change the base?
Conversation
@@ -20,18 +20,17 @@ | |||
11.0 | |||
(progn | |||
(run ./configure) | |||
(run make libpython3.11.a)))) | |||
(copy vendor/libpython3.11.a libpython.a) |
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.
I think that it's likely easier to just create a static library here and statically link it to both the static and the dynamic binding of taglessFinal (ie the artefact of binding.c)
1de312f
to
10fac79
Compare
lib/taglessFinal/dune
Outdated
(foreign_stubs | ||
(language c) | ||
(names binding) | ||
(flags :standard -Ivendor/Include -I.)) | ||
(c_library_flags -lpython -lutil -lpthread) | ||
(foreign_archives python)) | ||
(c_library_flags -lutil -lpthread -lpython -L%{project_root}/_build/default/lib/taglessFinal/)) |
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 is hacky! I should be able to get the outputs of the rule in the context of the C build without adding the -L
command.
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.
Yeah this creates hard dependency on where the build directory is. Any chance we could get the output without hardcoding the 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.
That's what I'm looking for but don't know of a way at the moment 😢. Hopefully there's a way and someone in ocaml/dune#8335 can show me.
10fac79
to
5d64af2
Compare
fb52098
to
1e8a5d9
Compare
LGTM except for the pathing in the build. Would also be nice if this change can be recorded on top of the |
Before this pathch, one could successfully do: ``` dune exec ./bin/pyre_parse.exe ``` but ``` dune exec ./bin/pyre_parse.bc ``` would fail. Now, both work. Signed-off-by: Vasilis Themelis <vdthemelis@gmail.com>
1e8a5d9
to
9a6d84d
Compare
Thanks! I added a new entry to the I smoke tested this by adding my changes to an opam pin and running pyre's main executable and it seems to be working fine. The build is also green. |
First crack at fixing #6
See my comment here for more details: #6 (comment)
Before this patch, one could successfully do:
but
would fail.
Now, both work!