| OLD | NEW |
| 1 # Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 # Copyright (c) 2009 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 { | 5 { |
| 6 'variables': { | 6 'variables': { |
| 7 # .gyp files should set chromium_code to 1 if they build Chromium-specific | 7 # .gyp files should set chromium_code to 1 if they build Chromium-specific |
| 8 # code, as opposed to external code. This variable is used to control | 8 # code, as opposed to external code. This variable is used to control |
| 9 # such things as the set of warnings to enable, and whether warnings are | 9 # such things as the set of warnings to enable, and whether warnings are |
| 10 # treated as errors. | 10 # treated as errors. |
| (...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 140 }, | 140 }, |
| 141 }, | 141 }, |
| 142 'conditions': [ | 142 'conditions': [ |
| 143 [ 'OS=="linux"', { | 143 [ 'OS=="linux"', { |
| 144 'target_defaults': { | 144 'target_defaults': { |
| 145 'asflags': [ | 145 'asflags': [ |
| 146 # Needed so that libs with .s files (e.g. libicudata.a) | 146 # Needed so that libs with .s files (e.g. libicudata.a) |
| 147 # are compatible with the general 32-bit-ness. | 147 # are compatible with the general 32-bit-ness. |
| 148 '-32', | 148 '-32', |
| 149 ], | 149 ], |
| 150 # Enable -Werror by default, but put it in a variable so it can |
| 151 # be disabled in ~/.gyp/include.gypi on the valgrind builders. |
| 152 'variables': { |
| 153 'werror%': '-Werror', |
| 154 }, |
| 150 # All floating-point computations on x87 happens in 80-bit | 155 # All floating-point computations on x87 happens in 80-bit |
| 151 # precision. Because the C and C++ language standards allow | 156 # precision. Because the C and C++ language standards allow |
| 152 # the compiler to keep the floating-point values in higher | 157 # the compiler to keep the floating-point values in higher |
| 153 # precision than what's specified in the source and doing so | 158 # precision than what's specified in the source and doing so |
| 154 # is more efficient than constantly rounding up to 64-bit or | 159 # is more efficient than constantly rounding up to 64-bit or |
| 155 # 32-bit precision as specified in the source, the compiler, | 160 # 32-bit precision as specified in the source, the compiler, |
| 156 # especially in the optimized mode, tries very hard to keep | 161 # especially in the optimized mode, tries very hard to keep |
| 157 # values in x87 floating-point stack (in 80-bit precision) | 162 # values in x87 floating-point stack (in 80-bit precision) |
| 158 # as long as possible. This has important side effects, that | 163 # as long as possible. This has important side effects, that |
| 159 # the real value used in computation may change depending on | 164 # the real value used in computation may change depending on |
| (...skipping 13 matching lines...) Expand all Loading... |
| 173 # compiler optimized the code, since the value is always kept | 178 # compiler optimized the code, since the value is always kept |
| 174 # in its specified precision. | 179 # in its specified precision. |
| 175 'cflags': [ | 180 'cflags': [ |
| 176 '-m32', | 181 '-m32', |
| 177 '-pthread', | 182 '-pthread', |
| 178 '-march=pentium4', | 183 '-march=pentium4', |
| 179 '-fno-exceptions', | 184 '-fno-exceptions', |
| 180 '-msse2', | 185 '-msse2', |
| 181 '-mfpmath=sse', | 186 '-mfpmath=sse', |
| 182 '-Wall', | 187 '-Wall', |
| 183 # TODO(sgk): when chromium_code targets are clean of warnings. | 188 '<(werror)', # See note above about the werror variable. |
| 184 #'-Werror', | |
| 185 ], | 189 ], |
| 186 'ldflags': [ | 190 'ldflags': [ |
| 187 '-m32', | 191 '-m32', |
| 188 '-pthread', | 192 '-pthread', |
| 189 ], | 193 ], |
| 190 'scons_variable_settings': { | 194 'scons_variable_settings': { |
| 191 'LIBPATH': ['$LIB_DIR'], | 195 'LIBPATH': ['$LIB_DIR'], |
| 192 # Linking of large files uses lots of RAM, so serialize links | 196 # Linking of large files uses lots of RAM, so serialize links |
| 193 # using the handy flock command from util-linux. | 197 # using the handy flock command from util-linux. |
| 194 'FLOCK_LINK': ['flock', '$TOP_BUILDDIR/linker.lock', '$LINK'], | 198 'FLOCK_LINK': ['flock', '$TOP_BUILDDIR/linker.lock', '$LINK'], |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 251 'defines': [ | 255 'defines': [ |
| 252 '_DEBUG', | 256 '_DEBUG', |
| 253 ], | 257 ], |
| 254 'cflags': [ | 258 'cflags': [ |
| 255 '-O<(debug_optimize)', | 259 '-O<(debug_optimize)', |
| 256 '-g', | 260 '-g', |
| 257 ], | 261 ], |
| 258 'ldflags': [ | 262 'ldflags': [ |
| 259 '-rdynamic', # Allows backtrace to resolve symbols. | 263 '-rdynamic', # Allows backtrace to resolve symbols. |
| 260 ], | 264 ], |
| 261 » }, | 265 }, |
| 262 'Release': { | 266 'Release': { |
| 263 'cflags': [ | 267 'cflags': [ |
| 264 '-O2', | 268 '-O2', |
| 265 # Don't emit the GCC version ident directives, they just end up | 269 # Don't emit the GCC version ident directives, they just end up |
| 266 # in the .comment section taking up binary size. | 270 # in the .comment section taking up binary size. |
| 267 '-fno-ident', | 271 '-fno-ident', |
| 268 # Put data and code in their own sections, so that unused symbols | 272 # Put data and code in their own sections, so that unused symbols |
| 269 # can be removed at link time with --gc-sections. | 273 # can be removed at link time with --gc-sections. |
| 270 '-fdata-sections', | 274 '-fdata-sections', |
| 271 '-ffunction-sections', | 275 '-ffunction-sections', |
| (...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 429 # settings in target dicts. SYMROOT is a special case, because many other | 433 # settings in target dicts. SYMROOT is a special case, because many other |
| 430 # Xcode variables depend on it, including variables such as | 434 # Xcode variables depend on it, including variables such as |
| 431 # PROJECT_DERIVED_FILE_DIR. When a source group corresponding to something | 435 # PROJECT_DERIVED_FILE_DIR. When a source group corresponding to something |
| 432 # like PROJECT_DERIVED_FILE_DIR is added to a project, in order for the | 436 # like PROJECT_DERIVED_FILE_DIR is added to a project, in order for the |
| 433 # files to appear (when present) in the UI as actual files and not red | 437 # files to appear (when present) in the UI as actual files and not red |
| 434 # red "missing file" proxies, the correct path to PROJECT_DERIVED_FILE_DIR, | 438 # red "missing file" proxies, the correct path to PROJECT_DERIVED_FILE_DIR, |
| 435 # and therefore SYMROOT, needs to be set at the project level. | 439 # and therefore SYMROOT, needs to be set at the project level. |
| 436 'SYMROOT': '<(DEPTH)/xcodebuild', | 440 'SYMROOT': '<(DEPTH)/xcodebuild', |
| 437 }, | 441 }, |
| 438 } | 442 } |
| OLD | NEW |