150
|
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"
|
173
|
10 #include "llvm/CodeGen/CommandFlags.h"
|
150
|
11 #include "llvm/Target/TargetOptions.h"
|
252
|
12 #include "llvm/TargetParser/Triple.h"
|
|
13 #include <optional>
|
150
|
14
|
|
15 llvm::TargetOptions lld::initTargetOptionsFromCodeGenFlags() {
|
221
|
16 return llvm::codegen::InitTargetOptionsFromCodeGenFlags(llvm::Triple());
|
150
|
17 }
|
|
18
|
252
|
19 std::optional<llvm::Reloc::Model> lld::getRelocModelFromCMModel() {
|
173
|
20 return llvm::codegen::getExplicitRelocModel();
|
150
|
21 }
|
|
22
|
252
|
23 std::optional<llvm::CodeModel::Model> lld::getCodeModelFromCMModel() {
|
173
|
24 return llvm::codegen::getExplicitCodeModel();
|
150
|
25 }
|
|
26
|
173
|
27 std::string lld::getCPUStr() { return llvm::codegen::getCPUStr(); }
|
150
|
28
|
173
|
29 std::vector<std::string> lld::getMAttrs() { return llvm::codegen::getMAttrs(); }
|