diff options
author | shadchin <shadchin@yandex-team.ru> | 2022-02-10 16:44:30 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:44:30 +0300 |
commit | 2598ef1d0aee359b4b6d5fdd1758916d5907d04f (patch) | |
tree | 012bb94d777798f1f56ac1cec429509766d05181 /contrib/libs/llvm12/tools/dsymutil | |
parent | 6751af0b0c1b952fede40b19b71da8025b5d8bcf (diff) | |
download | ydb-2598ef1d0aee359b4b6d5fdd1758916d5907d04f.tar.gz |
Restoring authorship annotation for <shadchin@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'contrib/libs/llvm12/tools/dsymutil')
-rw-r--r-- | contrib/libs/llvm12/tools/dsymutil/BinaryHolder.cpp | 44 | ||||
-rw-r--r-- | contrib/libs/llvm12/tools/dsymutil/BinaryHolder.h | 2 | ||||
-rw-r--r-- | contrib/libs/llvm12/tools/dsymutil/DebugMap.cpp | 2 | ||||
-rw-r--r-- | contrib/libs/llvm12/tools/dsymutil/DwarfLinkerForBinary.cpp | 256 | ||||
-rw-r--r-- | contrib/libs/llvm12/tools/dsymutil/DwarfLinkerForBinary.h | 74 | ||||
-rw-r--r-- | contrib/libs/llvm12/tools/dsymutil/MachODebugMapParser.cpp | 2 | ||||
-rw-r--r-- | contrib/libs/llvm12/tools/dsymutil/MachOUtils.cpp | 126 | ||||
-rw-r--r-- | contrib/libs/llvm12/tools/dsymutil/SymbolMap.cpp | 2 | ||||
-rw-r--r-- | contrib/libs/llvm12/tools/dsymutil/dsymutil.cpp | 4 | ||||
-rw-r--r-- | contrib/libs/llvm12/tools/dsymutil/ya.make | 124 |
10 files changed, 318 insertions, 318 deletions
diff --git a/contrib/libs/llvm12/tools/dsymutil/BinaryHolder.cpp b/contrib/libs/llvm12/tools/dsymutil/BinaryHolder.cpp index f83521346c..3b2e1d462c 100644 --- a/contrib/libs/llvm12/tools/dsymutil/BinaryHolder.cpp +++ b/contrib/libs/llvm12/tools/dsymutil/BinaryHolder.cpp @@ -87,8 +87,8 @@ Error BinaryHolder::ArchiveEntry::load(IntrusiveRefCntPtr<vfs::FileSystem> VFS, } Error BinaryHolder::ObjectEntry::load(IntrusiveRefCntPtr<vfs::FileSystem> VFS, - StringRef Filename, TimestampTy Timestamp, - bool Verbose) { + StringRef Filename, TimestampTy Timestamp, + bool Verbose) { // Try to load regular binary and force it to be memory mapped. auto ErrOrBuff = (Filename == "-") ? MemoryBuffer::getSTDIN() @@ -96,18 +96,18 @@ Error BinaryHolder::ObjectEntry::load(IntrusiveRefCntPtr<vfs::FileSystem> VFS, if (auto Err = ErrOrBuff.getError()) return errorCodeToError(Err); - if (Filename != "-" && Timestamp != sys::TimePoint<>()) { - llvm::ErrorOr<vfs::Status> Stat = VFS->status(Filename); - if (!Stat) - return errorCodeToError(Stat.getError()); - if (Timestamp != std::chrono::time_point_cast<std::chrono::seconds>( - Stat->getLastModificationTime())) - WithColor::warning() << Filename - << ": timestamp mismatch between object file (" - << Stat->getLastModificationTime() - << ") and debug map (" << Timestamp << ")\n"; - } - + if (Filename != "-" && Timestamp != sys::TimePoint<>()) { + llvm::ErrorOr<vfs::Status> Stat = VFS->status(Filename); + if (!Stat) + return errorCodeToError(Stat.getError()); + if (Timestamp != std::chrono::time_point_cast<std::chrono::seconds>( + Stat->getLastModificationTime())) + WithColor::warning() << Filename + << ": timestamp mismatch between object file (" + << Stat->getLastModificationTime() + << ") and debug map (" << Timestamp << ")\n"; + } + MemBuffer = std::move(*ErrOrBuff); if (Verbose) @@ -193,14 +193,14 @@ BinaryHolder::ArchiveEntry::getObjectEntry(StringRef Filename, return ModTimeOrErr.takeError(); if (Timestamp != sys::TimePoint<>() && - Timestamp != std::chrono::time_point_cast<std::chrono::seconds>( - ModTimeOrErr.get())) { + Timestamp != std::chrono::time_point_cast<std::chrono::seconds>( + ModTimeOrErr.get())) { if (Verbose) - WithColor::warning() - << *NameOrErr - << ": timestamp mismatch between archive member (" - << ModTimeOrErr.get() << ") and debug map (" << Timestamp - << ")\n"; + WithColor::warning() + << *NameOrErr + << ": timestamp mismatch between archive member (" + << ModTimeOrErr.get() << ") and debug map (" << Timestamp + << ")\n"; continue; } @@ -264,7 +264,7 @@ BinaryHolder::getObjectEntry(StringRef Filename, TimestampTy Timestamp) { std::lock_guard<std::mutex> Lock(ObjectCacheMutex); if (!ObjectCache.count(Filename)) { ObjectEntry &OE = ObjectCache[Filename]; - auto Err = OE.load(VFS, Filename, Timestamp, Verbose); + auto Err = OE.load(VFS, Filename, Timestamp, Verbose); if (Err) { ObjectCache.erase(Filename); return std::move(Err); diff --git a/contrib/libs/llvm12/tools/dsymutil/BinaryHolder.h b/contrib/libs/llvm12/tools/dsymutil/BinaryHolder.h index 5e81fe4b93..dff33a752f 100644 --- a/contrib/libs/llvm12/tools/dsymutil/BinaryHolder.h +++ b/contrib/libs/llvm12/tools/dsymutil/BinaryHolder.h @@ -58,7 +58,7 @@ public: public: /// Load the given object binary in memory. Error load(IntrusiveRefCntPtr<vfs::FileSystem> VFS, StringRef Filename, - TimestampTy Timestamp, bool Verbose = false); + TimestampTy Timestamp, bool Verbose = false); /// Access all owned ObjectFiles. std::vector<const object::ObjectFile *> getObjects() const; diff --git a/contrib/libs/llvm12/tools/dsymutil/DebugMap.cpp b/contrib/libs/llvm12/tools/dsymutil/DebugMap.cpp index 605c1317b9..a1e4536dfd 100644 --- a/contrib/libs/llvm12/tools/dsymutil/DebugMap.cpp +++ b/contrib/libs/llvm12/tools/dsymutil/DebugMap.cpp @@ -60,7 +60,7 @@ void DebugMapObject::print(raw_ostream &OS) const { using Entry = std::pair<StringRef, SymbolMapping>; std::vector<Entry> Entries; Entries.reserve(Symbols.getNumItems()); - for (const auto &Sym : Symbols) + for (const auto &Sym : Symbols) Entries.push_back(std::make_pair(Sym.getKey(), Sym.getValue())); llvm::sort(Entries, [](const Entry &LHS, const Entry &RHS) { return LHS.first < RHS.first; diff --git a/contrib/libs/llvm12/tools/dsymutil/DwarfLinkerForBinary.cpp b/contrib/libs/llvm12/tools/dsymutil/DwarfLinkerForBinary.cpp index 29408e7c49..28aa8496ff 100644 --- a/contrib/libs/llvm12/tools/dsymutil/DwarfLinkerForBinary.cpp +++ b/contrib/libs/llvm12/tools/dsymutil/DwarfLinkerForBinary.cpp @@ -262,7 +262,7 @@ static Error emitRemarks(const LinkOptions &Options, StringRef BinaryPath, return Error::success(); } -ErrorOr<DWARFFile &> +ErrorOr<DWARFFile &> DwarfLinkerForBinary::loadObject(const DebugMapObject &Obj, const DebugMap &DebugMap, remarks::RemarkLinker &RL) { @@ -274,7 +274,7 @@ DwarfLinkerForBinary::loadObject(const DebugMapObject &Obj, AddressMapForLinking.push_back( std::make_unique<AddressManager>(*this, *ErrorOrObj, Obj)); - ObjectsForLinking.push_back(std::make_unique<DWARFFile>( + ObjectsForLinking.push_back(std::make_unique<DWARFFile>( Obj.getObjectFilename(), ContextForLinking.back().get(), AddressMapForLinking.back().get(), Obj.empty() ? Obj.getWarnings() : EmptyWarnings)); @@ -334,7 +334,7 @@ bool DwarfLinkerForBinary::link(const DebugMap &Map) { }); GeneralLinker.setObjFileLoader( [&DebugMap, &RL, this](StringRef ContainerName, - StringRef Path) -> ErrorOr<DWARFFile &> { + StringRef Path) -> ErrorOr<DWARFFile &> { auto &Obj = DebugMap.addDebugMapObject( Path, sys::TimePoint<std::chrono::seconds>(), MachO::N_OSO); @@ -412,10 +412,10 @@ bool DwarfLinkerForBinary::link(const DebugMap &Map) { Stat.getLastModificationTime()); if (ModificationTime != Obj->getTimestamp()) { // Not using the helper here as we can easily stream TimePoint<>. - WithColor::warning() - << File << ": timestamp mismatch between swift interface file (" - << sys::TimePoint<>(Obj->getTimestamp()) << ") and debug map (" - << sys::TimePoint<>(Obj->getTimestamp()) << ")\n"; + WithColor::warning() + << File << ": timestamp mismatch between swift interface file (" + << sys::TimePoint<>(Obj->getTimestamp()) << ") and debug map (" + << sys::TimePoint<>(Obj->getTimestamp()) << ")\n"; continue; } } @@ -430,7 +430,7 @@ bool DwarfLinkerForBinary::link(const DebugMap &Map) { if (auto ErrorOrObj = loadObject(*Obj, Map, RL)) GeneralLinker.addObjectFile(*ErrorOrObj); else { - ObjectsForLinking.push_back(std::make_unique<DWARFFile>( + ObjectsForLinking.push_back(std::make_unique<DWARFFile>( Obj->getObjectFilename(), nullptr, nullptr, Obj->empty() ? Obj->getWarnings() : EmptyWarnings)); GeneralLinker.addObjectFile(*ObjectsForLinking.back()); @@ -489,7 +489,7 @@ static bool isMachOPairedReloc(uint64_t RelocType, uint64_t Arch) { /// ValidRelocs array. void DwarfLinkerForBinary::AddressManager::findValidRelocsMachO( const object::SectionRef &Section, const object::MachOObjectFile &Obj, - const DebugMapObject &DMO, std::vector<ValidReloc> &ValidRelocs) { + const DebugMapObject &DMO, std::vector<ValidReloc> &ValidRelocs) { Expected<StringRef> ContentsOrErr = Section.getContents(); if (!ContentsOrErr) { consumeError(ContentsOrErr.takeError()); @@ -511,8 +511,8 @@ void DwarfLinkerForBinary::AddressManager::findValidRelocsMachO( if (isMachOPairedReloc(Obj.getAnyRelocationType(MachOReloc), Obj.getArch())) { SkipNext = true; - Linker.reportWarning("unsupported relocation in " + *Section.getName() + - " section.", + Linker.reportWarning("unsupported relocation in " + *Section.getName() + + " section.", DMO.getObjectFilename()); continue; } @@ -520,8 +520,8 @@ void DwarfLinkerForBinary::AddressManager::findValidRelocsMachO( unsigned RelocSize = 1 << Obj.getAnyRelocationLength(MachOReloc); uint64_t Offset64 = Reloc.getOffset(); if ((RelocSize != 4 && RelocSize != 8)) { - Linker.reportWarning("unsupported relocation in " + *Section.getName() + - " section.", + Linker.reportWarning("unsupported relocation in " + *Section.getName() + + " section.", DMO.getObjectFilename()); continue; } @@ -566,33 +566,33 @@ void DwarfLinkerForBinary::AddressManager::findValidRelocsMachO( /// appropriate handler depending on the object file format. bool DwarfLinkerForBinary::AddressManager::findValidRelocs( const object::SectionRef &Section, const object::ObjectFile &Obj, - const DebugMapObject &DMO, std::vector<ValidReloc> &Relocs) { + const DebugMapObject &DMO, std::vector<ValidReloc> &Relocs) { // Dispatch to the right handler depending on the file type. if (auto *MachOObj = dyn_cast<object::MachOObjectFile>(&Obj)) - findValidRelocsMachO(Section, *MachOObj, DMO, Relocs); + findValidRelocsMachO(Section, *MachOObj, DMO, Relocs); else Linker.reportWarning(Twine("unsupported object file type: ") + Obj.getFileName(), DMO.getObjectFilename()); - if (Relocs.empty()) + if (Relocs.empty()) return false; // Sort the relocations by offset. We will walk the DIEs linearly in // the file, this allows us to just keep an index in the relocation // array that we advance during our walk, rather than resorting to // some associative container. See DwarfLinkerForBinary::NextValidReloc. - llvm::sort(Relocs); + llvm::sort(Relocs); return true; } -/// Look for relocations in the debug_info and debug_addr section that match -/// entries in the debug map. These relocations will drive the Dwarf link by -/// indicating which DIEs refer to symbols present in the linked binary. +/// Look for relocations in the debug_info and debug_addr section that match +/// entries in the debug map. These relocations will drive the Dwarf link by +/// indicating which DIEs refer to symbols present in the linked binary. /// \returns whether there are any valid relocations in the debug info. -bool DwarfLinkerForBinary::AddressManager::findValidRelocsInDebugSections( +bool DwarfLinkerForBinary::AddressManager::findValidRelocsInDebugSections( const object::ObjectFile &Obj, const DebugMapObject &DMO) { // Find the debug_info section. - bool FoundValidRelocs = false; + bool FoundValidRelocs = false; for (const object::SectionRef &Section : Obj.sections()) { StringRef SectionName; if (Expected<StringRef> NameOrErr = Section.getName()) @@ -601,44 +601,44 @@ bool DwarfLinkerForBinary::AddressManager::findValidRelocsInDebugSections( consumeError(NameOrErr.takeError()); SectionName = SectionName.substr(SectionName.find_first_not_of("._")); - if (SectionName == "debug_info") - FoundValidRelocs |= - findValidRelocs(Section, Obj, DMO, ValidDebugInfoRelocs); - if (SectionName == "debug_addr") - FoundValidRelocs |= - findValidRelocs(Section, Obj, DMO, ValidDebugAddrRelocs); + if (SectionName == "debug_info") + FoundValidRelocs |= + findValidRelocs(Section, Obj, DMO, ValidDebugInfoRelocs); + if (SectionName == "debug_addr") + FoundValidRelocs |= + findValidRelocs(Section, Obj, DMO, ValidDebugAddrRelocs); } - return FoundValidRelocs; + return FoundValidRelocs; } -bool DwarfLinkerForBinary::AddressManager::hasValidDebugAddrRelocationAt( - uint64_t Offset) { - auto It = std::lower_bound(ValidDebugAddrRelocs.begin(), - ValidDebugAddrRelocs.end(), Offset); - return It != ValidDebugAddrRelocs.end(); -} - -bool DwarfLinkerForBinary::AddressManager::hasValidDebugInfoRelocationAt( +bool DwarfLinkerForBinary::AddressManager::hasValidDebugAddrRelocationAt( + uint64_t Offset) { + auto It = std::lower_bound(ValidDebugAddrRelocs.begin(), + ValidDebugAddrRelocs.end(), Offset); + return It != ValidDebugAddrRelocs.end(); +} + +bool DwarfLinkerForBinary::AddressManager::hasValidDebugInfoRelocationAt( uint64_t StartOffset, uint64_t EndOffset, CompileUnit::DIEInfo &Info) { assert(NextValidReloc == 0 || - StartOffset > ValidDebugInfoRelocs[NextValidReloc - 1].Offset); - if (NextValidReloc >= ValidDebugInfoRelocs.size()) + StartOffset > ValidDebugInfoRelocs[NextValidReloc - 1].Offset); + if (NextValidReloc >= ValidDebugInfoRelocs.size()) return false; - uint64_t RelocOffset = ValidDebugInfoRelocs[NextValidReloc].Offset; + uint64_t RelocOffset = ValidDebugInfoRelocs[NextValidReloc].Offset; // We might need to skip some relocs that we didn't consider. For // example the high_pc of a discarded DIE might contain a reloc that // is in the list because it actually corresponds to the start of a // function that is in the debug map. - while (RelocOffset < StartOffset && - NextValidReloc < ValidDebugInfoRelocs.size() - 1) - RelocOffset = ValidDebugInfoRelocs[++NextValidReloc].Offset; + while (RelocOffset < StartOffset && + NextValidReloc < ValidDebugInfoRelocs.size() - 1) + RelocOffset = ValidDebugInfoRelocs[++NextValidReloc].Offset; if (RelocOffset < StartOffset || RelocOffset >= EndOffset) return false; - const auto &ValidReloc = ValidDebugInfoRelocs[NextValidReloc++]; + const auto &ValidReloc = ValidDebugInfoRelocs[NextValidReloc++]; const auto &Mapping = ValidReloc.Mapping->getValue(); const uint64_t BinaryAddress = Mapping.BinaryAddress; const uint64_t ObjectAddress = Mapping.ObjectAddress @@ -657,71 +657,71 @@ bool DwarfLinkerForBinary::AddressManager::hasValidDebugInfoRelocationAt( return true; } -/// Get the starting and ending (exclusive) offset for the -/// attribute with index \p Idx descibed by \p Abbrev. \p Offset is -/// supposed to point to the position of the first attribute described -/// by \p Abbrev. -/// \return [StartOffset, EndOffset) as a pair. -static std::pair<uint64_t, uint64_t> -getAttributeOffsets(const DWARFAbbreviationDeclaration *Abbrev, unsigned Idx, - uint64_t Offset, const DWARFUnit &Unit) { - DataExtractor Data = Unit.getDebugInfoExtractor(); - - for (unsigned I = 0; I < Idx; ++I) - DWARFFormValue::skipValue(Abbrev->getFormByIndex(I), Data, &Offset, - Unit.getFormParams()); - - uint64_t End = Offset; - DWARFFormValue::skipValue(Abbrev->getFormByIndex(Idx), Data, &End, - Unit.getFormParams()); - - return std::make_pair(Offset, End); -} - -bool DwarfLinkerForBinary::AddressManager::hasLiveMemoryLocation( - const DWARFDie &DIE, CompileUnit::DIEInfo &MyInfo) { - const auto *Abbrev = DIE.getAbbreviationDeclarationPtr(); - - Optional<uint32_t> LocationIdx = - Abbrev->findAttributeIndex(dwarf::DW_AT_location); - if (!LocationIdx) - return false; - - uint64_t Offset = DIE.getOffset() + getULEB128Size(Abbrev->getCode()); - uint64_t LocationOffset, LocationEndOffset; - std::tie(LocationOffset, LocationEndOffset) = - getAttributeOffsets(Abbrev, *LocationIdx, Offset, *DIE.getDwarfUnit()); - - // FIXME: Support relocations debug_addr. - return hasValidDebugInfoRelocationAt(LocationOffset, LocationEndOffset, - MyInfo); -} - -bool DwarfLinkerForBinary::AddressManager::hasLiveAddressRange( - const DWARFDie &DIE, CompileUnit::DIEInfo &MyInfo) { - const auto *Abbrev = DIE.getAbbreviationDeclarationPtr(); - - Optional<uint32_t> LowPcIdx = Abbrev->findAttributeIndex(dwarf::DW_AT_low_pc); - if (!LowPcIdx) - return false; - - dwarf::Form Form = Abbrev->getFormByIndex(*LowPcIdx); - - if (Form == dwarf::DW_FORM_addr) { - uint64_t Offset = DIE.getOffset() + getULEB128Size(Abbrev->getCode()); - uint64_t LowPcOffset, LowPcEndOffset; - std::tie(LowPcOffset, LowPcEndOffset) = - getAttributeOffsets(Abbrev, *LowPcIdx, Offset, *DIE.getDwarfUnit()); - return hasValidDebugInfoRelocationAt(LowPcOffset, LowPcEndOffset, MyInfo); - } - - if (Form == dwarf::DW_FORM_addrx) { - Optional<DWARFFormValue> AddrValue = DIE.find(dwarf::DW_AT_low_pc); - return hasValidDebugAddrRelocationAt(*AddrValue->getAsAddress()); - } - - return false; -} +/// Get the starting and ending (exclusive) offset for the +/// attribute with index \p Idx descibed by \p Abbrev. \p Offset is +/// supposed to point to the position of the first attribute described +/// by \p Abbrev. +/// \return [StartOffset, EndOffset) as a pair. +static std::pair<uint64_t, uint64_t> +getAttributeOffsets(const DWARFAbbreviationDeclaration *Abbrev, unsigned Idx, + uint64_t Offset, const DWARFUnit &Unit) { + DataExtractor Data = Unit.getDebugInfoExtractor(); + + for (unsigned I = 0; I < Idx; ++I) + DWARFFormValue::skipValue(Abbrev->getFormByIndex(I), Data, &Offset, + Unit.getFormParams()); + + uint64_t End = Offset; + DWARFFormValue::skipValue(Abbrev->getFormByIndex(Idx), Data, &End, + Unit.getFormParams()); + + return std::make_pair(Offset, End); +} + +bool DwarfLinkerForBinary::AddressManager::hasLiveMemoryLocation( + const DWARFDie &DIE, CompileUnit::DIEInfo &MyInfo) { + const auto *Abbrev = DIE.getAbbreviationDeclarationPtr(); + + Optional<uint32_t> LocationIdx = + Abbrev->findAttributeIndex(dwarf::DW_AT_location); + if (!LocationIdx) + return false; + + uint64_t Offset = DIE.getOffset() + getULEB128Size(Abbrev->getCode()); + uint64_t LocationOffset, LocationEndOffset; + std::tie(LocationOffset, LocationEndOffset) = + getAttributeOffsets(Abbrev, *LocationIdx, Offset, *DIE.getDwarfUnit()); + + // FIXME: Support relocations debug_addr. + return hasValidDebugInfoRelocationAt(LocationOffset, LocationEndOffset, + MyInfo); +} + +bool DwarfLinkerForBinary::AddressManager::hasLiveAddressRange( + const DWARFDie &DIE, CompileUnit::DIEInfo &MyInfo) { + const auto *Abbrev = DIE.getAbbreviationDeclarationPtr(); + + Optional<uint32_t> LowPcIdx = Abbrev->findAttributeIndex(dwarf::DW_AT_low_pc); + if (!LowPcIdx) + return false; + + dwarf::Form Form = Abbrev->getFormByIndex(*LowPcIdx); + + if (Form == dwarf::DW_FORM_addr) { + uint64_t Offset = DIE.getOffset() + getULEB128Size(Abbrev->getCode()); + uint64_t LowPcOffset, LowPcEndOffset; + std::tie(LowPcOffset, LowPcEndOffset) = + getAttributeOffsets(Abbrev, *LowPcIdx, Offset, *DIE.getDwarfUnit()); + return hasValidDebugInfoRelocationAt(LowPcOffset, LowPcEndOffset, MyInfo); + } + + if (Form == dwarf::DW_FORM_addrx) { + Optional<DWARFFormValue> AddrValue = DIE.find(dwarf::DW_AT_low_pc); + return hasValidDebugAddrRelocationAt(*AddrValue->getAsAddress()); + } + + return false; +} /// Apply the valid relocations found by findValidRelocs() to /// the buffer \p Data, taking into account that Data is at \p BaseOffset /// in the debug_info section. @@ -734,22 +734,22 @@ bool DwarfLinkerForBinary::AddressManager::applyValidRelocs( MutableArrayRef<char> Data, uint64_t BaseOffset, bool IsLittleEndian) { assert(areRelocationsResolved()); assert((NextValidReloc == 0 || - BaseOffset > ValidDebugInfoRelocs[NextValidReloc - 1].Offset) && + BaseOffset > ValidDebugInfoRelocs[NextValidReloc - 1].Offset) && "BaseOffset should only be increasing."); - if (NextValidReloc >= ValidDebugInfoRelocs.size()) + if (NextValidReloc >= ValidDebugInfoRelocs.size()) return false; // Skip relocs that haven't been applied. - while (NextValidReloc < ValidDebugInfoRelocs.size() && - ValidDebugInfoRelocs[NextValidReloc].Offset < BaseOffset) + while (NextValidReloc < ValidDebugInfoRelocs.size() && + ValidDebugInfoRelocs[NextValidReloc].Offset < BaseOffset) ++NextValidReloc; bool Applied = false; uint64_t EndOffset = BaseOffset + Data.size(); - while (NextValidReloc < ValidDebugInfoRelocs.size() && - ValidDebugInfoRelocs[NextValidReloc].Offset >= BaseOffset && - ValidDebugInfoRelocs[NextValidReloc].Offset < EndOffset) { - const auto &ValidReloc = ValidDebugInfoRelocs[NextValidReloc++]; + while (NextValidReloc < ValidDebugInfoRelocs.size() && + ValidDebugInfoRelocs[NextValidReloc].Offset >= BaseOffset && + ValidDebugInfoRelocs[NextValidReloc].Offset < EndOffset) { + const auto &ValidReloc = ValidDebugInfoRelocs[NextValidReloc++]; assert(ValidReloc.Offset - BaseOffset < Data.size()); assert(ValidReloc.Offset - BaseOffset + ValidReloc.Size <= Data.size()); char Buf[8]; @@ -767,17 +767,17 @@ bool DwarfLinkerForBinary::AddressManager::applyValidRelocs( return Applied; } -llvm::Expected<uint64_t> -DwarfLinkerForBinary::AddressManager::relocateIndexedAddr(uint64_t Offset) { - auto It = std::lower_bound(ValidDebugAddrRelocs.begin(), - ValidDebugAddrRelocs.end(), Offset); - if (It == ValidDebugAddrRelocs.end()) - return createStringError( - std::make_error_code(std::errc::invalid_argument), - "no relocation for offset %llu in debug_addr section", Offset); - return It->Mapping->getValue().BinaryAddress + It->Addend; -} - +llvm::Expected<uint64_t> +DwarfLinkerForBinary::AddressManager::relocateIndexedAddr(uint64_t Offset) { + auto It = std::lower_bound(ValidDebugAddrRelocs.begin(), + ValidDebugAddrRelocs.end(), Offset); + if (It == ValidDebugAddrRelocs.end()) + return createStringError( + std::make_error_code(std::errc::invalid_argument), + "no relocation for offset %llu in debug_addr section", Offset); + return It->Mapping->getValue().BinaryAddress + It->Addend; +} + bool linkDwarf(raw_fd_ostream &OutFile, BinaryHolder &BinHolder, const DebugMap &DM, LinkOptions Options) { DwarfLinkerForBinary Linker(OutFile, BinHolder, std::move(Options)); diff --git a/contrib/libs/llvm12/tools/dsymutil/DwarfLinkerForBinary.h b/contrib/libs/llvm12/tools/dsymutil/DwarfLinkerForBinary.h index c6c07d689f..b17aac137f 100644 --- a/contrib/libs/llvm12/tools/dsymutil/DwarfLinkerForBinary.h +++ b/contrib/libs/llvm12/tools/dsymutil/DwarfLinkerForBinary.h @@ -70,17 +70,17 @@ private: bool operator<(const ValidReloc &RHS) const { return Offset < RHS.Offset; } - bool operator<(uint64_t RHS) const { return Offset < RHS; } + bool operator<(uint64_t RHS) const { return Offset < RHS; } }; const DwarfLinkerForBinary &Linker; /// The valid relocations for the current DebugMapObject. /// This vector is sorted by relocation offset. - /// { - std::vector<ValidReloc> ValidDebugInfoRelocs; - std::vector<ValidReloc> ValidDebugAddrRelocs; - /// } + /// { + std::vector<ValidReloc> ValidDebugInfoRelocs; + std::vector<ValidReloc> ValidDebugAddrRelocs; + /// } /// Index into ValidRelocs of the next relocation to consider. As we walk /// the DIEs in acsending file offset and as ValidRelocs is sorted by file @@ -94,7 +94,7 @@ private: AddressManager(DwarfLinkerForBinary &Linker, const object::ObjectFile &Obj, const DebugMapObject &DMO) : Linker(Linker) { - findValidRelocsInDebugSections(Obj, DMO); + findValidRelocsInDebugSections(Obj, DMO); // Iterate over the debug map entries and put all the ones that are // functions (because they have a size) into the Ranges map. This map is @@ -128,56 +128,56 @@ private: bool hasValidRelocs(bool ResetRelocsPtr = true) override { if (ResetRelocsPtr) NextValidReloc = 0; - return !ValidDebugInfoRelocs.empty() || !ValidDebugAddrRelocs.empty(); + return !ValidDebugInfoRelocs.empty() || !ValidDebugAddrRelocs.empty(); } /// \defgroup FindValidRelocations Translate debug map into a list /// of relevant relocations /// /// @{ - bool findValidRelocsInDebugSections(const object::ObjectFile &Obj, - const DebugMapObject &DMO); + bool findValidRelocsInDebugSections(const object::ObjectFile &Obj, + const DebugMapObject &DMO); bool findValidRelocs(const object::SectionRef &Section, const object::ObjectFile &Obj, - const DebugMapObject &DMO, - std::vector<ValidReloc> &ValidRelocs); + const DebugMapObject &DMO, + std::vector<ValidReloc> &ValidRelocs); void findValidRelocsMachO(const object::SectionRef &Section, const object::MachOObjectFile &Obj, - const DebugMapObject &DMO, - std::vector<ValidReloc> &ValidRelocs); + const DebugMapObject &DMO, + std::vector<ValidReloc> &ValidRelocs); /// @} - /// Checks that there is a relocation in the debug_addr section against a - /// debug map entry between \p StartOffset and \p NextOffset. - /// - /// This function must be called with offsets in strictly ascending order - /// because it never looks back at relocations it already 'went past'. - /// \returns true and sets Info.InDebugMap if it is the case. - bool hasValidDebugInfoRelocationAt(uint64_t StartOffset, uint64_t EndOffset, - CompileUnit::DIEInfo &Info); - - /// Checks that there is a relocation in the debug_addr section against a - /// debug map entry at the given offset. - bool hasValidDebugAddrRelocationAt(uint64_t Offset); - - bool hasLiveMemoryLocation(const DWARFDie &DIE, - CompileUnit::DIEInfo &Info) override; - bool hasLiveAddressRange(const DWARFDie &DIE, - CompileUnit::DIEInfo &Info) override; - + /// Checks that there is a relocation in the debug_addr section against a + /// debug map entry between \p StartOffset and \p NextOffset. + /// + /// This function must be called with offsets in strictly ascending order + /// because it never looks back at relocations it already 'went past'. + /// \returns true and sets Info.InDebugMap if it is the case. + bool hasValidDebugInfoRelocationAt(uint64_t StartOffset, uint64_t EndOffset, + CompileUnit::DIEInfo &Info); + + /// Checks that there is a relocation in the debug_addr section against a + /// debug map entry at the given offset. + bool hasValidDebugAddrRelocationAt(uint64_t Offset); + + bool hasLiveMemoryLocation(const DWARFDie &DIE, + CompileUnit::DIEInfo &Info) override; + bool hasLiveAddressRange(const DWARFDie &DIE, + CompileUnit::DIEInfo &Info) override; + bool applyValidRelocs(MutableArrayRef<char> Data, uint64_t BaseOffset, bool IsLittleEndian) override; - llvm::Expected<uint64_t> relocateIndexedAddr(uint64_t Offset) override; - + llvm::Expected<uint64_t> relocateIndexedAddr(uint64_t Offset) override; + RangesTy &getValidAddressRanges() override { return AddressRanges; } void clear() override { AddressRanges.clear(); - ValidDebugInfoRelocs.clear(); - ValidDebugAddrRelocs.clear(); + ValidDebugInfoRelocs.clear(); + ValidDebugAddrRelocs.clear(); NextValidReloc = 0; } }; @@ -191,7 +191,7 @@ private: /// Attempt to load a debug object from disk. ErrorOr<const object::ObjectFile &> loadObject(const DebugMapObject &Obj, const Triple &triple); - ErrorOr<DWARFFile &> loadObject(const DebugMapObject &Obj, + ErrorOr<DWARFFile &> loadObject(const DebugMapObject &Obj, const DebugMap &DebugMap, remarks::RemarkLinker &RL); @@ -199,7 +199,7 @@ private: BinaryHolder &BinHolder; LinkOptions Options; std::unique_ptr<DwarfStreamer> Streamer; - std::vector<std::unique_ptr<DWARFFile>> ObjectsForLinking; + std::vector<std::unique_ptr<DWARFFile>> ObjectsForLinking; std::vector<std::unique_ptr<DWARFContext>> ContextForLinking; std::vector<std::unique_ptr<AddressManager>> AddressMapForLinking; std::vector<std::string> EmptyWarnings; diff --git a/contrib/libs/llvm12/tools/dsymutil/MachODebugMapParser.cpp b/contrib/libs/llvm12/tools/dsymutil/MachODebugMapParser.cpp index 37848c561a..95b53c7aa0 100644 --- a/contrib/libs/llvm12/tools/dsymutil/MachODebugMapParser.cpp +++ b/contrib/libs/llvm12/tools/dsymutil/MachODebugMapParser.cpp @@ -564,7 +564,7 @@ void MachODebugMapParser::loadMainBinarySymbols( continue; } Section = *SectionOrErr; - if ((Section == MainBinary.section_end() || Section->isText()) && !Extern) + if ((Section == MainBinary.section_end() || Section->isText()) && !Extern) continue; uint64_t Addr = cantFail(Sym.getValue()); Expected<StringRef> NameOrErr = Sym.getName(); diff --git a/contrib/libs/llvm12/tools/dsymutil/MachOUtils.cpp b/contrib/libs/llvm12/tools/dsymutil/MachOUtils.cpp index 943af43058..84c3f450a1 100644 --- a/contrib/libs/llvm12/tools/dsymutil/MachOUtils.cpp +++ b/contrib/libs/llvm12/tools/dsymutil/MachOUtils.cpp @@ -239,36 +239,36 @@ getSection(const object::MachOObjectFile &Obj, // Transfer \a Segment from \a Obj to the output file. This calls into \a Writer // to write these load commands directly in the output file at the current // position. -// +// // The function also tries to find a hole in the address map to fit the __DWARF // segment of \a DwarfSegmentSize size. \a EndAddress is updated to point at the // highest segment address. -// +// // When the __LINKEDIT segment is transferred, its offset and size are set resp. // to \a LinkeditOffset and \a LinkeditSize. -// -// When the eh_frame section is transferred, its offset and size are set resp. -// to \a EHFrameOffset and \a EHFrameSize. +// +// When the eh_frame section is transferred, its offset and size are set resp. +// to \a EHFrameOffset and \a EHFrameSize. template <typename SegmentTy> static void transferSegmentAndSections( const object::MachOObjectFile::LoadCommandInfo &LCI, SegmentTy Segment, const object::MachOObjectFile &Obj, MachObjectWriter &Writer, - uint64_t LinkeditOffset, uint64_t LinkeditSize, uint64_t EHFrameOffset, - uint64_t EHFrameSize, uint64_t DwarfSegmentSize, uint64_t &GapForDwarf, - uint64_t &EndAddress) { + uint64_t LinkeditOffset, uint64_t LinkeditSize, uint64_t EHFrameOffset, + uint64_t EHFrameSize, uint64_t DwarfSegmentSize, uint64_t &GapForDwarf, + uint64_t &EndAddress) { if (StringRef("__DWARF") == Segment.segname) return; - if (StringRef("__TEXT") == Segment.segname && EHFrameSize > 0) { - Segment.fileoff = EHFrameOffset; - Segment.filesize = EHFrameSize; - } else if (StringRef("__LINKEDIT") == Segment.segname) { + if (StringRef("__TEXT") == Segment.segname && EHFrameSize > 0) { + Segment.fileoff = EHFrameOffset; + Segment.filesize = EHFrameSize; + } else if (StringRef("__LINKEDIT") == Segment.segname) { Segment.fileoff = LinkeditOffset; Segment.filesize = LinkeditSize; // Resize vmsize by rounding to the page size. Segment.vmsize = alignTo(LinkeditSize, 0x1000); - } else { - Segment.fileoff = Segment.filesize = 0; + } else { + Segment.fileoff = Segment.filesize = 0; } // Check if the end address of the last segment and our current @@ -289,12 +289,12 @@ static void transferSegmentAndSections( Writer.W.OS.write(reinterpret_cast<char *>(&Segment), sizeof(Segment)); for (unsigned i = 0; i < nsects; ++i) { auto Sect = getSection(Obj, Segment, LCI, i); - if (StringRef("__eh_frame") == Sect.sectname) { - Sect.offset = EHFrameOffset; - Sect.reloff = Sect.nreloc = 0; - } else { - Sect.offset = Sect.reloff = Sect.nreloc = 0; - } + if (StringRef("__eh_frame") == Sect.sectname) { + Sect.offset = EHFrameOffset; + Sect.reloff = Sect.nreloc = 0; + } else { + Sect.offset = Sect.reloff = Sect.nreloc = 0; + } if (Obj.isLittleEndian() != sys::IsLittleEndianHost) MachO::swapStruct(Sect); Writer.W.OS.write(reinterpret_cast<char *>(&Sect), sizeof(Sect)); @@ -431,27 +431,27 @@ bool generateDsymCompanion(llvm::IntrusiveRefCntPtr<llvm::vfs::FileSystem> VFS, ++NumLoadCommands; } - // If we have a valid eh_frame to copy, do it. - uint64_t EHFrameSize = 0; - StringRef EHFrameData; - for (const object::SectionRef &Section : InputBinary.sections()) { - Expected<StringRef> NameOrErr = Section.getName(); - if (!NameOrErr) { - consumeError(NameOrErr.takeError()); - continue; - } - StringRef SectionName = *NameOrErr; - SectionName = SectionName.substr(SectionName.find_first_not_of("._")); - if (SectionName == "eh_frame") { - if (Expected<StringRef> ContentsOrErr = Section.getContents()) { - EHFrameData = *ContentsOrErr; - EHFrameSize = Section.getSize(); - } else { - consumeError(ContentsOrErr.takeError()); - } - } - } - + // If we have a valid eh_frame to copy, do it. + uint64_t EHFrameSize = 0; + StringRef EHFrameData; + for (const object::SectionRef &Section : InputBinary.sections()) { + Expected<StringRef> NameOrErr = Section.getName(); + if (!NameOrErr) { + consumeError(NameOrErr.takeError()); + continue; + } + StringRef SectionName = *NameOrErr; + SectionName = SectionName.substr(SectionName.find_first_not_of("._")); + if (SectionName == "eh_frame") { + if (Expected<StringRef> ContentsOrErr = Section.getContents()) { + EHFrameData = *ContentsOrErr; + EHFrameSize = Section.getSize(); + } else { + consumeError(ContentsOrErr.takeError()); + } + } + } + unsigned HeaderSize = Is64Bit ? sizeof(MachO::mach_header_64) : sizeof(MachO::mach_header); // We will copy every segment that isn't __DWARF. @@ -531,10 +531,10 @@ bool generateDsymCompanion(llvm::IntrusiveRefCntPtr<llvm::vfs::FileSystem> VFS, Writer.writeSymtabLoadCommand(SymtabStart, NumSyms, StringStart, NewStringsSize); - uint64_t EHFrameStart = StringStart + NewStringsSize; - EHFrameStart = alignTo(EHFrameStart, 0x1000); - - uint64_t DwarfSegmentStart = EHFrameStart + EHFrameSize; + uint64_t EHFrameStart = StringStart + NewStringsSize; + EHFrameStart = alignTo(EHFrameStart, 0x1000); + + uint64_t DwarfSegmentStart = EHFrameStart + EHFrameSize; DwarfSegmentStart = alignTo(DwarfSegmentStart, 0x1000); // Write the load commands for the segments and sections we 'import' from @@ -543,15 +543,15 @@ bool generateDsymCompanion(llvm::IntrusiveRefCntPtr<llvm::vfs::FileSystem> VFS, uint64_t GapForDwarf = UINT64_MAX; for (auto &LCI : InputBinary.load_commands()) { if (LCI.C.cmd == MachO::LC_SEGMENT) - transferSegmentAndSections( - LCI, InputBinary.getSegmentLoadCommand(LCI), InputBinary, Writer, - SymtabStart, StringStart + NewStringsSize - SymtabStart, EHFrameStart, - EHFrameSize, DwarfSegmentSize, GapForDwarf, EndAddress); + transferSegmentAndSections( + LCI, InputBinary.getSegmentLoadCommand(LCI), InputBinary, Writer, + SymtabStart, StringStart + NewStringsSize - SymtabStart, EHFrameStart, + EHFrameSize, DwarfSegmentSize, GapForDwarf, EndAddress); else if (LCI.C.cmd == MachO::LC_SEGMENT_64) - transferSegmentAndSections( - LCI, InputBinary.getSegment64LoadCommand(LCI), InputBinary, Writer, - SymtabStart, StringStart + NewStringsSize - SymtabStart, EHFrameStart, - EHFrameSize, DwarfSegmentSize, GapForDwarf, EndAddress); + transferSegmentAndSections( + LCI, InputBinary.getSegment64LoadCommand(LCI), InputBinary, Writer, + SymtabStart, StringStart + NewStringsSize - SymtabStart, EHFrameStart, + EHFrameSize, DwarfSegmentSize, GapForDwarf, EndAddress); } uint64_t DwarfVMAddr = alignTo(EndAddress, 0x1000); @@ -594,17 +594,17 @@ bool generateDsymCompanion(llvm::IntrusiveRefCntPtr<llvm::vfs::FileSystem> VFS, } assert(OutFile.tell() == StringStart + NewStringsSize); - // Pad till the EH frame start. - OutFile.write_zeros(EHFrameStart - (StringStart + NewStringsSize)); - assert(OutFile.tell() == EHFrameStart); - - // Transfer eh_frame. - if (EHFrameSize > 0) - OutFile << EHFrameData; - assert(OutFile.tell() == EHFrameStart + EHFrameSize); - + // Pad till the EH frame start. + OutFile.write_zeros(EHFrameStart - (StringStart + NewStringsSize)); + assert(OutFile.tell() == EHFrameStart); + + // Transfer eh_frame. + if (EHFrameSize > 0) + OutFile << EHFrameData; + assert(OutFile.tell() == EHFrameStart + EHFrameSize); + // Pad till the Dwarf segment start. - OutFile.write_zeros(DwarfSegmentStart - (EHFrameStart + EHFrameSize)); + OutFile.write_zeros(DwarfSegmentStart - (EHFrameStart + EHFrameSize)); assert(OutFile.tell() == DwarfSegmentStart); // Emit the Dwarf sections contents. diff --git a/contrib/libs/llvm12/tools/dsymutil/SymbolMap.cpp b/contrib/libs/llvm12/tools/dsymutil/SymbolMap.cpp index 07a54795a8..0897b824a3 100644 --- a/contrib/libs/llvm12/tools/dsymutil/SymbolMap.cpp +++ b/contrib/libs/llvm12/tools/dsymutil/SymbolMap.cpp @@ -47,7 +47,7 @@ StringRef SymbolMapTranslator::operator()(StringRef Input) { return Translation; // Objective-C symbols for the MachO symbol table start with a \1. Please see - // `MangleContext::mangleObjCMethodName` in clang. + // `MangleContext::mangleObjCMethodName` in clang. if (Translation[0] == 1) return StringRef(Translation).drop_front(); diff --git a/contrib/libs/llvm12/tools/dsymutil/dsymutil.cpp b/contrib/libs/llvm12/tools/dsymutil/dsymutil.cpp index 347b2dd916..528a5d8848 100644 --- a/contrib/libs/llvm12/tools/dsymutil/dsymutil.cpp +++ b/contrib/libs/llvm12/tools/dsymutil/dsymutil.cpp @@ -17,7 +17,7 @@ #include "LinkUtils.h" #include "MachOUtils.h" #include "Reproducer.h" -#include "llvm/ADT/STLExtras.h" +#include "llvm/ADT/STLExtras.h" #include "llvm/ADT/SmallString.h" #include "llvm/ADT/SmallVector.h" #include "llvm/ADT/StringExtras.h" @@ -157,7 +157,7 @@ static Error verifyOptions(const DsymutilOptions &Options) { errc::invalid_argument); } - if (Options.LinkOpts.Update && llvm::is_contained(Options.InputFiles, "-")) { + if (Options.LinkOpts.Update && llvm::is_contained(Options.InputFiles, "-")) { // FIXME: We cannot use stdin for an update because stdin will be // consumed by the BinaryHolder during the debugmap parsing, and // then we will want to consume it again in DwarfLinker. If we diff --git a/contrib/libs/llvm12/tools/dsymutil/ya.make b/contrib/libs/llvm12/tools/dsymutil/ya.make index 8a3b747e01..a243a1c5a4 100644 --- a/contrib/libs/llvm12/tools/dsymutil/ya.make +++ b/contrib/libs/llvm12/tools/dsymutil/ya.make @@ -12,69 +12,69 @@ LICENSE(Apache-2.0 WITH LLVM-exception) LICENSE_TEXTS(.yandex_meta/licenses.list.txt) PEERDIR( - contrib/libs/llvm12 - contrib/libs/llvm12/include - contrib/libs/llvm12/lib/Analysis - contrib/libs/llvm12/lib/AsmParser - contrib/libs/llvm12/lib/BinaryFormat - contrib/libs/llvm12/lib/Bitcode/Reader - contrib/libs/llvm12/lib/Bitcode/Writer - contrib/libs/llvm12/lib/Bitstream/Reader - contrib/libs/llvm12/lib/CodeGen - contrib/libs/llvm12/lib/CodeGen/AsmPrinter - contrib/libs/llvm12/lib/CodeGen/GlobalISel - contrib/libs/llvm12/lib/CodeGen/SelectionDAG - contrib/libs/llvm12/lib/DWARFLinker - contrib/libs/llvm12/lib/DebugInfo/CodeView - contrib/libs/llvm12/lib/DebugInfo/DWARF - contrib/libs/llvm12/lib/Demangle - contrib/libs/llvm12/lib/Frontend/OpenMP - contrib/libs/llvm12/lib/IR - contrib/libs/llvm12/lib/IRReader - contrib/libs/llvm12/lib/Linker - contrib/libs/llvm12/lib/MC - contrib/libs/llvm12/lib/MC/MCDisassembler - contrib/libs/llvm12/lib/MC/MCParser - contrib/libs/llvm12/lib/Object - contrib/libs/llvm12/lib/Option - contrib/libs/llvm12/lib/ProfileData - contrib/libs/llvm12/lib/Remarks - contrib/libs/llvm12/lib/Support - contrib/libs/llvm12/lib/Target - contrib/libs/llvm12/lib/Target/AArch64 - contrib/libs/llvm12/lib/Target/AArch64/MCTargetDesc - contrib/libs/llvm12/lib/Target/AArch64/TargetInfo - contrib/libs/llvm12/lib/Target/AArch64/Utils - contrib/libs/llvm12/lib/Target/ARM - contrib/libs/llvm12/lib/Target/ARM/MCTargetDesc - contrib/libs/llvm12/lib/Target/ARM/TargetInfo - contrib/libs/llvm12/lib/Target/ARM/Utils - contrib/libs/llvm12/lib/Target/BPF - contrib/libs/llvm12/lib/Target/BPF/MCTargetDesc - contrib/libs/llvm12/lib/Target/BPF/TargetInfo - contrib/libs/llvm12/lib/Target/NVPTX - contrib/libs/llvm12/lib/Target/NVPTX/MCTargetDesc - contrib/libs/llvm12/lib/Target/NVPTX/TargetInfo - contrib/libs/llvm12/lib/Target/PowerPC - contrib/libs/llvm12/lib/Target/PowerPC/MCTargetDesc - contrib/libs/llvm12/lib/Target/PowerPC/TargetInfo - contrib/libs/llvm12/lib/Target/X86 - contrib/libs/llvm12/lib/Target/X86/MCTargetDesc - contrib/libs/llvm12/lib/Target/X86/TargetInfo - contrib/libs/llvm12/lib/TextAPI/MachO - contrib/libs/llvm12/lib/Transforms/AggressiveInstCombine - contrib/libs/llvm12/lib/Transforms/CFGuard - contrib/libs/llvm12/lib/Transforms/IPO - contrib/libs/llvm12/lib/Transforms/InstCombine - contrib/libs/llvm12/lib/Transforms/Instrumentation - contrib/libs/llvm12/lib/Transforms/Scalar - contrib/libs/llvm12/lib/Transforms/Utils - contrib/libs/llvm12/lib/Transforms/Vectorize + contrib/libs/llvm12 + contrib/libs/llvm12/include + contrib/libs/llvm12/lib/Analysis + contrib/libs/llvm12/lib/AsmParser + contrib/libs/llvm12/lib/BinaryFormat + contrib/libs/llvm12/lib/Bitcode/Reader + contrib/libs/llvm12/lib/Bitcode/Writer + contrib/libs/llvm12/lib/Bitstream/Reader + contrib/libs/llvm12/lib/CodeGen + contrib/libs/llvm12/lib/CodeGen/AsmPrinter + contrib/libs/llvm12/lib/CodeGen/GlobalISel + contrib/libs/llvm12/lib/CodeGen/SelectionDAG + contrib/libs/llvm12/lib/DWARFLinker + contrib/libs/llvm12/lib/DebugInfo/CodeView + contrib/libs/llvm12/lib/DebugInfo/DWARF + contrib/libs/llvm12/lib/Demangle + contrib/libs/llvm12/lib/Frontend/OpenMP + contrib/libs/llvm12/lib/IR + contrib/libs/llvm12/lib/IRReader + contrib/libs/llvm12/lib/Linker + contrib/libs/llvm12/lib/MC + contrib/libs/llvm12/lib/MC/MCDisassembler + contrib/libs/llvm12/lib/MC/MCParser + contrib/libs/llvm12/lib/Object + contrib/libs/llvm12/lib/Option + contrib/libs/llvm12/lib/ProfileData + contrib/libs/llvm12/lib/Remarks + contrib/libs/llvm12/lib/Support + contrib/libs/llvm12/lib/Target + contrib/libs/llvm12/lib/Target/AArch64 + contrib/libs/llvm12/lib/Target/AArch64/MCTargetDesc + contrib/libs/llvm12/lib/Target/AArch64/TargetInfo + contrib/libs/llvm12/lib/Target/AArch64/Utils + contrib/libs/llvm12/lib/Target/ARM + contrib/libs/llvm12/lib/Target/ARM/MCTargetDesc + contrib/libs/llvm12/lib/Target/ARM/TargetInfo + contrib/libs/llvm12/lib/Target/ARM/Utils + contrib/libs/llvm12/lib/Target/BPF + contrib/libs/llvm12/lib/Target/BPF/MCTargetDesc + contrib/libs/llvm12/lib/Target/BPF/TargetInfo + contrib/libs/llvm12/lib/Target/NVPTX + contrib/libs/llvm12/lib/Target/NVPTX/MCTargetDesc + contrib/libs/llvm12/lib/Target/NVPTX/TargetInfo + contrib/libs/llvm12/lib/Target/PowerPC + contrib/libs/llvm12/lib/Target/PowerPC/MCTargetDesc + contrib/libs/llvm12/lib/Target/PowerPC/TargetInfo + contrib/libs/llvm12/lib/Target/X86 + contrib/libs/llvm12/lib/Target/X86/MCTargetDesc + contrib/libs/llvm12/lib/Target/X86/TargetInfo + contrib/libs/llvm12/lib/TextAPI/MachO + contrib/libs/llvm12/lib/Transforms/AggressiveInstCombine + contrib/libs/llvm12/lib/Transforms/CFGuard + contrib/libs/llvm12/lib/Transforms/IPO + contrib/libs/llvm12/lib/Transforms/InstCombine + contrib/libs/llvm12/lib/Transforms/Instrumentation + contrib/libs/llvm12/lib/Transforms/Scalar + contrib/libs/llvm12/lib/Transforms/Utils + contrib/libs/llvm12/lib/Transforms/Vectorize ) ADDINCL( - ${ARCADIA_BUILD_ROOT}/contrib/libs/llvm12/tools/dsymutil - contrib/libs/llvm12/tools/dsymutil + ${ARCADIA_BUILD_ROOT}/contrib/libs/llvm12/tools/dsymutil + contrib/libs/llvm12/tools/dsymutil ) NO_COMPILER_WARNINGS() @@ -94,10 +94,10 @@ SRCS( ) IF (OS_DARWIN AND ARCH_AARCH64) - LDFLAGS( + LDFLAGS( -framework CoreFoundation - ) + ) ENDIF() END() |