2017-02-03 07:53:10 +08:00
|
|
|
//===-- TargetOptionsCommandFlags.cpp ---------------------------*- C++ -*-===//
|
|
|
|
//
|
|
|
|
// The LLVM Linker
|
|
|
|
//
|
|
|
|
// This file is distributed under the University of Illinois Open Source
|
|
|
|
// License. See LICENSE.TXT for details.
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
//
|
|
|
|
// This file exists as a place for global variables defined in LLVM's
|
2018-05-22 14:12:23 +08:00
|
|
|
// CodeGen/CommandFlags.inc. By putting the resulting object file in
|
2017-02-03 07:53:10 +08:00
|
|
|
// an archive and linking with it, the definitions will automatically be
|
|
|
|
// included when needed and skipped when already present.
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
2017-10-03 05:00:41 +08:00
|
|
|
#include "lld/Common/TargetOptionsCommandFlags.h"
|
2017-02-03 07:53:10 +08:00
|
|
|
|
2018-04-12 02:49:41 +08:00
|
|
|
#include "llvm/CodeGen/CommandFlags.inc"
|
2017-02-03 07:53:10 +08:00
|
|
|
#include "llvm/Target/TargetOptions.h"
|
|
|
|
|
|
|
|
// Define an externally visible version of
|
|
|
|
// InitTargetOptionsFromCodeGenFlags, so that its functionality can be
|
2018-05-22 14:12:23 +08:00
|
|
|
// used without having to include llvm/CodeGen/CommandFlags.inc, which
|
2017-02-03 07:53:10 +08:00
|
|
|
// would lead to multiple definitions of the command line flags.
|
|
|
|
llvm::TargetOptions lld::InitTargetOptionsFromCodeGenFlags() {
|
|
|
|
return ::InitTargetOptionsFromCodeGenFlags();
|
|
|
|
}
|
2017-03-01 07:43:26 +08:00
|
|
|
|
2017-08-03 10:16:33 +08:00
|
|
|
llvm::Optional<llvm::CodeModel::Model> lld::GetCodeModelFromCMModel() {
|
|
|
|
return getCodeModel();
|
2017-03-01 07:43:26 +08:00
|
|
|
}
|
2018-01-31 02:18:59 +08:00
|
|
|
|
|
|
|
std::string lld::GetCPUStr() { return ::getCPUStr(); }
|
Set MAttrs in LTO mode
Summary: Without this patch, MAttrs are not set.
Patch by Yin Ma
Reviewers: espindola, MaskRay, ruiu, pcc
Reviewed By: MaskRay, pcc
Subscribers: pcc, emaste, sbc100, inglorion, arichardson, aheejin, steven_wu, llvm-commits
Differential Revision: https://reviews.llvm.org/D53446
llvm-svn: 345884
2018-11-02 04:02:49 +08:00
|
|
|
std::vector<std::string> lld::GetMAttrs() { return ::MAttrs; }
|