mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2025-01-05 07:32:36 +00:00
[mach-o] Add support for -single_module and -multi_module
These are both obsolete options that controled how dylibs were built. llvm-svn: 216205
This commit is contained in:
parent
5b0e0e9436
commit
e484075d82
@ -517,6 +517,19 @@ bool DarwinLdDriver::parse(int argc, const char *argv[],
|
||||
ctx.addExportSymbol(symbol->getValue());
|
||||
}
|
||||
|
||||
// Handle obosolete -multi_module and -single_module
|
||||
if (llvm::opt::Arg *mod = parsedArgs->getLastArg(OPT_multi_module,
|
||||
OPT_single_module)) {
|
||||
if (mod->getOption().getID() == OPT_multi_module) {
|
||||
diagnostics << "warning: -multi_module is obsolete and being ignored\n";
|
||||
}
|
||||
else {
|
||||
if (ctx.outputMachOType() != llvm::MachO::MH_DYLIB)
|
||||
diagnostics << "-single_module only used when creating a dylib\n";
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// Handle input files
|
||||
for (auto &arg : *parsedArgs) {
|
||||
ErrorOr<StringRef> resolvedPath = StringRef();
|
||||
|
@ -140,3 +140,10 @@ def t : Flag<["-"], "t">,
|
||||
HelpText<"Print the names of the input files as ld processes them">;
|
||||
def v : Flag<["-"], "v">,
|
||||
HelpText<"Print linker information">;
|
||||
|
||||
// Obsolete options
|
||||
def grp_obsolete : OptionGroup<"obsolete">, HelpText<"OBSOLETE OPTIONS">;
|
||||
def single_module : Flag<["-"], "single_module">,
|
||||
HelpText<"Default for dylibs">, Group<grp_obsolete>;
|
||||
def multi_module : Flag<["-"], "multi_module">,
|
||||
HelpText<"Unsupported way to build dylibs">, Group<grp_obsolete>;
|
||||
|
Loading…
Reference in New Issue
Block a user