Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 53 fi | 53 fi |
| 54 | 54 |
| 55 pushd ${WEBRTC_BASE_DIR} | 55 pushd ${WEBRTC_BASE_DIR} |
| 56 LIBRARY_BASE_DIR="out_ios_libs" | 56 LIBRARY_BASE_DIR="out_ios_libs" |
| 57 | 57 |
| 58 function build_webrtc { | 58 function build_webrtc { |
| 59 OUTPUT_DIR=$1 | 59 OUTPUT_DIR=$1 |
| 60 FLAVOR=$2 | 60 FLAVOR=$2 |
| 61 TARGET_ARCH=$3 | 61 TARGET_ARCH=$3 |
| 62 TARGET_SUBARCH=$4 | 62 TARGET_SUBARCH=$4 |
| 63 if [[ ${TARGET_ARCH} = 'armv7' || ${TARGET_ARCH} = 'arm64' ]]; then | 63 if [[ ${TARGET_ARCH} = 'arm' || ${TARGET_ARCH} = 'arm64' ]]; then |
| 64 FLAVOR="${FLAVOR}-iphoneos" | 64 FLAVOR="${FLAVOR}-iphoneos" |
| 65 else | 65 else |
| 66 FLAVOR="${FLAVOR}-iphonesimulator" | 66 FLAVOR="${FLAVOR}-iphonesimulator" |
| 67 fi | 67 fi |
| 68 export GYP_DEFINES="OS=ios use_openssl=1" | 68 export GYP_DEFINES="OS=ios" |
| 69 export GYP_DEFINES="${GYP_DEFINES} target_arch=${TARGET_ARCH}" | 69 export GYP_DEFINES="${GYP_DEFINES} target_arch=${TARGET_ARCH} clang_xcode=1" |
|
tkchin_webrtc
2016/01/21 23:15:29
unnecessary to do twice?
Just
export GYP_DEFINES=
hjon_webrtc
2016/01/21 23:19:27
Done.
| |
| 70 if [[ -n ${TARGET_SUBARCH} ]]; then | |
| 71 export GYP_DEFINES="${GYP_DEFINES} target_subarch=${TARGET_SUBARCH}" | |
| 72 fi | |
| 73 export GYP_GENERATORS="ninja" | 70 export GYP_GENERATORS="ninja" |
| 74 export GYP_GENERATOR_FLAGS="output_dir=${OUTPUT_DIR}" | 71 export GYP_GENERATOR_FLAGS="output_dir=${OUTPUT_DIR}" |
| 75 webrtc/build/gyp_webrtc talk/build/merge_ios_libs.gyp | 72 webrtc/build/gyp_webrtc talk/build/merge_ios_libs.gyp |
| 76 ninja -C ${OUTPUT_DIR}/${FLAVOR} libjingle_peerconnection_objc_no_op | 73 ninja -C ${OUTPUT_DIR}/${FLAVOR} libjingle_peerconnection_objc_no_op |
| 77 mkdir -p ${LIBRARY_BASE_DIR}/${TARGET_ARCH} | 74 mkdir -p ${LIBRARY_BASE_DIR}/${TARGET_ARCH} |
| 78 mv ${OUTPUT_DIR}/${FLAVOR}/*.a ${LIBRARY_BASE_DIR}/${TARGET_ARCH} | 75 mv ${OUTPUT_DIR}/${FLAVOR}/*.a ${LIBRARY_BASE_DIR}/${TARGET_ARCH} |
| 79 } | 76 } |
| 80 | 77 |
| 81 # Build all the common architectures. | 78 # Build all the common architectures. |
| 82 build_webrtc "out_ios_armv7" "Release" "armv7" "arm32" | 79 build_webrtc "out_ios_arm" "Release" "arm" |
| 83 build_webrtc "out_ios_arm64" "Release" "arm64" "arm64" | 80 build_webrtc "out_ios_arm64" "Release" "arm64" |
| 84 build_webrtc "out_ios_ia32" "Release" "ia32" "arm32" | 81 build_webrtc "out_ios_ia32" "Release" "ia32" |
| 85 build_webrtc "out_ios_x86_64" "Release" "x64" "arm64" | 82 build_webrtc "out_ios_x86_64" "Release" "x64" |
| 86 | 83 |
| 87 popd | 84 popd |
| 88 | 85 |
| 89 # Merge the libraries together. | 86 # Merge the libraries together. |
| 90 ${MERGE_SCRIPT} ${WEBRTC_BASE_DIR}/${LIBRARY_BASE_DIR} | 87 ${MERGE_SCRIPT} ${WEBRTC_BASE_DIR}/${LIBRARY_BASE_DIR} |
| OLD | NEW |