Changeset View
Changeset View
Standalone View
Standalone View
lld/MachO/Driver.cpp
Show First 20 Lines • Show All 1,164 Lines • ▼ Show 20 Lines | for (const Arg *arg : args.filtered(OPT_u)) { | ||||
config->explicitUndefineds.push_back(symtab->addUndefined( | config->explicitUndefineds.push_back(symtab->addUndefined( | ||||
arg->getValue(), /*file=*/nullptr, /*isWeakRef=*/false)); | arg->getValue(), /*file=*/nullptr, /*isWeakRef=*/false)); | ||||
} | } | ||||
for (const Arg *arg : args.filtered(OPT_U)) | for (const Arg *arg : args.filtered(OPT_U)) | ||||
symtab->addDynamicLookup(arg->getValue()); | symtab->addDynamicLookup(arg->getValue()); | ||||
config->mapFile = args.getLastArgValue(OPT_map); | config->mapFile = args.getLastArgValue(OPT_map); | ||||
config->optimize = args::getInteger(args, OPT_O, 1); | |||||
int3: LLD-ELF defaults this to 1; I think we should follow suit (and gate the bind opcode… | |||||
I was considering that, but when I looked at the definitions of how clang (https://clang.llvm.org/docs/CommandGuide/clang.html#cmdoption-o0) uses the -O flag, they define -O0 as no optimizations which seemed fitting since we don't do any of it right now. That said, this does deviate from the LLD-ELF conventions and I'm happy to take either approaches if you feel strongly that it should be 1. thevinster: I was considering that, but when I looked at the definitions of how clang (https://clang.llvm. | |||||
yeah I think we should follow LLD-ELF more closely than we follow clang int3: yeah I think we should follow LLD-ELF more closely than we follow clang | |||||
config->outputFile = args.getLastArgValue(OPT_o, "a.out"); | config->outputFile = args.getLastArgValue(OPT_o, "a.out"); | ||||
config->finalOutput = | config->finalOutput = | ||||
args.getLastArgValue(OPT_final_output, config->outputFile); | args.getLastArgValue(OPT_final_output, config->outputFile); | ||||
config->astPaths = args.getAllArgValues(OPT_add_ast_path); | config->astPaths = args.getAllArgValues(OPT_add_ast_path); | ||||
config->headerPad = args::getHex(args, OPT_headerpad, /*Default=*/32); | config->headerPad = args::getHex(args, OPT_headerpad, /*Default=*/32); | ||||
config->headerPadMaxInstallNames = | config->headerPadMaxInstallNames = | ||||
args.hasArg(OPT_headerpad_max_install_names); | args.hasArg(OPT_headerpad_max_install_names); | ||||
config->printDylibSearch = | config->printDylibSearch = | ||||
▲ Show 20 Lines • Show All 325 Lines • Show Last 20 Lines |
LLD-ELF defaults this to 1; I think we should follow suit (and gate the bind opcode optimization to > 1)