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

Side by Side Diff: generate_gypi.sh

Issue 866273003: Use the correct AVX flags for Windows builds (Closed) Base URL: https://chromium.googlesource.com/chromium/deps/libvpx.git@master
Patch Set: Created 5 years, 11 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 | libvpx_srcs_x86_64_intrinsics.gypi » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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 == avx* ]]; then
Nico 2015/01/23 02:57:12 Shouldn't this block cover that already?
Johann 2015/01/23 03:26:35 Well, this block covers using "EnableEnhancedInstr
Nico 2015/01/23 19:14:29 On Windows, we use clang through clang-cl, a compi
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': '3', # /arch:AVX" >> "$2"
Nico 2015/01/23 02:57:12 I think the problem here is that this unconditiona
Johann 2015/01/23 03:26:35 We only currently have avx2 code. We can switch th
Nico 2015/01/23 19:14:28 If this is only for avx2, then I'd change the stat
124 echo " }," >> "$2" 124 echo " }," >> "$2"
125 echo " }," >> "$2" 125 echo " }," >> "$2"
126 elif [[ $4 == ssse3 || $4 == sse4.1 ]]; then 126 fi
127 if [[ $4 == ssse3 || $4 == sse4.1 || $4 == avx2 ]]; then
127 echo " 'conditions': [" >> "$2" 128 echo " 'conditions': [" >> "$2"
128 echo " ['OS==\"win\" and clang==1', {" >> "$2" 129 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" 130 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" 131 echo " # doesn't need it for intrinsics. There is an /arch flag for A VX2 but" >> "$2"
132 echo " # clang-cl needs its own in the form of -mOPT." >> "$2"
131 echo " 'msvs_settings': {" >> "$2" 133 echo " 'msvs_settings': {" >> "$2"
132 echo " 'VCCLCompilerTool': { 'AdditionalOptions': [ '-m$4' ] }," >> "$2" 134 echo " 'VCCLCompilerTool': { 'AdditionalOptions': [ '-m$4' ] }," >> "$2"
133 echo " }," >> "$2" 135 echo " }," >> "$2"
134 echo " }]," >> "$2" 136 echo " }]," >> "$2"
135 echo " ]," >> "$2" 137 echo " ]," >> "$2"
136 fi 138 fi
137 echo " }," >> "$2" 139 echo " }," >> "$2"
138 } 140 }
139 141
140 142
(...skipping 372 matching lines...) Expand 10 before | Expand all | Expand 10 after
513 make_clean 515 make_clean
514 make libvpx_srcs.txt target=libs $config > /dev/null 516 make libvpx_srcs.txt target=libs $config > /dev/null
515 convert_srcs_to_project_files libvpx_srcs.txt libvpx_srcs_generic 517 convert_srcs_to_project_files libvpx_srcs.txt libvpx_srcs_generic
516 518
517 echo "Remove temporary directory." 519 echo "Remove temporary directory."
518 cd $BASE_DIR 520 cd $BASE_DIR
519 rm -rf $TEMP_DIR 521 rm -rf $TEMP_DIR
520 522
521 # TODO(fgalligan): Is "--disable-fast-unaligned" needed on mipsel? 523 # TODO(fgalligan): Is "--disable-fast-unaligned" needed on mipsel?
522 # TODO(fgalligan): Can we turn on "--enable-realtime-only" for mipsel? 524 # TODO(fgalligan): Can we turn on "--enable-realtime-only" for mipsel?
OLDNEW
« no previous file with comments | « no previous file | libvpx_srcs_x86_64_intrinsics.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698