[PATCH] D55150: Emit warnings from the driver for use of -mllvm or -Xclang options.
James Y Knight via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Dec 6 09:32:31 PST 2018
jyknight added a comment.
In D55150#1321046 <https://reviews.llvm.org/D55150#1321046>, @kristina wrote:
> Personally I'm against this type of warning as it's likely anyone using `-mllvm` is actually intending to adjust certain behaviors across one or more passes with a lot of switches supported by it being intentionally hidden from `<llvm_tool> --help` output requiring explicitly specifying that hidden flags be shown.
There is a cost to having people encode these flags into their build systems -- it can then cause issues if we ever change these internal flags. I do not think any Clang maintainer intends to support these as stable APIs, unlike most of the driver command-line. But, neither -Xclang nor -mllvm obviously scream out "don't use this!", and so people may then add them to their buildsystems without causing reviewers to say "Wait...really? Are you sure that's a good idea?".
That's why I think a warning is useful -- it'll discourage people from using them when they haven't properly understand the consequences, but does not prevent them from doing so, when they actually do.
> For example, I routinely use the following with SEH (excuse some of the naming, this is just a downstream fork however):
> `-mllvm -target-enable-seh=true -mllvm -force-msvc-seh=true -mllvm -wtfabi-opts=0x1EF77F`
If you already are passing that, do you see a problem with instead passing
`-mllvm -target-enable-seh=true -mllvm -force-msvc-seh=true -mllvm -wtfabi-opts=0x1EF77F -Wno-experimental-driver-option`
?
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D55150/new/
https://reviews.llvm.org/D55150
More information about the cfe-commits
mailing list