OLD | NEW |
1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 # IMPORTANT: | 5 # IMPORTANT: |
6 # Please don't directly include this file if you are building via gyp_chromium, | 6 # Please don't directly include this file if you are building via gyp_chromium, |
7 # since gyp_chromium is automatically forcing its inclusion. | 7 # since gyp_chromium is automatically forcing its inclusion. |
8 { | 8 { |
9 # Variables expected to be overriden on the GYP command line (-D) or by | 9 # Variables expected to be overriden on the GYP command line (-D) or by |
10 # ~/.gyp/include.gypi. | 10 # ~/.gyp/include.gypi. |
(...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
283 # Detect NEON support at run-time. | 283 # Detect NEON support at run-time. |
284 'arm_neon_optional%': 0, | 284 'arm_neon_optional%': 0, |
285 | 285 |
286 # The system root for cross-compiles. Default: none. | 286 # The system root for cross-compiles. Default: none. |
287 'sysroot%': '', | 287 'sysroot%': '', |
288 'chroot_cmd%': '', | 288 'chroot_cmd%': '', |
289 | 289 |
290 # The system libdir used for this ABI. | 290 # The system libdir used for this ABI. |
291 'system_libdir%': 'lib', | 291 'system_libdir%': 'lib', |
292 | 292 |
293 # On Linux, we build with sse2 for Chromium builds. | |
294 'disable_sse2%': 0, | |
295 | |
296 # Use libjpeg-turbo as the JPEG codec used by Chromium. | 293 # Use libjpeg-turbo as the JPEG codec used by Chromium. |
297 'use_libjpeg_turbo%': 1, | 294 'use_libjpeg_turbo%': 1, |
298 | 295 |
299 # Use system libjpeg. Note that the system's libjepg will be used even if | 296 # Use system libjpeg. Note that the system's libjepg will be used even if |
300 # use_libjpeg_turbo is set. | 297 # use_libjpeg_turbo is set. |
301 'use_system_libjpeg%': 0, | 298 'use_system_libjpeg%': 0, |
302 | 299 |
303 # By default, component is set to static_library and it can be overriden | 300 # By default, component is set to static_library and it can be overriden |
304 # by the GYP command line or by ~/.gyp/include.gypi. | 301 # by the GYP command line or by ~/.gyp/include.gypi. |
305 'component%': 'static_library', | 302 'component%': 'static_library', |
(...skipping 1354 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1660 }], | 1657 }], |
1661 | 1658 |
1662 # Native Client glibc toolchain is enabled | 1659 # Native Client glibc toolchain is enabled |
1663 # by default except on arm and mips. | 1660 # by default except on arm and mips. |
1664 ['target_arch=="arm" or target_arch=="mipsel"', { | 1661 ['target_arch=="arm" or target_arch=="mipsel"', { |
1665 'disable_glibc%': 1, | 1662 'disable_glibc%': 1, |
1666 }, { | 1663 }, { |
1667 'disable_glibc%': 0, | 1664 'disable_glibc%': 0, |
1668 }], | 1665 }], |
1669 | 1666 |
1670 # Disable SSE2 when building for ARM or MIPS. | |
1671 ['target_arch=="arm" or target_arch=="mipsel"', { | |
1672 'disable_sse2%': 1, | |
1673 }, { | |
1674 'disable_sse2%': '<(disable_sse2)', | |
1675 }], | |
1676 | |
1677 # Set the relative path from this file to the GYP file of the JPEG | 1667 # Set the relative path from this file to the GYP file of the JPEG |
1678 # library used by Chromium. | 1668 # library used by Chromium. |
1679 ['use_system_libjpeg==1 or use_libjpeg_turbo==0', { | 1669 ['use_system_libjpeg==1 or use_libjpeg_turbo==0', { |
1680 # Configuration for using the system libjeg is here. | 1670 # Configuration for using the system libjeg is here. |
1681 'libjpeg_gyp_path': '../third_party/libjpeg/libjpeg.gyp', | 1671 'libjpeg_gyp_path': '../third_party/libjpeg/libjpeg.gyp', |
1682 }, { | 1672 }, { |
1683 'libjpeg_gyp_path': '../third_party/libjpeg_turbo/libjpeg.gyp', | 1673 'libjpeg_gyp_path': '../third_party/libjpeg_turbo/libjpeg.gyp', |
1684 }], | 1674 }], |
1685 | 1675 |
1686 # Options controlling the use of GConf (the classic GNOME configuration | 1676 # Options controlling the use of GConf (the classic GNOME configuration |
(...skipping 1514 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3201 # rounded to its original precision) but they have significant | 3191 # rounded to its original precision) but they have significant |
3202 # runtime performance penalty. | 3192 # runtime performance penalty. |
3203 # | 3193 # |
3204 # -mfpmath=sse -msse2 makes the compiler use SSE instructions | 3194 # -mfpmath=sse -msse2 makes the compiler use SSE instructions |
3205 # which keep floating-point values in SSE registers in its | 3195 # which keep floating-point values in SSE registers in its |
3206 # native precision (32-bit for single precision, and 64-bit | 3196 # native precision (32-bit for single precision, and 64-bit |
3207 # for double precision values). This means the floating-point | 3197 # for double precision values). This means the floating-point |
3208 # value used during computation does not change depending on | 3198 # value used during computation does not change depending on |
3209 # how the compiler optimized the code, since the value is | 3199 # how the compiler optimized the code, since the value is |
3210 # always kept in its specified precision. | 3200 # always kept in its specified precision. |
| 3201 # |
| 3202 # Refer to http://crbug.com/348761 for rationale behind SSE2 |
| 3203 # being a minimum requirement for 32-bit Linux builds and |
| 3204 # http://crbug.com/313032 for an example where this has "bit" |
| 3205 # us in the past. |
| 3206 'cflags': [ |
| 3207 '-msse2', |
| 3208 '-mfpmath=sse', |
| 3209 '-mmmx', # Allows mmintrin.h for MMX intrinsics. |
| 3210 '-m32', |
| 3211 ], |
| 3212 'ldflags': [ |
| 3213 '-m32', |
| 3214 ], |
3211 'conditions': [ | 3215 'conditions': [ |
3212 ['branding=="Chromium" and disable_sse2==0', { | |
3213 'cflags': [ | |
3214 '-march=pentium4', | |
3215 '-msse2', | |
3216 '-mfpmath=sse', | |
3217 ], | |
3218 }], | |
3219 # ChromeOS targets Pinetrail, which is sse3, but most of the | |
3220 # benefit comes from sse2 so this setting allows ChromeOS | |
3221 # to build on other CPUs. In the future -march=atom would | |
3222 # help but requires a newer compiler. | |
3223 ['chromeos==1 and disable_sse2==0', { | |
3224 'cflags': [ | |
3225 '-msse2', | |
3226 '-mfpmath=sse', | |
3227 ], | |
3228 }], | |
3229 # Use gold linker for Android ia32 target. | 3216 # Use gold linker for Android ia32 target. |
3230 ['OS=="android"', { | 3217 ['OS=="android"', { |
3231 'cflags': [ | 3218 'cflags': [ |
3232 '-fuse-ld=gold', | 3219 '-fuse-ld=gold', |
3233 ], | 3220 ], |
3234 'ldflags': [ | 3221 'ldflags': [ |
3235 '-fuse-ld=gold', | 3222 '-fuse-ld=gold', |
3236 ], | 3223 ], |
3237 }], | 3224 }], |
3238 # Install packages have started cropping up with | 3225 # Install packages have started cropping up with |
3239 # different headers between the 32-bit and 64-bit | 3226 # different headers between the 32-bit and 64-bit |
3240 # versions, so we have to shadow those differences off | 3227 # versions, so we have to shadow those differences off |
3241 # and make sure a 32-bit-on-64-bit build picks up the | 3228 # and make sure a 32-bit-on-64-bit build picks up the |
3242 # right files. | 3229 # right files. |
3243 # For android build, use NDK headers instead of host headers | 3230 # For android build, use NDK headers instead of host headers |
3244 ['host_arch!="ia32" and OS!="android"', { | 3231 ['host_arch!="ia32" and OS!="android"', { |
3245 'include_dirs+': [ | 3232 'include_dirs+': [ |
3246 '/usr/include32', | 3233 '/usr/include32', |
3247 ], | 3234 ], |
3248 }], | 3235 }], |
3249 ], | 3236 ], |
3250 # -mmmx allows mmintrin.h to be used for mmx intrinsics. | |
3251 # video playback is mmx and sse2 optimized. | |
3252 'cflags': [ | |
3253 '-m32', | |
3254 '-mmmx', | |
3255 ], | |
3256 'ldflags': [ | |
3257 '-m32', | |
3258 ], | |
3259 }], | 3237 }], |
3260 ], | 3238 ], |
3261 }], | 3239 }], |
3262 ['target_arch=="arm"', { | 3240 ['target_arch=="arm"', { |
3263 'target_conditions': [ | 3241 'target_conditions': [ |
3264 ['_toolset=="target"', { | 3242 ['_toolset=="target"', { |
3265 'cflags_cc': [ | 3243 'cflags_cc': [ |
3266 # The codesourcery arm-2009q3 toolchain warns at that the ABI | 3244 # The codesourcery arm-2009q3 toolchain warns at that the ABI |
3267 # has changed whenever it encounters a varargs function. This | 3245 # has changed whenever it encounters a varargs function. This |
3268 # silences those warnings, as they are not helpful and | 3246 # silences those warnings, as they are not helpful and |
(...skipping 1783 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5052 # settings in target dicts. SYMROOT is a special case, because many other | 5030 # settings in target dicts. SYMROOT is a special case, because many other |
5053 # Xcode variables depend on it, including variables such as | 5031 # Xcode variables depend on it, including variables such as |
5054 # PROJECT_DERIVED_FILE_DIR. When a source group corresponding to something | 5032 # PROJECT_DERIVED_FILE_DIR. When a source group corresponding to something |
5055 # like PROJECT_DERIVED_FILE_DIR is added to a project, in order for the | 5033 # like PROJECT_DERIVED_FILE_DIR is added to a project, in order for the |
5056 # files to appear (when present) in the UI as actual files and not red | 5034 # files to appear (when present) in the UI as actual files and not red |
5057 # red "missing file" proxies, the correct path to PROJECT_DERIVED_FILE_DIR, | 5035 # red "missing file" proxies, the correct path to PROJECT_DERIVED_FILE_DIR, |
5058 # and therefore SYMROOT, needs to be set at the project level. | 5036 # and therefore SYMROOT, needs to be set at the project level. |
5059 'SYMROOT': '<(DEPTH)/xcodebuild', | 5037 'SYMROOT': '<(DEPTH)/xcodebuild', |
5060 }, | 5038 }, |
5061 } | 5039 } |
OLD | NEW |