2017-02-03 07:53:10 +08:00
|
|
|
//===-- TargetOptionsCommandFlags.cpp ---------------------------*- C++ -*-===//
|
|
|
|
//
|
2019-01-19 16:50:56 +08:00
|
|
|
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
|
|
|
// See https://llvm.org/LICENSE.txt for license information.
|
|
|
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
2017-02-03 07:53:10 +08:00
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
//
|
|
|
|
// 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
|
2019-02-01 10:24:50 +08:00
|
|
|
// 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.
|
2019-02-01 10:24:50 +08:00
|
|
|
llvm::TargetOptions lld::initTargetOptionsFromCodeGenFlags() {
|
2017-02-03 07:53:10 +08:00
|
|
|
return ::InitTargetOptionsFromCodeGenFlags();
|
|
|
|
}
|
2017-03-01 07:43:26 +08:00
|
|
|
|
2019-07-21 05:59:47 +08:00
|
|
|
llvm::Optional<llvm::Reloc::Model> lld::getRelocModelFromCMModel() {
|
|
|
|
return getRelocModel();
|
|
|
|
}
|
|
|
|
|
2019-02-01 10:24:50 +08:00
|
|
|
llvm::Optional<llvm::CodeModel::Model> lld::getCodeModelFromCMModel() {
|
2017-08-03 10:16:33 +08:00
|
|
|
return getCodeModel();
|
2017-03-01 07:43:26 +08:00
|
|
|
}
|
2018-01-31 02:18:59 +08:00
|
|
|
|
2019-02-01 10:24:50 +08:00
|
|
|
std::string lld::getCPUStr() { return ::getCPUStr(); }
|
|
|
|
|
|
|
|
std::vector<std::string> lld::getMAttrs() { return ::MAttrs; }
|