Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
Allow specifying additional compiler flags via [@@@ocaml.flags] #6483
Original bug ID: 6483
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].
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.