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

-o compilation flag #8118

Closed
vicuna opened this issue Apr 23, 2003 · 2 comments
Closed

-o compilation flag #8118

vicuna opened this issue Apr 23, 2003 · 2 comments

Comments

@vicuna
Copy link

vicuna commented Apr 23, 2003

Original bug ID: 1652
Reporter: administrator
Status: closed
Resolution: fixed
Priority: normal
Severity: feature
Category: ~DO NOT USE (was: OCaml general)

Bug description

Full_Name: Ohad Rodeh
Version: 3.06
OS: WinXP/Linux
Submission from: 80.178.100.217.forward.012.net.il (80.178.100.217)

This is a bug report filed as (I think 1539), and signed off as "working fine
locally". I'll simplify the problem a little bit:

The problem occurs when compiling an interface file (x.ml) into a non-local
location:
ocamlc -c -o /tmp/x.cmi x.mli
The result: x.cmi is located in the local directory, not in /tmp.

@vicuna
Copy link
Author

vicuna commented Apr 24, 2003

Comment author: administrator

This is a bug report filed as (I think 1539), and signed off as
"working fine locally". I'll simplify the problem a little bit:

The problem occurs when compiling an interface file (x.ml) into a non-local
location:
ocamlc -c -o /tmp/x.cmi x.mli
The result: x.cmi is located in the local directory, not in /tmp.

Oh, I see your point now. In the current implementation, the -o option
is ignored for compilation (ocamlc -c): it determines the name of the
output only for linking (ocamlc, ocamlc -output-obj) and library
construction (ocamlc -a, ocamlc -pack). (See the reference manual.)

So, the behavior you observe is "normal", although it doesn't do what
you want. I'll file your report as a feature wish.

One problem with honoring -o during compilation is what to do if
several source files are given on the command line.

Cheers,

  • Xavier Leroy

@vicuna
Copy link
Author

vicuna commented Jun 13, 2004

Comment author: administrator

-o is now honored in conjunction with -c. XL, 2004-04-13

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

1 participant