Lines Matching refs:Config
512 CopyConfig Config; in parseObjcopyOptions() local
513 Config.InputFilename = Positional[0]; in parseObjcopyOptions()
514 Config.OutputFilename = Positional[Positional.size() == 1 ? 0 : 1]; in parseObjcopyOptions()
546 Config.InputFormat = StringSwitch<FileFormat>(InputFormat) in parseObjcopyOptions()
552 Config.NewSymbolVisibility = in parseObjcopyOptions()
555 Config.OutputFormat = StringSwitch<FileFormat>(OutputFormat) in parseObjcopyOptions()
559 if (Config.OutputFormat == FileFormat::Unspecified) { in parseObjcopyOptions()
561 Config.OutputFormat = Config.InputFormat; in parseObjcopyOptions()
567 Config.OutputFormat = Target->Format; in parseObjcopyOptions()
568 Config.OutputArch = Target->Machine; in parseObjcopyOptions()
574 Config.CompressionType = DebugCompressionType::Z; in parseObjcopyOptions()
577 Config.CompressionType = in parseObjcopyOptions()
583 if (Config.CompressionType == DebugCompressionType::None) in parseObjcopyOptions()
597 Config.AddGnuDebugLink = InputArgs.getLastArgValue(OBJCOPY_add_gnu_debuglink); in parseObjcopyOptions()
602 if (!Config.AddGnuDebugLink.empty()) { in parseObjcopyOptions()
603 auto DebugOrErr = MemoryBuffer::getFile(Config.AddGnuDebugLink); in parseObjcopyOptions()
605 return createFileError(Config.AddGnuDebugLink, DebugOrErr.getError()); in parseObjcopyOptions()
607 Config.GnuDebugLinkCRC32 = in parseObjcopyOptions()
610 Config.BuildIdLinkDir = InputArgs.getLastArgValue(OBJCOPY_build_id_link_dir); in parseObjcopyOptions()
612 Config.BuildIdLinkInput = in parseObjcopyOptions()
615 Config.BuildIdLinkOutput = in parseObjcopyOptions()
617 Config.SplitDWO = InputArgs.getLastArgValue(OBJCOPY_split_dwo); in parseObjcopyOptions()
618 Config.SymbolsPrefix = InputArgs.getLastArgValue(OBJCOPY_prefix_symbols); in parseObjcopyOptions()
619 Config.AllocSectionsPrefix = in parseObjcopyOptions()
622 Config.ExtractPartition = Arg->getValue(); in parseObjcopyOptions()
629 if (!Config.SymbolsToRename.insert(Old2New).second) in parseObjcopyOptions()
636 if (Error E = addSymbolsToRenameFromFile(Config.SymbolsToRename, DC.Alloc, in parseObjcopyOptions()
645 if (!Config.SectionsToRename.try_emplace(SR->OriginalName, *SR).second) in parseObjcopyOptions()
655 Config.SetSectionAlignment[NameAndAlign->first] = NameAndAlign->second; in parseObjcopyOptions()
662 if (!Config.SetSectionFlags.try_emplace(SFU->Name, *SFU).second) in parseObjcopyOptions()
670 for (const auto &E : Config.SectionsToRename) { in parseObjcopyOptions()
672 if (Config.SetSectionFlags.count(SR.OriginalName)) in parseObjcopyOptions()
678 if (Config.SetSectionFlags.count(SR.NewName)) in parseObjcopyOptions()
687 if (Error E = Config.ToRemove.addMatcher(NameOrPattern::create( in parseObjcopyOptions()
691 if (Error E = Config.KeepSection.addMatcher(NameOrPattern::create( in parseObjcopyOptions()
695 if (Error E = Config.OnlySection.addMatcher(NameOrPattern::create( in parseObjcopyOptions()
707 Config.AddSection.push_back(ArgValue); in parseObjcopyOptions()
710 Config.DumpSection.push_back(Arg->getValue()); in parseObjcopyOptions()
711 Config.StripAll = InputArgs.hasArg(OBJCOPY_strip_all); in parseObjcopyOptions()
712 Config.StripAllGNU = InputArgs.hasArg(OBJCOPY_strip_all_gnu); in parseObjcopyOptions()
713 Config.StripDebug = InputArgs.hasArg(OBJCOPY_strip_debug); in parseObjcopyOptions()
714 Config.StripDWO = InputArgs.hasArg(OBJCOPY_strip_dwo); in parseObjcopyOptions()
715 Config.StripSections = InputArgs.hasArg(OBJCOPY_strip_sections); in parseObjcopyOptions()
716 Config.StripNonAlloc = InputArgs.hasArg(OBJCOPY_strip_non_alloc); in parseObjcopyOptions()
717 Config.StripUnneeded = InputArgs.hasArg(OBJCOPY_strip_unneeded); in parseObjcopyOptions()
718 Config.ExtractDWO = InputArgs.hasArg(OBJCOPY_extract_dwo); in parseObjcopyOptions()
719 Config.ExtractMainPartition = in parseObjcopyOptions()
721 Config.LocalizeHidden = InputArgs.hasArg(OBJCOPY_localize_hidden); in parseObjcopyOptions()
722 Config.Weaken = InputArgs.hasArg(OBJCOPY_weaken); in parseObjcopyOptions()
724 Config.DiscardMode = in parseObjcopyOptions()
728 Config.OnlyKeepDebug = InputArgs.hasArg(OBJCOPY_only_keep_debug); in parseObjcopyOptions()
729 Config.KeepFileSymbols = InputArgs.hasArg(OBJCOPY_keep_file_symbols); in parseObjcopyOptions()
730 Config.DecompressDebugSections = in parseObjcopyOptions()
732 if (Config.DiscardMode == DiscardType::All) { in parseObjcopyOptions()
733 Config.StripDebug = true; in parseObjcopyOptions()
734 Config.KeepFileSymbols = true; in parseObjcopyOptions()
737 if (Error E = Config.SymbolsToLocalize.addMatcher(NameOrPattern::create( in parseObjcopyOptions()
741 if (Error E = addSymbolsFromFile(Config.SymbolsToLocalize, DC.Alloc, in parseObjcopyOptions()
746 if (Error E = Config.SymbolsToKeepGlobal.addMatcher(NameOrPattern::create( in parseObjcopyOptions()
750 if (Error E = addSymbolsFromFile(Config.SymbolsToKeepGlobal, DC.Alloc, in parseObjcopyOptions()
755 if (Error E = Config.SymbolsToGlobalize.addMatcher(NameOrPattern::create( in parseObjcopyOptions()
759 if (Error E = addSymbolsFromFile(Config.SymbolsToGlobalize, DC.Alloc, in parseObjcopyOptions()
764 if (Error E = Config.SymbolsToWeaken.addMatcher(NameOrPattern::create( in parseObjcopyOptions()
768 if (Error E = addSymbolsFromFile(Config.SymbolsToWeaken, DC.Alloc, in parseObjcopyOptions()
773 if (Error E = Config.SymbolsToRemove.addMatcher(NameOrPattern::create( in parseObjcopyOptions()
777 if (Error E = addSymbolsFromFile(Config.SymbolsToRemove, DC.Alloc, in parseObjcopyOptions()
783 Config.UnneededSymbolsToRemove.addMatcher(NameOrPattern::create( in parseObjcopyOptions()
787 if (Error E = addSymbolsFromFile(Config.UnneededSymbolsToRemove, DC.Alloc, in parseObjcopyOptions()
792 if (Error E = Config.SymbolsToKeep.addMatcher(NameOrPattern::create( in parseObjcopyOptions()
797 addSymbolsFromFile(Config.SymbolsToKeep, DC.Alloc, Arg->getValue(), in parseObjcopyOptions()
801 Config.SymbolsToAdd.push_back(Arg->getValue()); in parseObjcopyOptions()
803 Config.AllowBrokenLinks = InputArgs.hasArg(OBJCOPY_allow_broken_links); in parseObjcopyOptions()
805 Config.DeterministicArchives = InputArgs.hasFlag( in parseObjcopyOptions()
809 Config.PreserveDates = InputArgs.hasArg(OBJCOPY_preserve_dates); in parseObjcopyOptions()
811 if (Config.PreserveDates && in parseObjcopyOptions()
812 (Config.OutputFilename == "-" || Config.InputFilename == "-")) in parseObjcopyOptions()
823 Config.EntryExpr = [EAddr](uint64_t) { return *EAddr; }; in parseObjcopyOptions()
830 auto Expr = Config.EntryExpr ? std::move(Config.EntryExpr) in parseObjcopyOptions()
832 Config.EntryExpr = [Expr, EIncr](uint64_t EAddr) { in parseObjcopyOptions()
837 if (Config.DecompressDebugSections && in parseObjcopyOptions()
838 Config.CompressionType != DebugCompressionType::None) { in parseObjcopyOptions()
845 if (Config.DecompressDebugSections && !zlib::isAvailable()) in parseObjcopyOptions()
850 if (Config.ExtractPartition && Config.ExtractMainPartition) in parseObjcopyOptions()
855 DC.CopyConfigs.push_back(std::move(Config)); in parseObjcopyOptions()
865 CopyConfig Config; in parseInstallNameToolOptions() local
896 Config.RPathToAdd.push_back(Arg->getValue()); in parseInstallNameToolOptions()
899 Config.RPathToPrepend.push_back(Arg->getValue()); in parseInstallNameToolOptions()
905 if (is_contained(Config.RPathToAdd, RPath)) in parseInstallNameToolOptions()
910 if (is_contained(Config.RPathToPrepend, RPath)) in parseInstallNameToolOptions()
916 Config.RPathsToRemove.insert(RPath); in parseInstallNameToolOptions()
927 Config.RPathsToUpdate, in parseInstallNameToolOptions()
931 if (It1 != Config.RPathsToUpdate.end()) in parseInstallNameToolOptions()
938 auto It2 = find_if(Config.RPathsToRemove, Match); in parseInstallNameToolOptions()
939 if (It2 != Config.RPathsToRemove.end()) in parseInstallNameToolOptions()
945 auto It3 = find_if(Config.RPathToAdd, Match); in parseInstallNameToolOptions()
946 if (It3 != Config.RPathToAdd.end()) in parseInstallNameToolOptions()
952 auto It4 = find_if(Config.RPathToPrepend, Match); in parseInstallNameToolOptions()
953 if (It4 != Config.RPathToPrepend.end()) in parseInstallNameToolOptions()
958 Config.RPathsToUpdate.insert({Old, New}); in parseInstallNameToolOptions()
962 Config.SharedLibId = Arg->getValue(); in parseInstallNameToolOptions()
963 if (Config.SharedLibId->empty()) in parseInstallNameToolOptions()
969 Config.InstallNamesToUpdate.insert({Arg->getValue(0), Arg->getValue(1)}); in parseInstallNameToolOptions()
971 Config.RemoveAllRpaths = in parseInstallNameToolOptions()
986 Config.InputFilename = Positional[0]; in parseInstallNameToolOptions()
987 Config.OutputFilename = Positional[0]; in parseInstallNameToolOptions()
989 DC.CopyConfigs.push_back(std::move(Config)); in parseInstallNameToolOptions()
996 CopyConfig Config; in parseBitcodeStripOptions() local
1030 Config.InputFilename = Positional[0]; in parseBitcodeStripOptions()
1031 Config.OutputFilename = Positional[0]; in parseBitcodeStripOptions()
1033 DC.CopyConfigs.push_back(std::move(Config)); in parseBitcodeStripOptions()
1079 CopyConfig Config; in parseStripOptions() local
1091 Config.AllowBrokenLinks = InputArgs.hasArg(STRIP_allow_broken_links); in parseStripOptions()
1092 Config.StripDebug = InputArgs.hasArg(STRIP_strip_debug); in parseStripOptions()
1095 Config.DiscardMode = in parseStripOptions()
1099 Config.StripSections = InputArgs.hasArg(STRIP_strip_sections); in parseStripOptions()
1100 Config.StripUnneeded = InputArgs.hasArg(STRIP_strip_unneeded); in parseStripOptions()
1102 Config.StripAll = Arg->getOption().getID() == STRIP_strip_all; in parseStripOptions()
1103 Config.StripAllGNU = InputArgs.hasArg(STRIP_strip_all_gnu); in parseStripOptions()
1104 Config.StripSwiftSymbols = InputArgs.hasArg(STRIP_strip_swift_symbols); in parseStripOptions()
1105 Config.OnlyKeepDebug = InputArgs.hasArg(STRIP_only_keep_debug); in parseStripOptions()
1106 Config.KeepFileSymbols = InputArgs.hasArg(STRIP_keep_file_symbols); in parseStripOptions()
1109 if (Error E = Config.KeepSection.addMatcher(NameOrPattern::create( in parseStripOptions()
1114 if (Error E = Config.ToRemove.addMatcher(NameOrPattern::create( in parseStripOptions()
1119 if (Error E = Config.SymbolsToRemove.addMatcher(NameOrPattern::create( in parseStripOptions()
1124 if (Error E = Config.SymbolsToKeep.addMatcher(NameOrPattern::create( in parseStripOptions()
1128 if (!InputArgs.hasArg(STRIP_no_strip_all) && !Config.StripDebug && in parseStripOptions()
1129 !Config.StripUnneeded && Config.DiscardMode == DiscardType::None && in parseStripOptions()
1130 !Config.StripAllGNU && Config.SymbolsToRemove.empty()) in parseStripOptions()
1131 Config.StripAll = true; in parseStripOptions()
1133 if (Config.DiscardMode == DiscardType::All) { in parseStripOptions()
1134 Config.StripDebug = true; in parseStripOptions()
1135 Config.KeepFileSymbols = true; in parseStripOptions()
1138 Config.DeterministicArchives = in parseStripOptions()
1142 Config.PreserveDates = InputArgs.hasArg(STRIP_preserve_dates); in parseStripOptions()
1143 Config.InputFormat = FileFormat::Unspecified; in parseStripOptions()
1144 Config.OutputFormat = FileFormat::Unspecified; in parseStripOptions()
1148 Config.InputFilename = Positional[0]; in parseStripOptions()
1149 Config.OutputFilename = in parseStripOptions()
1151 DC.CopyConfigs.push_back(std::move(Config)); in parseStripOptions()
1165 Config.InputFilename = Filename; in parseStripOptions()
1166 Config.OutputFilename = Filename; in parseStripOptions()
1167 DC.CopyConfigs.push_back(Config); in parseStripOptions()
1171 if (Config.PreserveDates && (is_contained(Positional, "-") || in parseStripOptions()