8000 gh-135968: Add iOS binary stubs for strip by freakboy3742 · Pull Request #135970 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

gh-135968: Add iOS binary stubs for strip #135970

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

Merged
merged 2 commits into from
Jun 27, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Stubs for ``strip`` are now provided as part of an iOS install.
2 changes: 2 additions & 0 deletions iOS/Resources/bin/arm64-apple-ios-simulator-strip
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/bin/sh
xcrun --sdk iphonesimulator${IOS_SDK_VERSION} strip -arch arm64 "$@"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The return value from xcrun / the underlying command isn't returned to the caller for these as written. Either -e option (errexit) to /bin/sh and/or using exec to run the subcommand should resolve; not sure which is best practice.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@cmaloney Are you sure about that? From my testing:

$ iOS/Resources/bin/arm64-apple-ios-simulator-clang -c hello.c -o hello
$ echo $?
0
$ iOS/Resources/bin/arm64-apple-ios-simulator-clang
clang: error: no input files
$ echo $?
1 

Or am I missing something here?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

set -e or equivalent would only be needed if there were another command following the xcrun, no? Otherwise, the stub script will exit with the status of the last executed command, that is, the command executed by xcrun.

2 changes: 2 additions & 0 deletions iOS/Resources/bin/arm64-apple-ios-strip
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/bin/sh
xcrun --sdk iphoneos${IOS_SDK_VERSION} strip -arch arm64 "$@"
2 changes: 2 additions & 0 deletions iOS/Resources/bin/x86_64-apple-ios-simulator-strip
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/bin/sh
xcrun --sdk iphonesimulator${IOS_SDK_VERSION} strip -arch x86_64 "$@"
Loading
0