Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(54)

Side by Side Diff: talk/build/build_ios_libs.sh

Issue 1673503002: Update build_ios_libs.sh script to build new Objective-C API (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Changes based on feedback Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | talk/build/export_headers » ('j') | talk/build/export_headers » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/bin/bash 1 #!/bin/bash
2 # 2 #
3 # libjingle 3 # libjingle
4 # Copyright 2015 Google Inc. 4 # Copyright 2015 Google Inc.
5 # 5 #
6 # Redistribution and use in source and binary forms, with or without 6 # Redistribution and use in source and binary forms, with or without
7 # modification, are permitted provided that the following conditions are met: 7 # modification, are permitted provided that the following conditions are met:
8 # 8 #
9 # 1. Redistributions of source code must retain the above copyright notice, 9 # 1. Redistributions of source code must retain the above copyright notice,
10 # this list of conditions and the following disclaimer. 10 # this list of conditions and the following disclaimer.
(...skipping 27 matching lines...) Expand all
38 fi 38 fi
39 39
40 # Check for GYP generator. 40 # Check for GYP generator.
41 SCRIPT_DIR=$(dirname $0) 41 SCRIPT_DIR=$(dirname $0)
42 WEBRTC_BASE_DIR=${SCRIPT_DIR}/../.. 42 WEBRTC_BASE_DIR=${SCRIPT_DIR}/../..
43 GYP_WEBRTC_SCRIPT=${WEBRTC_BASE_DIR}/webrtc/build/gyp_webrtc 43 GYP_WEBRTC_SCRIPT=${WEBRTC_BASE_DIR}/webrtc/build/gyp_webrtc
44 if [[ ! -x ${GYP_WEBRTC_SCRIPT} ]]; then 44 if [[ ! -x ${GYP_WEBRTC_SCRIPT} ]]; then
45 echo "Failed to find gyp generator." >&2 45 echo "Failed to find gyp generator." >&2
46 exit 1 46 exit 1
47 fi 47 fi
48 # Check for export headers script.
49 EXPORT_HEADERS_SCRIPT=${SCRIPT_DIR}/export_headers
50 if [[ ! -x ${EXPORT_HEADERS_SCRIPT} ]]; then
51 echo "Failed to find export headers script." >&2
52 exit 1
53 fi
48 # Check for merge script. 54 # Check for merge script.
49 MERGE_SCRIPT=${SCRIPT_DIR}/merge_ios_libs 55 MERGE_SCRIPT=${SCRIPT_DIR}/merge_ios_libs
50 if [[ ! -x ${MERGE_SCRIPT} ]]; then 56 if [[ ! -x ${MERGE_SCRIPT} ]]; then
51 echo "Failed to find library merging script." >&2 57 echo "Failed to find library merging script." >&2
52 exit 1 58 exit 1
53 fi 59 fi
54 60
55 pushd ${WEBRTC_BASE_DIR} 61 pushd ${WEBRTC_BASE_DIR}
56 LIBRARY_BASE_DIR="out_ios_libs" 62 LIBRARY_BASE_DIR="out_ios_libs"
57 63
58 function build_webrtc { 64 function build_webrtc {
59 OUTPUT_DIR=$1 65 OUTPUT_DIR=$1
60 FLAVOR=$2 66 FLAVOR=$2
61 TARGET_ARCH=$3 67 TARGET_ARCH=$3
62 TARGET_SUBARCH=$4
63 if [[ ${TARGET_ARCH} = 'arm' || ${TARGET_ARCH} = 'arm64' ]]; then 68 if [[ ${TARGET_ARCH} = 'arm' || ${TARGET_ARCH} = 'arm64' ]]; then
64 FLAVOR="${FLAVOR}-iphoneos" 69 FLAVOR="${FLAVOR}-iphoneos"
65 else 70 else
66 FLAVOR="${FLAVOR}-iphonesimulator" 71 FLAVOR="${FLAVOR}-iphonesimulator"
67 fi 72 fi
68 export GYP_DEFINES="OS=ios target_arch=${TARGET_ARCH} clang_xcode=1" 73 export GYP_DEFINES="OS=ios target_arch=${TARGET_ARCH} clang_xcode=1"
69 export GYP_GENERATORS="ninja" 74 export GYP_GENERATORS="ninja"
70 export GYP_GENERATOR_FLAGS="output_dir=${OUTPUT_DIR}" 75 export GYP_GENERATOR_FLAGS="output_dir=${OUTPUT_DIR}"
71 webrtc/build/gyp_webrtc talk/build/merge_ios_libs.gyp 76 webrtc/build/gyp_webrtc talk/build/merge_ios_libs.gyp
72 ninja -C ${OUTPUT_DIR}/${FLAVOR} libjingle_peerconnection_objc_no_op 77 ninja -C ${OUTPUT_DIR}/${FLAVOR} webrtc_api_objc_no_op
73 mkdir -p ${LIBRARY_BASE_DIR}/${TARGET_ARCH} 78 mkdir -p ${LIBRARY_BASE_DIR}/${TARGET_ARCH}
74 mv ${OUTPUT_DIR}/${FLAVOR}/*.a ${LIBRARY_BASE_DIR}/${TARGET_ARCH} 79 mv ${OUTPUT_DIR}/${FLAVOR}/*.a ${LIBRARY_BASE_DIR}/${TARGET_ARCH}
75 } 80 }
76 81
82 function copy_headers {
83 LIST_OF_HEADERS=$1
84 INCLUDE_BASE_DIR=$2
85 while read -r HEADER_PATH || [[ -n "$HEADER_PATH" ]]; do
86 ditto ${HEADER_PATH} ${INCLUDE_BASE_DIR}/${HEADER_PATH}
87 done < ${LIST_OF_HEADERS}
88 }
89
77 # Build all the common architectures. 90 # Build all the common architectures.
78 build_webrtc "out_ios_arm" "Release" "arm" 91 build_webrtc "out_ios_arm" "Release" "arm"
79 build_webrtc "out_ios_arm64" "Release" "arm64" 92 build_webrtc "out_ios_arm64" "Release" "arm64"
80 build_webrtc "out_ios_ia32" "Release" "ia32" 93 build_webrtc "out_ios_ia32" "Release" "ia32"
81 build_webrtc "out_ios_x86_64" "Release" "x64" 94 build_webrtc "out_ios_x86_64" "Release" "x64"
82 95
83 popd 96 popd
84 97
98 # Export header files.
99 ${EXPORT_HEADERS_SCRIPT} ${WEBRTC_BASE_DIR}/${LIBRARY_BASE_DIR}
100
85 # Merge the libraries together. 101 # Merge the libraries together.
86 ${MERGE_SCRIPT} ${WEBRTC_BASE_DIR}/${LIBRARY_BASE_DIR} 102 ${MERGE_SCRIPT} ${WEBRTC_BASE_DIR}/${LIBRARY_BASE_DIR}
OLDNEW
« no previous file with comments | « no previous file | talk/build/export_headers » ('j') | talk/build/export_headers » ('J')

Powered by Google App Engine
This is Rietveld 408576698