13f851704SRui Ueyama //===-- TargetOptionsCommandFlags.cpp ---------------------------*- C++ -*-===// 23f851704SRui Ueyama // 32946cd70SChandler Carruth // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 42946cd70SChandler Carruth // See https://llvm.org/LICENSE.txt for license information. 52946cd70SChandler Carruth // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 63f851704SRui Ueyama // 73f851704SRui Ueyama //===----------------------------------------------------------------------===// 83f851704SRui Ueyama // 93f851704SRui Ueyama // This file exists as a place for global variables defined in LLVM's 108d3fcb45SFangrui Song // CodeGen/CommandFlags.inc. By putting the resulting object file in 113f851704SRui Ueyama // an archive and linking with it, the definitions will automatically be 123f851704SRui Ueyama // included when needed and skipped when already present. 133f851704SRui Ueyama // 143f851704SRui Ueyama //===----------------------------------------------------------------------===// 153f851704SRui Ueyama 163f851704SRui Ueyama #include "lld/Common/TargetOptionsCommandFlags.h" 173f851704SRui Ueyama 18ad191189SDavid Blaikie #include "llvm/CodeGen/CommandFlags.inc" 193f851704SRui Ueyama #include "llvm/Target/TargetOptions.h" 203f851704SRui Ueyama 213f851704SRui Ueyama // Define an externally visible version of 22*dfbd1903SSam Clegg // initTargetOptionsFromCodeGenFlags, so that its functionality can be 238d3fcb45SFangrui Song // used without having to include llvm/CodeGen/CommandFlags.inc, which 243f851704SRui Ueyama // would lead to multiple definitions of the command line flags. 25*dfbd1903SSam Clegg llvm::TargetOptions lld::initTargetOptionsFromCodeGenFlags() { 263f851704SRui Ueyama return ::InitTargetOptionsFromCodeGenFlags(); 273f851704SRui Ueyama } 283f851704SRui Ueyama 29*dfbd1903SSam Clegg llvm::Optional<llvm::CodeModel::Model> lld::getCodeModelFromCMModel() { 303f851704SRui Ueyama return getCodeModel(); 313f851704SRui Ueyama } 323a730d85SRafael Espindola 33*dfbd1903SSam Clegg std::string lld::getCPUStr() { return ::getCPUStr(); } 34*dfbd1903SSam Clegg 35*dfbd1903SSam Clegg std::vector<std::string> lld::getMAttrs() { return ::MAttrs; } 36