Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
C
cocoapods
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
gengmeiios
cocoapods
Commits
07ea86c1
Commit
07ea86c1
authored
Nov 03, 2017
by
Dimitris Koutsogiorgas
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Be more lenient when stripping frameworks and dSYMs for non fat binaries
parent
9fc47007
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
28 additions
and
5 deletions
+28
-5
CHANGELOG.md
CHANGELOG.md
+5
-0
embed_frameworks_script.rb
lib/cocoapods/generator/embed_frameworks_script.rb
+22
-4
cocoapods-integration-specs
spec/cocoapods-integration-specs
+1
-1
No files found.
CHANGELOG.md
View file @
07ea86c1
...
...
@@ -14,6 +14,11 @@ To install release candidates run `[sudo] gem install cocoapods --pre`
##### Bug Fixes
*
Be more lenient when stripping frameworks and dSYMs for non fat binaries
[
Dimitris Koutsogiorgas
](
https://github.com/dnkoutso
)
[
#7196
](
https://github.com/CocoaPods/CocoaPods/issues/7196
)
[
#5854
](
https://github.com/CocoaPods/CocoaPods/issues/5854
)
*
Do not display script phases warnings multiple times per platform
[
Dimitris Koutsogiorgas
](
https://github.com/dnkoutso
)
[
#7193
](
https://github.com/CocoaPods/CocoaPods/pull/7193
)
...
...
lib/cocoapods/generator/embed_frameworks_script.rb
View file @
07ea86c1
...
...
@@ -43,10 +43,14 @@ module Pod
SWIFT_STDLIB_PATH="${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}"
# Used as a return value for each invocation of `strip_invalid_archs` function.
STRIP_BINARY_RETVAL=0
# This protects against multiple targets copying the same framework dependency at the same time. The solution
# was originally proposed here: https://lists.samba.org/archive/rsync/2008-February/020158.html
RSYNC_PROTECT_TMP_FILES=(--filter "P .*.??????")
# Copies and strips a vendored framework
install_framework()
{
if [ -r "${BUILT_PRODUCTS_DIR}/$1" ]; then
...
...
@@ -95,7 +99,7 @@ module Pod
fi
}
# Copies
the dSYM of a vendored framework
# Copies
and strips a vendored dSYM
install_dsym() {
local source="$1"
if [ -r "$source" ]; then
...
...
@@ -112,9 +116,14 @@ module Pod
strip_invalid_archs "$binary"
fi
if [[ $STRIP_BINARY_RETVAL == 1 ]]; then
# Move the stripped file into its final destination.
echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter
\\
"- CVS/
\\
" --filter
\\
"- .svn/
\\
" --filter
\\
"- .git/
\\
" --filter
\\
"- .hg/
\\
" --filter
\\
"- Headers
\\
" --filter
\\
"- PrivateHeaders
\\
" --filter
\\
"- Modules
\\
"
\\
"${DERIVED_FILES_DIR}/${basename}.framework.dSYM
\\
"
\\
"${DWARF_DSYM_FOLDER_PATH}
\\
""
rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${DERIVED_FILES_DIR}/${basename}.framework.dSYM" "${DWARF_DSYM_FOLDER_PATH}"
else
# The dSYM was not stripped at all, in this case touch a fake folder so the input/output paths from Xcode do not reexecute this script because the file is missing.
touch "${DWARF_DSYM_FOLDER_PATH}/${basename}.framework.dSYM"
fi
fi
}
...
...
@@ -136,10 +145,18 @@ module Pod
# Strip invalid architectures
strip_invalid_archs() {
binary="$1"
# Get architectures for current file
archs="$(lipo -info "$binary" | rev | cut -d ':' -f1 | rev)"
# Get architectures for current target binary
binary_archs="$(lipo -info "$binary" | rev | cut -d ':' -f1 | awk '{$1=$1;print}' | rev)"
# Intersect them with the architectures we are building for
intersected_archs="$(echo ${ARCHS[@]} ${binary_archs[@]} | tr ' ' '
\\
n' | sort | uniq -d)"
# If there are no archs supported by this binary then warn the user
if [[ -z "$intersected_archs" ]]; then
echo "warning: [CP] Vendored binary '$binary' contains architectures ($binary_archs) none of which match the current build architectures ($ARCHS)."
STRIP_BINARY_RETVAL=0
return
fi
stripped=""
for arch in $archs; do
for arch in $
binary_
archs; do
if ! [[ "${ARCHS}" == *"$arch"* ]]; then
# Strip non-valid architectures in-place
lipo -remove "$arch" -output "$binary" "$binary" || exit 1
...
...
@@ -149,6 +166,7 @@ module Pod
if [[ "$stripped" ]]; then
echo "Stripped $binary of architectures:$stripped"
fi
STRIP_BINARY_RETVAL=1
}
SH
...
...
cocoapods-integration-specs
@
8c89eea4
Subproject commit
cd417b2a8a34c2c8630336b29b4b4405df9500b5
Subproject commit
8c89eea40c9c7fe29af512bae03f63285913e47a
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment