1326947Sdim//===-- TargetOptionsCommandFlags.cpp ---------------------------*- C++ -*-===//
2326947Sdim//
3353358Sdim// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4353358Sdim// See https://llvm.org/LICENSE.txt for license information.
5353358Sdim// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6326947Sdim//
7326947Sdim//===----------------------------------------------------------------------===//
8326947Sdim//
9326947Sdim// This file exists as a place for global variables defined in LLVM's
10341825Sdim// CodeGen/CommandFlags.inc. By putting the resulting object file in
11326947Sdim// an archive and linking with it, the definitions will automatically be
12326947Sdim// included when needed and skipped when already present.
13326947Sdim//
14326947Sdim//===----------------------------------------------------------------------===//
15326947Sdim
16326947Sdim#include "lld/Common/TargetOptionsCommandFlags.h"
17326947Sdim
18341825Sdim#include "llvm/CodeGen/CommandFlags.inc"
19326947Sdim#include "llvm/Target/TargetOptions.h"
20326947Sdim
21326947Sdim// Define an externally visible version of
22353358Sdim// initTargetOptionsFromCodeGenFlags, so that its functionality can be
23341825Sdim// used without having to include llvm/CodeGen/CommandFlags.inc, which
24326947Sdim// would lead to multiple definitions of the command line flags.
25353358Sdimllvm::TargetOptions lld::initTargetOptionsFromCodeGenFlags() {
26326947Sdim  return ::InitTargetOptionsFromCodeGenFlags();
27326947Sdim}
28326947Sdim
29360784Sdimllvm::Optional<llvm::Reloc::Model> lld::getRelocModelFromCMModel() {
30360784Sdim  return getRelocModel();
31360784Sdim}
32360784Sdim
33353358Sdimllvm::Optional<llvm::CodeModel::Model> lld::getCodeModelFromCMModel() {
34326947Sdim  return getCodeModel();
35326947Sdim}
36341825Sdim
37353358Sdimstd::string lld::getCPUStr() { return ::getCPUStr(); }
38353358Sdim
39353358Sdimstd::vector<std::string> lld::getMAttrs() { return ::MAttrs; }
40