Displaying 2 results from an estimated 2 matches for "x86someotherfile".
2020 Jan 09
2
Adding a clang commandline option to change backend behaviour
...n the backend and declare it extern in the other
> files you want to use it in.
>
> // X86TargetMachine.cpp
> cl::opt<bool>
> MyOption("my new option", cl::init(true), cl::Hidden,
> cl::desc("Enable my new option"));
>
> // X86SomeOtherFile.cpp
> extern cl::opt<bool> MyOption;
> if (MyOption) {
> // do something
> }
>
> On Mon, Jan 6, 2020 at 1:30 PM Craig Topper via llvm-dev
> <llvm-dev at lists.llvm.org> wrote:
> >
> > CommandFlags.inc is only included by llc and opt. I think it mostly...
2020 Jan 06
2
Adding a clang commandline option to change backend behaviour
CommandFlags.inc is only included by llc and opt. I think it mostly just
sets things on TargetMachine and TargetOptions and connects them to command
line options. Clang has its own code for setting up TargetMachine and
TargetOptions.
I think a lot of configuration things these days tend to be done with
function attributes in IR. You can just query the function attribute
wherever without any need