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 // This file exists as a place for global variables defined in LLVM's
|
|
10 // CodeGen/CommandFlags.inc. By putting the resulting object file in
|
|
11 // an archive and linking with it, the definitions will automatically be
|
|
12 // included when needed and skipped when already present.
|
|
13 //
|
|
14 //===----------------------------------------------------------------------===//
|
|
15
|
|
16 #include "lld/Common/TargetOptionsCommandFlags.h"
|
|
17
|
|
18 #include "llvm/CodeGen/CommandFlags.inc"
|
|
19 #include "llvm/Target/TargetOptions.h"
|
|
20
|
|
21 // Define an externally visible version of
|
|
22 // initTargetOptionsFromCodeGenFlags, so that its functionality can be
|
|
23 // used without having to include llvm/CodeGen/CommandFlags.inc, which
|
|
24 // would lead to multiple definitions of the command line flags.
|
|
25 llvm::TargetOptions lld::initTargetOptionsFromCodeGenFlags() {
|
|
26 return ::InitTargetOptionsFromCodeGenFlags();
|
|
27 }
|
|
28
|
|
29 llvm::Optional<llvm::Reloc::Model> lld::getRelocModelFromCMModel() {
|
|
30 return getRelocModel();
|
|
31 }
|
|
32
|
|
33 llvm::Optional<llvm::CodeModel::Model> lld::getCodeModelFromCMModel() {
|
|
34 return getCodeModel();
|
|
35 }
|
|
36
|
|
37 std::string lld::getCPUStr() { return ::getCPUStr(); }
|
|
38
|
|
39 std::vector<std::string> lld::getMAttrs() { return ::MAttrs; }
|