Skip to content
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

ocamlbuild -use-ocamlfind does not work together with -ocamlc switch #6300

Closed
vicuna opened this issue Jan 20, 2014 · 1 comment
Closed

ocamlbuild -use-ocamlfind does not work together with -ocamlc switch #6300

vicuna opened this issue Jan 20, 2014 · 1 comment
Assignees
Milestone

Comments

@vicuna
Copy link

vicuna commented Jan 20, 2014

Original bug ID: 6300
Reporter: nbb
Assigned to: @gasche
Status: closed (set by @xavierleroy on 2016-12-07T10:34:31Z)
Resolution: fixed
Priority: normal
Severity: minor
OS: OS X
OS Version: 10.9
Target version: 4.02.1+dev
Fixed in version: 4.02.0+dev
Category: -for ocamlbuild use https://github.com/ocaml/ocamlbuild/issues
Monitored by: @gasche

Bug description

it appears to be impossible to specify for example ocamlcp as the bytecode compiler when also ocamlfind is used

Steps to reproduce

cat "let _ = 3" > test.ml
ocamlbuild -ocamlc ocamlcp test.byte # succeeds
ocamlbuild -use-ocamlfind -ocamlc ocamlcp test.byte

compiles silently with ocamlc instead of ocamlcp

Additional information

in the trivial test, findlib is not needed, but in the real example it was.

@vicuna
Copy link
Author

vicuna commented Aug 19, 2014

Comment author: @gasche

Fixed in 4.02@15114.

"ocamlbuild -use-ocamlfind -ocamlc FOO" now invokes "ocamlfind FOO" instead of "ocamlfind ocamlc" -- similarly for all -ocamlfoo flags that correspond to ocamlfind subcommands.

There is a subtlety in the timing of when various options are taken into accounts to set these things -- read the commit message for more details. The take-away is that if you want to set use_ocamlfind through the myocamlbuild.ml rather than through the command-line, you should do this at the Before_options dispatch time rather than later. This means that users may be able to override this setting using -no-ocamlfind (the plugin cannot override the command-line option if it's passed), but I don't think that is problematic.

@vicuna vicuna closed this as completed Dec 7, 2016
@vicuna vicuna added this to the 4.02.1 milestone Mar 14, 2019
@vicuna vicuna added the bug label Mar 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants