mirror of
https://github.com/ldc-developers/ldc.git
synced 2025-04-30 23:20:40 +03:00
Use LLVM headers for shared codegen command-line options (#2148)
I.e., llvm/CodeGen/CommandFlags.h which in turn includes llvm/MC/MCTargetOptionsCommandFlags.h. This gets rid of a few duplicates on our side and includes about 35 (depending on LLVM version) new command-line options. LLVM provides a helper function to set up the TargetOptions according to (most of) these options. Newer LLVM versions may add new options and we'll automatically inherit them, including setting up the TargetOptions accordingly. I did my best (TM) to remove a few unused/undesirable options and hide all remaining new ones except for `-fp-contract`. The lists will need to be tweaked from time to time.
This commit is contained in:
parent
0546bd406b
commit
ae9d43c167
14 changed files with 261 additions and 201 deletions
|
@ -460,7 +460,7 @@ void applyTargetMachineAttributes(llvm::Function &func,
|
|||
|
||||
// Frame pointer elimination
|
||||
func.addFnAttr("no-frame-pointer-elim",
|
||||
opts::disableFpElim ? "true" : "false");
|
||||
opts::disableFPElim() ? "true" : "false");
|
||||
}
|
||||
|
||||
} // anonymous namespace
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue