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 files and files in the config/platform | 7 # This script is used to generate .gypi files and files in the config/platform |
8 # directories needed to build libvpx. | 8 # 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 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
82 echo " 'cflags!': [ '-mfpu=vfpv3-d16' ]," >> $2 | 82 echo " 'cflags!': [ '-mfpu=vfpv3-d16' ]," >> $2 |
83 fi | 83 fi |
84 echo " 'cflags': [ '-m$4', ]," >> $2 | 84 echo " 'cflags': [ '-m$4', ]," >> $2 |
85 echo " 'xcode_settings': { 'OTHER_CFLAGS': [ '-m$4' ] }," >> $2 | 85 echo " 'xcode_settings': { 'OTHER_CFLAGS': [ '-m$4' ] }," >> $2 |
86 if [[ $4 == avx* ]]; then | 86 if [[ $4 == avx* ]]; then |
87 echo " 'msvs_settings': {" >> $2 | 87 echo " 'msvs_settings': {" >> $2 |
88 echo " 'VCCLCompilerTool': {" >> $2 | 88 echo " 'VCCLCompilerTool': {" >> $2 |
89 echo " 'EnableEnhancedInstructionSet': '3', # /arch:AVX" >> $2 | 89 echo " 'EnableEnhancedInstructionSet': '3', # /arch:AVX" >> $2 |
90 echo " }," >> $2 | 90 echo " }," >> $2 |
91 echo " }," >> $2 | 91 echo " }," >> $2 |
| 92 elif [[ $4 == ssse3 || $4 == sse4.1 ]]; then |
| 93 echo " 'conditions': [" >> $2 |
| 94 echo " ['OS==\"win\" and clang==1', {" >> $2 |
| 95 echo " # cl.exe's /arch flag doesn't have a setting for SSSE3/4, and
cl.exe" >> $2 |
| 96 echo " # doesn't need it for intrinsics. clang-cl does need it, thoug
h." >> $2 |
| 97 echo " 'msvs_settings': {" >> $2 |
| 98 echo " 'VCCLCompilerTool': { 'AdditionalOptions': [ '-m$4' ] }," >>
$2 |
| 99 echo " }," >> $2 |
| 100 echo " }]," >> $2 |
| 101 echo " ]," >> $2 |
92 fi | 102 fi |
93 echo " }," >> $2 | 103 echo " }," >> $2 |
94 } | 104 } |
95 | 105 |
96 | 106 |
97 # Generate a gypi which applies additional compiler flags based on the file | 107 # Generate a gypi which applies additional compiler flags based on the file |
98 # name. | 108 # name. |
99 # $1 - Array name for file list. | 109 # $1 - Array name for file list. |
100 # $2 - Output file | 110 # $2 - Output file |
101 function write_special_flags { | 111 function write_special_flags { |
(...skipping 333 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
435 make_clean | 445 make_clean |
436 make libvpx_srcs.txt target=libs $config > /dev/null | 446 make libvpx_srcs.txt target=libs $config > /dev/null |
437 convert_srcs_to_gypi libvpx_srcs.txt libvpx_srcs_generic | 447 convert_srcs_to_gypi libvpx_srcs.txt libvpx_srcs_generic |
438 | 448 |
439 echo "Remove temporary directory." | 449 echo "Remove temporary directory." |
440 cd $BASE_DIR | 450 cd $BASE_DIR |
441 rm -rf $TEMP_DIR | 451 rm -rf $TEMP_DIR |
442 | 452 |
443 # TODO(fgalligan): Is "--disable-fast-unaligned" needed on mipsel? | 453 # TODO(fgalligan): Is "--disable-fast-unaligned" needed on mipsel? |
444 # TODO(fgalligan): Can we turn on "--enable-realtime-only" for mipsel? | 454 # TODO(fgalligan): Can we turn on "--enable-realtime-only" for mipsel? |
OLD | NEW |