Path: blob/main/contrib/llvm-project/lld/Common/TargetOptionsCommandFlags.cpp
34879 views
//===-- TargetOptionsCommandFlags.cpp ---------------------------*- C++ -*-===//1//2// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.3// See https://llvm.org/LICENSE.txt for license information.4// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception5//6//===----------------------------------------------------------------------===//78#include "lld/Common/TargetOptionsCommandFlags.h"9#include "llvm/CodeGen/CommandFlags.h"10#include "llvm/Target/TargetOptions.h"11#include "llvm/TargetParser/Triple.h"12#include <optional>1314llvm::TargetOptions lld::initTargetOptionsFromCodeGenFlags() {15return llvm::codegen::InitTargetOptionsFromCodeGenFlags(llvm::Triple());16}1718std::optional<llvm::Reloc::Model> lld::getRelocModelFromCMModel() {19return llvm::codegen::getExplicitRelocModel();20}2122std::optional<llvm::CodeModel::Model> lld::getCodeModelFromCMModel() {23return llvm::codegen::getExplicitCodeModel();24}2526std::string lld::getCPUStr() { return llvm::codegen::getCPUStr(); }2728std::vector<std::string> lld::getMAttrs() { return llvm::codegen::getMAttrs(); }293031