-
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
Open
jonahbeckford
wants to merge
1
commit into
capnproto:master
Choose a base branch
from
jonahbeckford:build-windows
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+61
−15
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,44 +2,64 @@ | |
(name main) | ||
(enabled_if (= %{architecture} amd64)) | ||
(libraries capnp capnp_unix fast_rand base) | ||
(ocamlopt_flags :standard -O3 -inline 2000)) | ||
(ocamlopt_flags :standard (:include fastRand/foreign_stubs_flags.sexp) -inline 2000)) | ||
|
||
(rule | ||
(targets carsales) | ||
(enabled_if (= %{os_type} "Unix")) | ||
(target ln.lines) | ||
(action (with-stdout-to %{target} (echo "ln")))) | ||
|
||
(rule | ||
(enabled_if (= %{os_type} "Win32")) | ||
(target ln.lines) | ||
(action (with-stdout-to %{target} (echo "cmd\n/c\ncopy")))) | ||
|
||
Comment on lines
+12
to
+16
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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. |
||
(rule | ||
(targets carsales%{ext_exe}) | ||
(enabled_if (= %{architecture} amd64)) | ||
(deps main.exe) | ||
(action | ||
(run ln main.exe %{targets}))) | ||
(run %{read-lines:ln.lines} main.exe %{targets}))) | ||
|
||
(rule | ||
(targets catrank) | ||
(targets catrank%{ext_exe}) | ||
(enabled_if (= %{architecture} amd64)) | ||
(deps main.exe) | ||
(action | ||
(run ln main.exe %{targets}))) | ||
(run %{read-lines:ln.lines} main.exe %{targets}))) | ||
|
||
(rule | ||
(targets eval) | ||
(targets eval%{ext_exe}) | ||
(enabled_if (= %{architecture} amd64)) | ||
(deps main.exe) | ||
(action | ||
(run ln main.exe %{targets}))) | ||
(run %{read-lines:ln.lines} main.exe %{targets}))) | ||
|
||
(rule | ||
(enabled_if (<> %{env:CAPNP_INCLUDE=} "")) | ||
(target capnp_compile_args.lines) | ||
(action (with-stdout-to %{target} (echo "-I\n%{env:CAPNP_INCLUDE=}\n")))) | ||
|
||
(rule | ||
(enabled_if (= %{env:CAPNP_INCLUDE=} "")) | ||
(target capnp_compile_args.lines) | ||
(action (with-stdout-to %{target} (echo "")))) | ||
|
||
(rule | ||
(targets carsales.ml carsales.mli) | ||
(action | ||
(run capnp compile -o %{bin:capnpc-ocaml} %{dep:carsales.capnp}))) | ||
(run capnp compile -o %{bin:capnpc-ocaml} %{read-lines:capnp_compile_args.lines} %{dep:carsales.capnp}))) | ||
|
||
(rule | ||
(targets catrank.ml catrank.mli) | ||
(action | ||
(run capnp compile -o %{bin:capnpc-ocaml} %{dep:catrank.capnp}))) | ||
(run capnp compile -o %{bin:capnpc-ocaml} %{read-lines:capnp_compile_args.lines} %{dep:catrank.capnp}))) | ||
|
||
(rule | ||
(targets eval.ml eval.mli) | ||
(action | ||
(run capnp compile -o %{bin:capnpc-ocaml} %{dep:eval.capnp}))) | ||
(run capnp compile -o %{bin:capnpc-ocaml} %{read-lines:capnp_compile_args.lines} %{dep:eval.capnp}))) | ||
|
||
(alias | ||
(name benchmarks) | ||
(deps carsales catrank eval)) | ||
(deps carsales%{ext_exe} catrank%{ext_exe} eval%{ext_exe})) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,19 @@ | ||
(rule | ||
(enabled_if (= %{os_type} "Unix")) | ||
(target foreign_stubs_flags.sexp) | ||
(action (with-stdout-to %{target} (echo "(-O3)")))) | ||
|
||
(rule | ||
(enabled_if (= %{os_type} "Win32")) | ||
(target foreign_stubs_flags.sexp) | ||
(action (with-stdout-to %{target} (echo "(-O2)")))) | ||
|
||
(library | ||
(enabled_if (= %{architecture} amd64)) | ||
(foreign_stubs | ||
(language c) | ||
(names fast_rand) | ||
(flags :standard -O3)) | ||
(flags :standard (:include foreign_stubs_flags.sexp))) | ||
(name fast_rand) | ||
(wrapped false) | ||
(flags :standard -w -3)) |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.