summaryrefslogtreecommitdiff
path: root/llvm/lib/TextAPI/TextStubV5.cpp
AgeCommit message (Collapse)Author
2025-03-18[TextAPI] Track RPaths in the order its provided via command line. (#131665)Cyndy Ishida
RPaths are basically search paths for how to load dependent libraries. The order they appear is the order the linker will search, we should preserve that order in tbd files. * Additionally add this level of detection to llvm-readtapi. resolves: rdar://145603347
2024-04-04[TextAPI] Reorder addRPath parameters (#87601)Cyndy Ishida
It matches up with other _attribute_ adding member functions and helps simplify InterfaceFile assignment for InstallAPI.
2024-01-26[TextAPI] Rename SymbolKind to EncodeKind (#79622)Cyndy Ishida
A distinction that doesn't _usually_ matter is that the MachO::SymbolKind is really a mapping of entries in TBD files not symbols. To better understand this, rename the enum so it represents an encoding mapped to TBDs as opposed to symbols alone. For example, it can be a bit confusing that "GlobalSymbol" is a enum value when all of those values can represent a GlobalSymbol.
2024-01-02[TextAPI] Use function_ref where possible, NFCI (#76732)Cyndy Ishida
2023-11-17[TextAPI] don't write out empty/zeroed out min os (#72603)Cyndy Ishida
2023-11-09[llvm][TextAPI] Add new `not_for_dyld_shared_cache` attribute to file… ↵Cyndy Ishida
(#71735) … format. Formats >= TBDv4 will now encode new attribute that the system static linker wil read when tbd files replace binary dylibs.
2023-09-14[TextAPI] Consolidate TextAPI Reader/Writer APIs. (#66108)Cyndy Ishida
Both Swift & LLD use TextAPI reader/writer apis to interface with TBD files. Add doc strings to document what each API does. Also, add shortcut APIs for validating input is a TBD file. This reduces the differences between downstream and how tapi calls into these APIs.
2023-09-02[llvm] Use range-based for loops (NFC)Kazu Hirata
2023-08-11[TextAPI] Express MH_SIM_SUPPORT in tbd files.Cyndy Ishida
This adds a new optional flag sim_support which is the same as MH_SIM_SUPPORT in the MachO header. Reviewed By: ributzka Differential Revision: https://reviews.llvm.org/D157433
2023-07-28[TextAPI] Make min-os deployment version optional in tbd-v5.Cyndy Ishida
The minOS version is recorded in tbd-v5 so the linker can report diagnostics when a library and client are misconfigured. Dylibs should always have a minOS recorded, but in was not recorded in previous TBD versions. To accommodate the format transition, treat unrecorded minOS versions as 0. Reviewed By: zixuw Differential Revision: https://reviews.llvm.org/D156487
2023-07-14Hide some implementation details so they can't cause ODR conflicts. NFC.Benjamin Kramer
2023-03-23[llvm][TextAPI] Handle implicitly upgraded deployment versionsCyndy Ishida
Sometimes the clang driver will receive a target triple where the deployment version is too low to support the platform + arch. In those cases, the compiler upgrades the final minOS which is what gets recorded ultimately by the linker in LC_BUILD_VERSION. TextAPI should also reuse this logic for capturing minOS in recorded TBDv5 files. Reviewed By: ributzka Differential Revision: https://reviews.llvm.org/D145690
2023-02-26[TextAPI] Use const auto& in foreach loop to avoid pass-by-value static ↵Simon Pilgrim
analyzer warnings. NFCI.
2023-02-22[llvm][TextAPI] Clean up minor bugs in YAML TextStubCyndy Ishida
* Always print out maccatalyst in format * Traverse symbols via InterfaceFile symbol APIs * Properly track addition of flags. Reviewed By: ributzka Differential Revision: https://reviews.llvm.org/D144428
2023-02-22Reland "[TextAPI] Implement TBDv5 Writer"Cyndy Ishida
Create writer for new JSON format. The new JSON format allows practically all attributes to be defined per target in a universal library however the internal representation only allows one for the time being. For now the write will always write those attributes as default available for all targets (install name, compatability & current version, swift abi, flags e.g. flatnamepace & app exenstion safety) rdar://102076911 Reviewed By: ributzka Differential Revision: https://reviews.llvm.org/D144339
2023-02-22Revert "[TextAPI] Implement TBDv5 Writer"Cyndy Ishida
This reverts commit 8217932aabcb271df7eb30e069fdace904299cba. Breaks buildbots.
2023-02-22[TextAPI] Implement TBDv5 WriterCyndy Ishida
Create writer for new JSON format. The new JSON format allows practically all attributes to be defined per target in a universal library however the internal representation only allows one for the time being. For now the write will always write those attributes as default available for all targets (install name, compatability & current version, swift abi, flags e.g. flatnamepace & app exenstion safety) rdar://102076911 Reviewed By: ributzka Differential Revision: https://reviews.llvm.org/D144339
2023-02-18[TextAPI] Capture new properties from TBD to InterfaceFileCyndy Ishida
* Deployment Versions for targets * Run Search Paths * Text vs Data Segment attributes to symbols Reviewed By: pete Differential Revision: https://reviews.llvm.org/D144158
2023-02-17Reland "[TextAPI] Implement TBDv5 Reader"Cyndy Ishida
Introduce initial reader for TBDv5 which is in JSON. This captures all the currently understood fields within the internal structure `InterfaceFile`. New fields will be followed up in future PRs. Reviewed By: pete Differential Revision: https://reviews.llvm.org/D144156
2023-02-17Revert "[TextAPI] Implement TBDv5 Reader"Cyndy Ishida
This reverts commit b861b1225380175a5a724e2a677754f5f74e5b0d. This reverts commit 4be17641b05df1e63fa8e069af92676f1246eb83. This patch wont build on some compilers on buildbot.
2023-02-17[TextAPI] wrap returned Errors in std::moveCyndy Ishida
2023-02-17[TextAPI] Implement TBDv5 ReaderCyndy Ishida
[TextAPI] Implement TBDv5 Reader Introduce initial reader for TBDv5 which is in JSON. This captures all the currently understood fields within the internal structure `InterfaceFile`. New fields & follow up tests will be followed up in future PRs. Reviewed By: pete Differential Revision: https://reviews.llvm.org/D144156