summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lld/lib/Driver/CMakeLists.txt8
-rw-r--r--lld/lib/Driver/DarwinLdDriver.cpp16
-rw-r--r--lld/lib/Driver/DarwinLdOptions.td (renamed from lld/lib/Driver/DarwinOptions.td)26
-rw-r--r--lld/lib/Driver/GnuLdDriver.cpp16
-rw-r--r--lld/lib/Driver/GnuLdOptions.td (renamed from lld/lib/Driver/LDOptions.td)14
5 files changed, 39 insertions, 41 deletions
diff --git a/lld/lib/Driver/CMakeLists.txt b/lld/lib/Driver/CMakeLists.txt
index bea845bf764..5324946c88e 100644
--- a/lld/lib/Driver/CMakeLists.txt
+++ b/lld/lib/Driver/CMakeLists.txt
@@ -1,9 +1,9 @@
-set(LLVM_TARGET_DEFINITIONS LDOptions.td)
-tablegen(LLVM LDOptions.inc -gen-opt-parser-defs)
+set(LLVM_TARGET_DEFINITIONS GnuLdOptions.td)
+tablegen(LLVM GnuLdOptions.inc -gen-opt-parser-defs)
set(LLVM_TARGET_DEFINITIONS CoreOptions.td)
tablegen(LLVM CoreOptions.inc -gen-opt-parser-defs)
-set(LLVM_TARGET_DEFINITIONS DarwinOptions.td)
-tablegen(LLVM DarwinOptions.inc -gen-opt-parser-defs)
+set(LLVM_TARGET_DEFINITIONS DarwinLdOptions.td)
+tablegen(LLVM DarwinLdOptions.inc -gen-opt-parser-defs)
set(LLVM_TARGET_DEFINITIONS WinLinkOptions.td)
tablegen(LLVM WinLinkOptions.inc -gen-opt-parser-defs)
add_public_tablegen_target(DriverOptionsTableGen)
diff --git a/lld/lib/Driver/DarwinLdDriver.cpp b/lld/lib/Driver/DarwinLdDriver.cpp
index cf2f401dd39..71e57035fef 100644
--- a/lld/lib/Driver/DarwinLdDriver.cpp
+++ b/lld/lib/Driver/DarwinLdDriver.cpp
@@ -34,29 +34,29 @@
namespace {
-// Create enum with OPT_xxx values for each option in DarwinOptions.td
+// Create enum with OPT_xxx values for each option in DarwinLdOptions.td
enum DarwinOpt {
OPT_INVALID = 0,
#define OPTION(PREFIX, NAME, ID, KIND, GROUP, ALIAS, ALIASARGS, FLAGS, PARAM, \
HELP, META) \
OPT_##ID,
-#include "DarwinOptions.inc"
+#include "DarwinLdOptions.inc"
LastOption
#undef OPTION
};
-// Create prefix string literals used in DarwinOptions.td
+// Create prefix string literals used in DarwinLdOptions.td
#define PREFIX(NAME, VALUE) const char *const NAME[] = VALUE;
-#include "DarwinOptions.inc"
+#include "DarwinLdOptions.inc"
#undef PREFIX
-// Create table mapping all options defined in DarwinOptions.td
+// Create table mapping all options defined in DarwinLdOptions.td
static const llvm::opt::OptTable::Info infoTable[] = {
#define OPTION(PREFIX, NAME, ID, KIND, GROUP, ALIAS, ALIASARGS, FLAGS, PARAM, \
HELPTEXT, METAVAR) \
{ PREFIX, NAME, HELPTEXT, METAVAR, OPT_##ID, llvm::opt::Option::KIND##Class, \
PARAM, FLAGS, OPT_##GROUP, OPT_##ALIAS, ALIASARGS },
-#include "DarwinOptions.inc"
+#include "DarwinLdOptions.inc"
#undef OPTION
};
@@ -89,7 +89,7 @@ bool DarwinLdDriver::linkMachO(int argc, const char *argv[],
bool DarwinLdDriver::parse(int argc, const char *argv[],
MachOLinkingContext &ctx, raw_ostream &diagnostics) {
- // Parse command line options using DarwinOptions.td
+ // Parse command line options using DarwinLdOptions.td
std::unique_ptr<llvm::opt::InputArgList> parsedArgs;
DarwinLdOptTable table;
unsigned missingIndex;
@@ -226,5 +226,3 @@ bool DarwinLdDriver::parse(int argc, const char *argv[],
}
} // namespace lld
-
-
diff --git a/lld/lib/Driver/DarwinOptions.td b/lld/lib/Driver/DarwinLdOptions.td
index 8141878f372..f1f8a78d97b 100644
--- a/lld/lib/Driver/DarwinOptions.td
+++ b/lld/lib/Driver/DarwinLdOptions.td
@@ -3,32 +3,32 @@ include "llvm/Option/OptParser.td"
// output kinds
def grp_kind : OptionGroup<"outs">, HelpText<"OUTPUT KIND">;
-def relocatable : Flag<["-"], "r">,
+def relocatable : Flag<["-"], "r">,
HelpText<"Create relocatable object file">, Group<grp_kind>;
-def static : Flag<["-"], "static">,
+def static : Flag<["-"], "static">,
HelpText<"Create static executable">, Group<grp_kind>;
-def dynamic : Flag<["-"], "dynamic">,
+def dynamic : Flag<["-"], "dynamic">,
HelpText<"Create dynamic executable (default)">,Group<grp_kind>;
-def dylib : Flag<["-"], "dylib">,
+def dylib : Flag<["-"], "dylib">,
HelpText<"Create dynamic library">, Group<grp_kind>;
-def bundle : Flag<["-"], "bundle">,
+def bundle : Flag<["-"], "bundle">,
HelpText<"Create dynamic bundle">, Group<grp_kind>;
-def execute : Flag<["-"], "execute">,
+def execute : Flag<["-"], "execute">,
HelpText<"Create main executable (default)">, Group<grp_kind>;
-def preload : Flag<["-"], "preload">,
+def preload : Flag<["-"], "preload">,
HelpText<"Create preload">, Group<grp_kind>;
// optimizations
def grp_opts : OptionGroup<"opts">, HelpText<"OPTIMIZATIONS">;
def dead_strip : Flag<["-"], "dead_strip">,
HelpText<"Remove unreference code and data">, Group<grp_opts>;
-def macosx_version_min : Separate<["-"], "macosx_version_min">,
+def macosx_version_min : Separate<["-"], "macosx_version_min">,
HelpText<"Minimum Mac OS X version">, Group<grp_opts>;
-def ios_version_min : Separate<["-"], "ios_version_min">,
+def ios_version_min : Separate<["-"], "ios_version_min">,
HelpText<"Minimum iOS version">, Group<grp_opts>;
-def ios_simulator_version_min : Separate<["-"], "ios_simulator_version_min">,
+def ios_simulator_version_min : Separate<["-"], "ios_simulator_version_min">,
HelpText<"Minimum iOS simulator version">, Group<grp_opts>;
-def mllvm : Separate<["-"], "mllvm">,
+def mllvm : Separate<["-"], "mllvm">,
HelpText<"Options to pass to LLVM during LTO">, Group<grp_opts>;
// main executable options
@@ -43,9 +43,9 @@ def grp_libs : OptionGroup<"libs">, HelpText<"LIBRARY OPTIONS">;
def L : Joined<["-"], "L">,
HelpText<"Add directory to library search path">, Group<grp_libs>;
def all_load : Flag<["-"], "all_load">,
- HelpText<"Forces all members of all static libraries to be loaded">,
+ HelpText<"Forces all members of all static libraries to be loaded">,
Group<grp_libs>;
-
+
// general options
def output : Separate<["-"], "o">, HelpText<"Output file path">;
diff --git a/lld/lib/Driver/GnuLdDriver.cpp b/lld/lib/Driver/GnuLdDriver.cpp
index 8244d7b62ad..3154b4ea2a1 100644
--- a/lld/lib/Driver/GnuLdDriver.cpp
+++ b/lld/lib/Driver/GnuLdDriver.cpp
@@ -36,29 +36,29 @@ using namespace lld;
namespace {
-// Create enum with OPT_xxx values for each option in LDOptions.td
-enum LDOpt {
+// Create enum with OPT_xxx values for each option in GnuLdOptions.td
+enum GnuLdOpt {
OPT_INVALID = 0,
#define OPTION(PREFIX, NAME, ID, KIND, GROUP, ALIAS, ALIASARGS, FLAGS, PARAM, \
HELP, META) \
OPT_##ID,
-#include "LDOptions.inc"
+#include "GnuLdOptions.inc"
LastOption
#undef OPTION
};
-// Create prefix string literals used in LDOptions.td
+// Create prefix string literals used in GnuLdOptions.td
#define PREFIX(NAME, VALUE) const char *const NAME[] = VALUE;
-#include "LDOptions.inc"
+#include "GnuLdOptions.inc"
#undef PREFIX
-// Create table mapping all options defined in LDOptions.td
+// Create table mapping all options defined in GnuLdOptions.td
static const llvm::opt::OptTable::Info infoTable[] = {
#define OPTION(PREFIX, NAME, ID, KIND, GROUP, ALIAS, ALIASARGS, FLAGS, PARAM, \
HELPTEXT, METAVAR) \
{ PREFIX, NAME, HELPTEXT, METAVAR, OPT_##ID, llvm::opt::Option::KIND##Class, \
PARAM, FLAGS, OPT_##GROUP, OPT_##ALIAS, ALIASARGS },
-#include "LDOptions.inc"
+#include "GnuLdOptions.inc"
#undef OPTION
};
@@ -118,7 +118,7 @@ bool GnuLdDriver::linkELF(int argc, const char *argv[],
bool GnuLdDriver::parse(int argc, const char *argv[],
std::unique_ptr<ELFLinkingContext> &context,
raw_ostream &diagnostics) {
- // Parse command line options using LDOptions.td
+ // Parse command line options using GnuLdOptions.td
std::unique_ptr<llvm::opt::InputArgList> parsedArgs;
GnuLdOptTable table;
unsigned missingIndex;
diff --git a/lld/lib/Driver/LDOptions.td b/lld/lib/Driver/GnuLdOptions.td
index d919ffb3a04..41c18391f5b 100644
--- a/lld/lib/Driver/LDOptions.td
+++ b/lld/lib/Driver/GnuLdOptions.td
@@ -1,9 +1,9 @@
include "llvm/Option/OptParser.td"
-def target : Separate<["-"], "target">,
+def target : Separate<["-"], "target">,
MetaVarName<"<triple>">,
HelpText<"Target triple to link for">;
-
+
def mllvm : Separate<["-"], "mllvm">,
HelpText<"Options to pass to LLVM">;
@@ -28,10 +28,10 @@ multiclass dashEq<string opt1, string opt2, string help> {
defm e : smDash<"e", "entry",
"Name of entry point symbol">;
-def output : Separate<["-"], "o">,
+def output : Separate<["-"], "o">,
MetaVarName<"<path>">,
HelpText<"Path to file to write output">;
-
+
def relocatable : Flag<["--"], "relocatable">;
def relocatable_r : Flag<["-"], "r">, Alias<relocatable>;
@@ -57,10 +57,10 @@ def eh_frame_hdr : Flag<["--"], "eh-frame-hdr">;
def help : Flag<["--"], "help">;
-def L : Joined<["-"], "L">,
+def L : Joined<["-"], "L">,
MetaVarName<"<dir>">,
HelpText<"Directory to search for libraries">;
-def l : Joined<["-"], "l">,
+def l : Joined<["-"], "l">,
MetaVarName<"<libName>">,
HelpText<"Root name of library to use">;
def hash_style : Joined <["--"], "hash-style=">;
@@ -121,7 +121,7 @@ def sysroot : Joined<["--"], "sysroot=">,
HelpText<"Set the system root">;
// extensions
-def emit_yaml : Flag<["-"], "emit-yaml">,
+def emit_yaml : Flag<["-"], "emit-yaml">,
HelpText<"Write YAML instead of ELF">;
def whole_archive: Flag<["--"], "whole-archive">,
HelpText<"Force load of all members in a static library">;
OpenPOWER on IntegriCloud