xref: /freebsd/contrib/llvm-project/lld/Common/TargetOptionsCommandFlags.cpp (revision 38a52bd3b5cac3da6f7f6eef3dd050e6aa08ebb3)
1 //===-- TargetOptionsCommandFlags.cpp ---------------------------*- C++ -*-===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 
9 #include "lld/Common/TargetOptionsCommandFlags.h"
10 #include "llvm/CodeGen/CommandFlags.h"
11 #include "llvm/Target/TargetOptions.h"
12 
13 llvm::TargetOptions lld::initTargetOptionsFromCodeGenFlags() {
14   return llvm::codegen::InitTargetOptionsFromCodeGenFlags(llvm::Triple());
15 }
16 
17 llvm::Optional<llvm::Reloc::Model> lld::getRelocModelFromCMModel() {
18   return llvm::codegen::getExplicitRelocModel();
19 }
20 
21 llvm::Optional<llvm::CodeModel::Model> lld::getCodeModelFromCMModel() {
22   return llvm::codegen::getExplicitCodeModel();
23 }
24 
25 std::string lld::getCPUStr() { return llvm::codegen::getCPUStr(); }
26 
27 std::vector<std::string> lld::getMAttrs() { return llvm::codegen::getMAttrs(); }
28