13 Commits

Author SHA1 Message Date
Cyndy Ishida
6eb7273b11
[readtapi] Ensure universal dylibs record the same input path location across slices (#80875)
resolves: https://github.com/llvm/llvm-project/issues/80868
2024-02-06 10:01:45 -08:00
Cyndy Ishida
5bcd91058e [readtapi] Use ExitOnError instead of errorcodes for readlink wrapper
Silences: ` error C4716: 'read_link': must return a value` windows error
2024-02-03 10:02:16 -08:00
Cyndy Ishida
7189219ec9
[readtapi] Add support for stubify-ing directories (#76885)
When given a directory input `llvm-readtapi` traverses through the
directory to find dylibs or tbd files to operate on. TBD files will be
created with the same base file name as the dylib. Symlinks should be
created if the input is one.

This also introduces options to delete input files which are defined as
library files that existed before `readtapi -stubify` was invoked. Also
the ability to delete private libraries where private libraries are in a
predefined file system locations on darwin based platforms.
2024-02-03 09:33:42 -08:00
Cyndy Ishida
b64992a367
[readtapi] Cleanup usages of ExitOnError, NFCI (#76745) 2024-01-02 15:22:26 -08:00
Cyndy Ishida
c6f29dbb59
[readtapi] Setup simple stubify support (#76075)
Stubify broadly takes either tbd files or binary dylibs and turns them
into tbd files. In future patches, stubify will also allow additional
information to be embedded into the final TBD output too.

Add Util APIs to TextAPI for common operations used by readtapi for now.
2023-12-20 14:56:53 -08:00
Cyndy Ishida
142e567cf0
[readtapi] Cleanup printing command line options (#75106)
Also, add a version option.
2023-12-12 08:25:53 -08:00
Cyndy Ishida
86fa4b2c46
[readtapi] Swap anon namespaces in favor of annotating static, NFC (#75078) 2023-12-11 13:33:36 -08:00
Cyndy Ishida
e1f69b863d
[readtapi] Add Extract & Remove architecture functionality (#72657)
This adds functionality to tbd files similar to what `lipo -extract`
and `lipo -remove` does for binaries.
2023-11-27 14:24:04 -08:00
Cyndy Ishida
bc191ac376
[readtapi] Use consistent error handling diagnostics (#73419) 2023-11-26 11:08:55 -08:00
Cyndy Ishida
ae182dbb1d
[readtapi] Add Merge functionality (#72656)
Merge allows a user to merge different files (tbds for now or dylibs in
the future) to emit out a single tbd with all input contents. This does
require that all inputs represent the same library.
2023-11-17 12:26:04 -08:00
Cyndy Ishida
3b48a7a008
[readtapi] add optional --<option>"=" to some cli opts (#72426) 2023-11-15 15:32:36 -08:00
Cyndy Ishida
ec64af5994
[readtapi] Use OptParser.td for options (#72183)
This includes revamping how --compare was handled and adds `-o` ontop of
tablegen approach.

This will be used to add more complex options.
2023-11-15 09:31:31 -08:00
Cyndy Ishida
5656d7971b [llvm][tapi-diff] Transition diff-tool to be more general purpose
This is the first of transition tapi-diff to be readtapi.
This tool will eventually replace functionality for Xcode's `xcrun tapi stubify` and
`xcrun tapi archive`.
This patch updates the tool name and is a minor refactor for the driver to handle more options.

Reviewed By: zixuw

Differential Revision: https://reviews.llvm.org/D153045
2023-07-31 09:32:26 -07:00