blob: d4c29d7f88b80d0c46d7c1caaa3da06f6efe65ce [file] [log] [blame]
Bob Haarmanfbc229d2017-02-02 23:53:101//===-- TargetOptionsCommandFlags.cpp ---------------------------*- C++ -*-===//
2//
Chandler Carruth2946cd72019-01-19 08:50:563// 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
Bob Haarmanfbc229d2017-02-02 23:53:106//
7//===----------------------------------------------------------------------===//
8//
9// This file exists as a place for global variables defined in LLVM's
Fangrui Song8d3fcb42018-05-22 06:12:2310// CodeGen/CommandFlags.inc. By putting the resulting object file in
Bob Haarmanfbc229d2017-02-02 23:53:1011// an archive and linking with it, the definitions will automatically be
12// included when needed and skipped when already present.
13//
14//===----------------------------------------------------------------------===//
15
Rui Ueyama3f851702017-10-02 21:00:4116#include "lld/Common/TargetOptionsCommandFlags.h"
Bob Haarmanfbc229d2017-02-02 23:53:1017
David Blaikiead191182018-04-11 18:49:4118#include "llvm/CodeGen/CommandFlags.inc"
Bob Haarmanfbc229d2017-02-02 23:53:1019#include "llvm/Target/TargetOptions.h"
20
21// Define an externally visible version of
Sam Cleggdfbd1902019-02-01 02:24:5022// initTargetOptionsFromCodeGenFlags, so that its functionality can be
Fangrui Song8d3fcb42018-05-22 06:12:2323// used without having to include llvm/CodeGen/CommandFlags.inc, which
Bob Haarmanfbc229d2017-02-02 23:53:1024// would lead to multiple definitions of the command line flags.
Sam Cleggdfbd1902019-02-01 02:24:5025llvm::TargetOptions lld::initTargetOptionsFromCodeGenFlags() {
Bob Haarmanfbc229d2017-02-02 23:53:1026 return ::InitTargetOptionsFromCodeGenFlags();
27}
Martell Malone6b43b7a2017-02-28 23:43:2628
Sam Cleggdfbd1902019-02-01 02:24:5029llvm::Optional<llvm::CodeModel::Model> lld::getCodeModelFromCMModel() {
Rafael Espindolaeaf1d562017-08-03 02:16:3330 return getCodeModel();
Martell Malone6b43b7a2017-02-28 23:43:2631}
Rafael Espindola3a730d82018-01-30 18:18:5932
Sam Cleggdfbd1902019-02-01 02:24:5033std::string lld::getCPUStr() { return ::getCPUStr(); }
34
35std::vector<std::string> lld::getMAttrs() { return ::MAttrs; }