| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
| @@ -0,0 +1,2 @@ | |||
| #!/bin/sh | |||
| xcrun --sdk iphonesimulator${IOS_SDK_VERSION} strip -arch arm64 "$@" | |||
There was a problem hiding this comment.
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.
Sorry, something went wrong.
There was a problem hiding this comment.
@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?
Sorry, something went wrong.
There was a problem hiding this comment.
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.
Sorry, something went wrong.
There was a problem hiding this comment.
Agreed it works in common / simple form today, have run into issues with wrappers as they get more complex.
Using exec would reduce resources a bit (less stacks/fork) and make it so there isn't any exit code forwarding or other stdin/stdout/stderr piping needed (the exec process replaces the shell rather than a fork+exec). -e would makes sure both in the simple case (only one command) or if more get used (ex. run this command to calculate path, then run with that path) it keeps working. Generally in shell scripts I like set -euo pipefail so that many common errors produce an error exit in the shell script. If those errors can't/don't occur (ex. this case doesn't use piping) then it doesn't hurt to have the checks, just means in general the shell scripts have a more safe environment. Agreed it works here as is / simple enough but first script commits to me tend to be starting points for growth as environments change/evolve and "just this little tweak" will fix.
Sorry, something went wrong.
There was a problem hiding this comment.
LGTM
Sorry, something went wrong.
|
Thanks @freakboy3742 for the PR 🌮🎉.. I'm working now to backport this PR to: 3.13, 3.14. |
Sorry, something went wrong.
Adds iOS binary stubs for invoking `strip` (cherry picked from commit 0c6c09b) Co-authored-by: Russell Keith-Magee <russell@keith-magee.com>
Adds iOS binary stubs for invoking `strip` (cherry picked from commit 0c6c09b) Co-authored-by: Russell Keith-Magee <russell@keith-magee.com>
|
GH-136014 is a backport of this pull request to the 3.14 branch. |
Sorry, something went wrong.
|
GH-136015 is a backport of this pull request to the 3.13 branch. |
Sorry, something went wrong.
Adds iOS binary stubs for invoking `strip`
Adds iOS binary stubs for invoking `strip`
Adds iOS binary stubs for invoking `strip`
Adds iOS binary stubs for invoking `strip`
…) (python#136015) Adds iOS binary stubs for invoking `strip` (cherry picked from commit 0c6c09b) Co-authored-by: Russell Keith-Magee <russell@keith-magee.com>
…) (python#136015) Adds iOS binary stubs for invoking `strip` (cherry picked from commit 0c6c09b) Co-authored-by: Russell Keith-Magee <russell@keith-magee.com>
…) (python#136015) Adds iOS binary stubs for invoking `strip` (cherry picked from commit 0c6c09b) Co-authored-by: Russell Keith-Magee <russell@keith-magee.com>
…) (python#136015) Adds iOS binary stubs for invoking `strip` (cherry picked from commit 0c6c09b) Co-authored-by: Russell Keith-Magee <russell@keith-magee.com>
…) (python#136015) Adds iOS binary stubs for invoking `strip` (cherry picked from commit 0c6c09b) Co-authored-by: Russell Keith-Magee <russell@keith-magee.com>
…) (python#136015) Adds iOS binary stubs for invoking `strip` (cherry picked from commit 0c6c09b) Co-authored-by: Russell Keith-Magee <russell@keith-magee.com>
…) (python#136015) Adds iOS binary stubs for invoking `strip` (cherry picked from commit 0c6c09b) Co-authored-by: Russell Keith-Magee <russell@keith-magee.com>
…) (python#136015) Adds iOS binary stubs for invoking `strip` (cherry picked from commit 0c6c09b) Co-authored-by: Russell Keith-Magee <russell@keith-magee.com>
| Back | FazBrowse Home | New Git URL |
Adds iOS binary stubs for strip.
This is something that came up in the development of a port of numpy; Meson looks for strip by default, and raises a warning if it can't be found. It's easy enough to provide the stub to avoid the warning.