-
Notifications
You must be signed in to change notification settings - Fork 410
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
Call the C++ compiler with -std=c++11 when using OCaml >= 5.0 #10962
Conversation
6364e33
to
fcfab82
Compare
168e33e
to
15bd9ab
Compare
Could you please add a |
15bd9ab
to
05aa56a
Compare
done |
Can you also add a test that demonstrates the change in behavior? |
@@ -3,10 +3,6 @@ | |||
|
|||
open Import | |||
|
|||
type phase = | |||
| Compile | |||
| Link |
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.
Is this refactoring essential to the fix?
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 type isn't used anywhere anymore and the removal of its use is essential to the fix (get_compile_flags is the only one that need the extra argument and places where get_link_flags is called do not have any way of getting that value, plus that would be wasteful)
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.
You could have also just modified the type to be:
type phase =
| Compile of Ocaml_config.t
| Link
That would be a bit closer the old API and preserve some of the call sites.
It's not essential in this case as the refactoring is trivial, but in general I would like fixes and refactors to be as separate as possible.
8915cdc
to
dd245a5
Compare
done |
dd245a5
to
ac1a332
Compare
Are there any chance this could be merged in a patch release or something during this OCaml 5.3 alpha release cycle in the next couple of weeks? This would be really really appreciated |
Signed-off-by: Kate <[email protected]>
Signed-off-by: Rudi Grinberg <[email protected]>
Signed-off-by: Rudi Grinberg <[email protected]>
Thanks. I reverted the refactorings and also changed the check to use |
…10962) * Call the C++ compiler with -std=c++11 when using OCaml >= 5.0
…10962) * Call the C++ compiler with -std=c++11 when using OCaml >= 5.0 Signed-off-by: Etienne Marais <[email protected]>
* Call the C++ compiler with -std=c++11 when using OCaml >= 5.0 (#10962) * Call the C++ compiler with -std=c++11 when using OCaml >= 5.0 * Fix the compilation of OCaml 5 programs on Cygwin (#11009) strdup is not part of the C standard library but is part of POSIX. By default GCC and Clang both use the GNU variant of the C standard, so we are using strdup here to ensure users have access to it by default. If -std=c++11 is used instead of -std=gnu++11 this would fail to compile on non-POSIX platforms such as Cygwin. * test: backport missing test file --------- Signed-off-by: Etienne Marais <[email protected]> Signed-off-by: Kate <[email protected]> Co-authored-by: Kate <[email protected]> Co-authored-by: Kate <[email protected]>
CHANGES: ### Fixed - Call the C++ compiler with `-std=c++11` when using OCaml >= 5.0 (ocaml/dune#10962, @kit-ty-kate)
…10962) * Call the C++ compiler with -std=c++11 when using OCaml >= 5.0
Fixes #10886