[llvm-dev] Disabling/Enabling subtarget's feature from clang cmdline

Nemanja Ivanovic via llvm-dev llvm-dev at lists.llvm.org
Wed Oct 6 07:34:46 PDT 2021


For anything that there isn't an associated `-m[no]-<feature>` option, you
can pass the target feature directly (similarly to how you do with -mattr).

In order to pass features directly to the back end, you can use:
-Xclang -target-feature -Xclang -<feature to turn off>
-Xclang -target-feature -Xclang +<feature to turn on>

On Wed, Oct 6, 2021 at 10:17 AM Wang, Pengfei via llvm-dev <
llvm-dev at lists.llvm.org> wrote:

> It’s usually options like “-m<feature_name>” and “-mno-<feature_name>”
>
> You can find all usable options here, e.g.:
>
> https://clang.llvm.org/docs/ClangCommandLineReference.html#x86
>
>
>
> Thanks
>
> Phoebe (Pengfei)
>
>
>
> *From:* llvm-dev <llvm-dev-bounces at lists.llvm.org> *On Behalf Of *Przemyslaw
> Ossowski via llvm-dev
> *Sent:* Wednesday, October 6, 2021 8:53 PM
> *To:* llvm-dev <llvm-dev at lists.llvm.org>
> *Subject:* [llvm-dev] Disabling/Enabling subtarget's feature from clang
> cmdline
>
>
>
> Hello,
>
> I have a set of two subtargets, each of them has a set of given features.
>
>
>
> From "llc" cmdline it is possible to enable/disable given feature on given
> subtarget by adding: -attr=+/-<feature_name>
>
>
>
> Is it possible to explicitly disable/enable a given feature from clang
> cmdline?
>
> I was trying to do it with "-mllvm -attr=feature_name", but it didn't work.
>
>
>
> Thanks,
>
> Przemek
> _______________________________________________
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
> https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20211006/6b8a1c45/attachment.html>


More information about the llvm-dev mailing list