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
Allow specifying additional compiler flags via [@@@ocaml.flags] #6483
Comments
Comment author: @dbuenzli I hope this is a joke. |
Comment author: @whitequark We've been discussing such a feature on IRC (in seriousness, if you need to know), and I thought it would be worth having reasons to/against weighed on the bugtracker. I can see it being useful in some cases. |
Comment author: @damiendoligez Would these take precedence over OCAMLPARAM? I can see arguments against in either case. |
Comment author: @whitequark I imagine such a feature taking precedence over any environment-based setting. |
Comment author: @damiendoligez
Given the intended use of OCAMLPARAM, that would be really bad. And indeed i'd like to know what [@@@ocaml.warning] does in this respect. |
Comment author: @whitequark I've thought more on this issue. Here is the list of flags that at all make sense to specify in the file:
Options like -compact aren't supported by ocamlc. -w is covered by [@@@ocaml.warning]. Anything else either clearly belongs to buildsystem (like -noassert, -labels, etc) or doesn't make sense to use for single files (like -rectypes, -short-paths, -labels, etc). -ppx can be solved with a ppx that reads annotations. -safe-string is probably not important enough. So I think this issue isn't worth the hassle and can be closed. |
Original bug ID: 6483
Reporter: @whitequark
Status: closed (set by @alainfrisch on 2014-07-22T16:22:31Z)
Resolution: not a bug
Priority: normal
Severity: feature
Target version: 4.02.0+dev
Category: ~DO NOT USE (was: OCaml general)
Related to: #6202
Monitored by: @Drup @hcarty
Bug description
Subject explains it all. It would be useful for cleanly setting flags like -rectypes on a per-file basis independent of buildsystem, and is also a nice companion to [@@@ocaml.warning].
The text was updated successfully, but these errors were encountered: