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

-for-pack option does not work if placed after the source file on the compilation command line #5484

Closed
vicuna opened this issue Jan 19, 2012 · 1 comment
Assignees

Comments

@vicuna
Copy link

vicuna commented Jan 19, 2012

Original bug ID: 5484
Reporter: barnier
Assigned to: @lefessan
Status: closed (set by @xavierleroy on 2013-08-31T10:44:28Z)
Resolution: won't fix
Priority: normal
Severity: minor
Platform: amd64
OS: Debian Linux
OS Version: 3.1
Version: 3.12.1
Category: ~DO NOT USE (was: OCaml general)

Bug description

The -for-pack option is sensitive to the order on the compilation command line
and must be placed before the .ml source file, but AFAIK it is not mentioned
in the documentation - so I assumed it's more a bug than a feature.

Steps to reproduce

[a.ml]
type t = float

ocamlopt.opt -c a.ml -for-pack P
ocamlopt.opt -o p.cmx a.cmx -pack
File "p.cmx", line 1, characters 0-1:
Error: File a.cmx
was not compiled with the `-for-pack P' option

@vicuna
Copy link
Author

vicuna commented Jan 19, 2012

Comment author: @lefessan

That's true for all options used with "-c": when a source filename is found on the command-line, the compiler immediatly compiles it, taking into account only arguments given before it (i.e. -pp, -I, etc. are not taken into account if placed after the filename).

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