OLD | NEW |
1 #!/bin/bash -e | 1 #!/bin/bash -e |
2 # | 2 # |
3 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 3 # Copyright (c) 2012 The Chromium Authors. All rights reserved. |
4 # Use of this source code is governed by a BSD-style license that can be | 4 # Use of this source code is governed by a BSD-style license that can be |
5 # found in the LICENSE file. | 5 # found in the LICENSE file. |
6 | 6 |
7 # This script is used to generate .gypi, .gni files and files in the | 7 # This script is used to generate .gypi, .gni files and files in the |
8 # config/platform directories needed to build libvpx. | 8 # config/platform directories needed to build libvpx. |
9 # Every time libvpx source code is updated just run this script. | 9 # Every time libvpx source code is updated just run this script. |
10 # | 10 # |
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
110 echo " ['use_lto==1', {" >> "$2" | 110 echo " ['use_lto==1', {" >> "$2" |
111 echo " 'cflags!': [" >> "$2" | 111 echo " 'cflags!': [" >> "$2" |
112 echo " '-flto'," >> "$2" | 112 echo " '-flto'," >> "$2" |
113 echo " '-ffat-lto-objects'," >> "$2" | 113 echo " '-ffat-lto-objects'," >> "$2" |
114 echo " ]," >> "$2" | 114 echo " ]," >> "$2" |
115 echo " }]," >> "$2" | 115 echo " }]," >> "$2" |
116 echo " ]," >> "$2" | 116 echo " ]," >> "$2" |
117 fi | 117 fi |
118 echo " 'cflags': [ '-m$4', ]," >> "$2" | 118 echo " 'cflags': [ '-m$4', ]," >> "$2" |
119 echo " 'xcode_settings': { 'OTHER_CFLAGS': [ '-m$4' ] }," >> "$2" | 119 echo " 'xcode_settings': { 'OTHER_CFLAGS': [ '-m$4' ] }," >> "$2" |
120 if [[ $4 == avx* ]]; then | 120 if [[ $4 == avx2 ]]; then |
121 echo " 'msvs_settings': {" >> "$2" | 121 echo " 'msvs_settings': {" >> "$2" |
122 echo " 'VCCLCompilerTool': {" >> "$2" | 122 echo " 'VCCLCompilerTool': {" >> "$2" |
123 echo " 'EnableEnhancedInstructionSet': '3', # /arch:AVX" >> "$2" | 123 echo " 'EnableEnhancedInstructionSet': '5', # /arch:AVX2" >> "$2" |
124 echo " }," >> "$2" | 124 echo " }," >> "$2" |
125 echo " }," >> "$2" | 125 echo " }," >> "$2" |
126 elif [[ $4 == ssse3 || $4 == sse4.1 ]]; then | 126 elif [[ $4 == ssse3 || $4 == sse4.1 ]]; then |
127 echo " 'conditions': [" >> "$2" | 127 echo " 'conditions': [" >> "$2" |
128 echo " ['OS==\"win\" and clang==1', {" >> "$2" | 128 echo " ['OS==\"win\" and clang==1', {" >> "$2" |
129 echo " # cl.exe's /arch flag doesn't have a setting for SSSE3/4, and
cl.exe" >> "$2" | 129 echo " # cl.exe's /arch flag doesn't have a setting for SSSE3/4, and
cl.exe" >> "$2" |
130 echo " # doesn't need it for intrinsics. clang-cl does need it, thoug
h." >> "$2" | 130 echo " # doesn't need it for intrinsics. clang-cl does need it, thoug
h." >> "$2" |
131 echo " 'msvs_settings': {" >> "$2" | 131 echo " 'msvs_settings': {" >> "$2" |
132 echo " 'VCCLCompilerTool': { 'AdditionalOptions': [ '-m$4' ] }," >>
"$2" | 132 echo " 'VCCLCompilerTool': { 'AdditionalOptions': [ '-m$4' ] }," >>
"$2" |
133 echo " }," >> "$2" | 133 echo " }," >> "$2" |
(...skipping 379 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
513 make_clean | 513 make_clean |
514 make libvpx_srcs.txt target=libs $config > /dev/null | 514 make libvpx_srcs.txt target=libs $config > /dev/null |
515 convert_srcs_to_project_files libvpx_srcs.txt libvpx_srcs_generic | 515 convert_srcs_to_project_files libvpx_srcs.txt libvpx_srcs_generic |
516 | 516 |
517 echo "Remove temporary directory." | 517 echo "Remove temporary directory." |
518 cd $BASE_DIR | 518 cd $BASE_DIR |
519 rm -rf $TEMP_DIR | 519 rm -rf $TEMP_DIR |
520 | 520 |
521 # TODO(fgalligan): Is "--disable-fast-unaligned" needed on mipsel? | 521 # TODO(fgalligan): Is "--disable-fast-unaligned" needed on mipsel? |
522 # TODO(fgalligan): Can we turn on "--enable-realtime-only" for mipsel? | 522 # TODO(fgalligan): Can we turn on "--enable-realtime-only" for mipsel? |
OLD | NEW |