Skip to content

Commit a7376a4

Browse files
authored
Merge pull request #212 from tnymlr/patch-1
Add disabling dead code stripping in linker
2 parents 195baec + 85adfc8 commit a7376a4

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

USAGE.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,9 @@ echo "Signing as $EXPANDED_CODE_SIGN_IDENTITY_NAME ($EXPANDED_CODE_SIGN_IDENTITY
145145
find "$CODESIGNING_FOLDER_PATH/Contents/Resources/python-stdlib/lib-dynload" -name "*.so" -exec /usr/bin/codesign --force --sign "$EXPANDED_CODE_SIGN_IDENTITY" -o runtime --timestamp=none --preserve-metadata=identifier,entitlements,flags --generate-entitlement-der {} \;
146146
```
147147

148+
8. Disable dead code removal. As of March 2024 Xcode has "Dead Code Stripping" enabled by default. This _will_ remove functions from linked Python library that linker found unused.
149+
Navigate to Build Settings -> Linkin - General. Find "Dead Code Stripping" and select "No"
150+
148151
You will now be able to access the Python runtime in your Python code.
149152

150153
If you are on iOS, you will be able to deploy to an iOS simulator without specifying

0 commit comments

Comments
 (0)