-
Notifications
You must be signed in to change notification settings - Fork 20
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
Get dune build working on Windows #92
base: master
Are you sure you want to change the base?
Conversation
- `CAPNP_INCLUDE` environment variable can be set if the build machine does not have a standard location to store `capnp/*.capnp` schema file (ex. `/usr/include` on Unix) - Windows compiler flags and commands are detected and used in benchmarks
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'm a bit confused about why CAPNP_INCLUDE
is needed. If we can find the capnp
binary OK on Windows, can't that can find the includes relative to itself?
@@ -2,44 +2,64 @@ | |||
(name main) | |||
(enabled_if (= %{architecture} amd64)) | |||
(libraries capnp capnp_unix fast_rand base) | |||
(ocamlopt_flags :standard -O3 -inline 2000)) |
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.
We could just get rid of this. It was for flambda, but it's probably out of date by now anyway.
(rule | ||
(enabled_if (= %{os_type} "Win32")) | ||
(target ln.lines) | ||
(action (with-stdout-to %{target} (echo "cmd\n/c\ncopy")))) | ||
|
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.
It might be easier to have main.ml just take the benchmark name as the first argument instead of using the program name. I'm not sure why it's using hard-links at the moment.
EDIT: Here is the |
Yes, it seems reasonable to get this in the upstream binary. Otherwise, we'll have to do this dune stuff in every project that uses capnp. |
If I were the maintainer of I'll let you ask for the upstream issue. In the meantime, we can keep this issue open. I'll update the other two minor and uncontroversial things you mentioned ( |
During capnp-ocaml development I want
dune build
to work. That compiles the whole project, including the benchmark code.dune build
makes it easy to see if I'm breaking other code, even if I can't run the benchmarks (yet) on Windows.Two changes:
CAPNP_INCLUDE
environment variable can be set if the build machine does not have a standard location to storecapnp/*.capnp
schema file (ex./usr/include
on Unix)I also added in manual compile instructions for Windows.
The python benchmark tool was not modified. Running the benchmark on Unix is fine for now.