Skip to content

Use the platform of the source Mach-O file unless ignore_platform #11

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

leptos-null
Copy link

On base branch:

$ bin/tbd -p --replace-archs armv7 armv7s arm64 -v v3 /usr/lib/ssh-keychain.dylib | head
--- !tapi-tbd-v3
archs:                 [ armv7, armv7s, arm64 ]
platform:              (null)
flags:                 [ flat_namespace ]
install-name:          "/usr/lib/ssh-keychain.dylib"
current-version:       1
compatibility-version: 1
objc-constraint:       retain_release
exports:
  - archs:                [ armv7, armv7s, arm64 ]

Note that platform is null.

With PR:

$ bin/tbd -p --replace-archs armv7 armv7s arm64 -v v3 /usr/lib/ssh-keychain.dylib | head
--- !tapi-tbd-v3
archs:                 [ armv7, armv7s, arm64 ]
platform:              macosx
flags:                 [ flat_namespace ]
install-name:          "/usr/lib/ssh-keychain.dylib"
current-version:       1
compatibility-version: 1
objc-constraint:       retain_release
exports:
  - archs:                [ armv7, armv7s, arm64 ]

I think that the tbd platform should be selected from the source Mach-O in all cases except if ignore_platform is it. ignore_targets implies ignore_platform.
In the handle_targets_platform_and_uuid function that this PR changes, ignore_targets is checked first, so I believe both of these cases are handled.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant