Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
aom-rav1e
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Xiph.Org
aom-rav1e
Commits
3c223180
Commit
3c223180
authored
May 04, 2016
by
Tom Finegan
Committed by
Gerrit Code Review
May 04, 2016
Browse files
Options
Browse Files
Download
Plain Diff
Merge "iosbuild.sh: Verify fat library targets."
parents
89f905e5
ef0f98b3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
44 additions
and
4 deletions
+44
-4
build/make/iosbuild.sh
build/make/iosbuild.sh
+44
-4
No files found.
build/make/iosbuild.sh
View file @
3c223180
...
...
@@ -24,6 +24,7 @@ CONFIGURE_ARGS="--disable-docs
--disable-unit-tests"
DIST_DIR
=
"_dist"
FRAMEWORK_DIR
=
"VPX.framework"
FRAMEWORK_LIB
=
"VPX.framework/VPX"
HEADER_DIR
=
"
${
FRAMEWORK_DIR
}
/Headers/vpx"
SCRIPT_DIR
=
$(
dirname
"
$0
"
)
LIBVPX_SOURCE_DIR
=
$(
cd
${
SCRIPT_DIR
}
/../..
;
pwd
)
...
...
@@ -137,6 +138,44 @@ create_vpx_framework_config_shim() {
printf
"#endif //
${
include_guard
}
"
>>
"
${
config_file
}
"
}
# Verifies that $FRAMEWORK_LIB fat library contains requested builds.
verify_framework_targets
()
{
local
requested_cpus
=
""
local
cpu
=
""
# Extract CPU from full target name.
for
target
;
do
cpu
=
"
${
target
%%-*
}
"
if
[
"
${
cpu
}
"
=
"x86"
]
;
then
# lipo -info outputs i386 for libvpx x86 targets.
cpu
=
"i386"
fi
requested_cpus
=
"
${
requested_cpus
}${
cpu
}
"
done
# Get target CPUs present in framework library.
local
targets_built
=
$(
${
LIPO
}
-info
${
FRAMEWORK_LIB
}
)
# $LIPO -info outputs a string like the following:
# Architectures in the fat file: $FRAMEWORK_LIB <architectures>
# Capture only the architecture strings.
targets_built
=
${
targets_built
##*
:
}
# Sort CPU strings to make the next step a simple string compare.
local
actual
=
$(
echo
${
targets_built
}
|
tr
" "
"
\n
"
|
sort
|
tr
"
\n
"
" "
)
local
requested
=
$(
echo
${
requested_cpus
}
|
tr
" "
"
\n
"
|
sort
|
tr
"
\n
"
" "
)
vlog
"Requested
${
FRAMEWORK_LIB
}
CPUs:
${
requested
}
"
vlog
"Actual
${
FRAMEWORK_LIB
}
CPUs:
${
actual
}
"
if
[
"
${
requested
}
"
!=
"
${
actual
}
"
]
;
then
elog
"Actual
${
FRAMEWORK_LIB
}
targets do not match requested target list."
elog
" Requested target CPUs:
${
requested
}
"
elog
" Actual target CPUs:
${
actual
}
"
return
1
fi
}
# Configures and builds each target specified by $1, and then builds
# VPX.framework.
build_framework
()
{
...
...
@@ -176,13 +215,13 @@ build_framework() {
# Copy in vpx_version.h.
cp
-p
"
${
BUILD_ROOT
}
/
${
target
}
/vpx_version.h"
"
${
HEADER_DIR
}
"
vlog
"Created fat library
${
FRAMEWORK_DIR
}
/VPX containing:"
# Confirm VPX.framework/VPX contains the targets requested.
verify_framework_targets
${
targets
}
vlog
"Created fat library
${
FRAMEWORK_LIB
}
containing:"
for
lib
in
${
lib_list
}
;
do
vlog
"
$(
echo
${
lib
}
|
awk
-F
/
'{print $2, $NF}'
)
"
done
# TODO(tomfinegan): Verify that expected targets are included within
# VPX.framework/VPX via lipo -info.
}
# Trap function. Cleans up the subtree used to build all targets contained in
...
...
@@ -285,6 +324,7 @@ cat << EOF
CONFIGURE_ARGS=
${
CONFIGURE_ARGS
}
EXTRA_CONFIGURE_ARGS=
${
EXTRA_CONFIGURE_ARGS
}
FRAMEWORK_DIR=
${
FRAMEWORK_DIR
}
FRAMEWORK_LIB=
${
FRAMEWORK_LIB
}
HEADER_DIR=
${
HEADER_DIR
}
LIBVPX_SOURCE_DIR=
${
LIBVPX_SOURCE_DIR
}
LIPO=
${
LIPO
}
...
...
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