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 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
80 }], | 80 }], |
81 [ 'OS=="win"', { | 81 [ 'OS=="win"', { |
82 'configuration_platform': 'Win32', | 82 'configuration_platform': 'Win32', |
83 'msvs_props': ['release.vsprops'], | 83 'msvs_props': ['release.vsprops'], |
84 }], | 84 }], |
85 ], | 85 ], |
86 }, | 86 }, |
87 }, | 87 }, |
88 }, | 88 }, |
89 'conditions': [ | 89 'conditions': [ |
| 90 [ 'OS=="linux"', { |
| 91 'target_defaults': { |
| 92 'asflags': [ |
| 93 # Needed so that libs with .s files (e.g. libicudata.a) |
| 94 # are compatible with the general 32-bit-ness. |
| 95 '-32', |
| 96 ], |
| 97 # All floating-point computations on x87 happens in 80-bit |
| 98 # precision. Because the C and C++ language standards allow |
| 99 # the compiler to keep the floating-point values in higher |
| 100 # precision than what's specified in the source and doing so |
| 101 # is more efficient than constantly rounding up to 64-bit or |
| 102 # 32-bit precision as specified in the source, the compiler, |
| 103 # especially in the optimized mode, tries very hard to keep |
| 104 # values in x87 floating-point stack (in 80-bit precision) |
| 105 # as long as possible. This has important side effects, that |
| 106 # the real value used in computation may change depending on |
| 107 # how the compiler did the optimization - that is, the value |
| 108 # kept in 80-bit is different than the value rounded down to |
| 109 # 64-bit or 32-bit. There are possible compiler options to make |
| 110 # this behavior consistent (e.g. -ffloat-store would keep all |
| 111 # floating-values in the memory, thus force them to be rounded |
| 112 # to its original precision) but they have significant runtime |
| 113 # performance penalty. |
| 114 # |
| 115 # -mfpmath=sse -msse2 makes the compiler use SSE instructions |
| 116 # which keep floating-point values in SSE registers in its |
| 117 # native precision (32-bit for single precision, and 64-bit for |
| 118 # double precision values). This means the floating-point value |
| 119 # used during computation does not change depending on how the |
| 120 # compiler optimized the code, since the value is always kept |
| 121 # in its specified precision. |
| 122 'cflags': [ |
| 123 '-m32', |
| 124 '-pthread', |
| 125 '-march=pentium4', |
| 126 '-fno-exceptions', |
| 127 '-msse2', |
| 128 '-mfpmath=sse', |
| 129 ], |
| 130 'linkflags': [ |
| 131 '-m32', |
| 132 '-pthread', |
| 133 ], |
| 134 'scons_settings': { |
| 135 'LIBPATH': ['$DESTINATION_ROOT/lib'], |
| 136 # Linking of large files uses lots of RAM, so serialize links |
| 137 # using the handy flock command from util-linux. |
| 138 'FLOCK_LINK': ['flock', '$DESTINATION_ROOT/linker.lock', '$LINK'], |
| 139 |
| 140 # We have several cases where archives depend on each other in |
| 141 # a cyclic fashion. Since the GNU linker does only a single |
| 142 # pass over the archives we surround the libraries with |
| 143 # --start-group and --end-group (aka -( and -) ). That causes |
| 144 # ld to loop over the group until no more undefined symbols |
| 145 # are found. In an ideal world we would only make groups from |
| 146 # those libraries which we knew to be in cycles. However, |
| 147 # that's tough with SCons, so we bodge it by making all the |
| 148 # archives a group by redefining the linking command here. |
| 149 # |
| 150 # TODO: investigate whether we still have cycles that |
| 151 # require --{start,end}-group. There has been a lot of |
| 152 # refactoring since this was first coded, which might have |
| 153 # eliminated the circular dependencies. |
| 154 'LINKCOM': [['$FLOCK_LINK', '-o', '$TARGET', '$LINKFLAGS', '$SOURCES',
'$_LIBDIRFLAGS', '-Wl,--start-group', '$_LIBFLAGS', '-Wl,--end-group']], |
| 155 'SHLINKCOM': [['$FLOCK_LINK', '-o', '$TARGET $SHLIN', 'FLAGS', '$SOURC
ES', '$_LIBDIRFLAGS', '-Wl,--start-group', '$_LIBFLAGS', '-Wl,--end-group']], |
| 156 'IMPLICIT_COMMAND_DEPENDENCIES': 0, |
| 157 }, |
| 158 }, |
| 159 }], |
90 ['OS=="mac"', { | 160 ['OS=="mac"', { |
91 'target_defaults': { | 161 'target_defaults': { |
92 'mac_bundle': 0, | 162 'mac_bundle': 0, |
93 'xcode_settings': { | 163 'xcode_settings': { |
94 'ALWAYS_SEARCH_USER_PATHS': 'NO', | 164 'ALWAYS_SEARCH_USER_PATHS': 'NO', |
95 'GCC_C_LANGUAGE_STANDARD': 'c99', | 165 'GCC_C_LANGUAGE_STANDARD': 'c99', |
96 'GCC_CW_ASM_SYNTAX': 'NO', | 166 'GCC_CW_ASM_SYNTAX': 'NO', |
97 'GCC_DYNAMIC_NO_PIC': 'YES', | 167 'GCC_DYNAMIC_NO_PIC': 'YES', |
98 'GCC_ENABLE_PASCAL_STRINGS': 'NO', | 168 'GCC_ENABLE_PASCAL_STRINGS': 'NO', |
99 'GCC_INLINES_ARE_PRIVATE_EXTERN': 'YES', | 169 'GCC_INLINES_ARE_PRIVATE_EXTERN': 'YES', |
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
228 # settings in target dicts. SYMROOT is a special case, because many other | 298 # settings in target dicts. SYMROOT is a special case, because many other |
229 # Xcode variables depend on it, including variables such as | 299 # Xcode variables depend on it, including variables such as |
230 # PROJECT_DERIVED_FILE_DIR. When a source group corresponding to something | 300 # PROJECT_DERIVED_FILE_DIR. When a source group corresponding to something |
231 # like PROJECT_DERIVED_FILE_DIR is added to a project, in order for the | 301 # like PROJECT_DERIVED_FILE_DIR is added to a project, in order for the |
232 # files to appear (when present) in the UI as actual files and not red | 302 # files to appear (when present) in the UI as actual files and not red |
233 # red "missing file" proxies, the correct path to PROJECT_DERIVED_FILE_DIR, | 303 # red "missing file" proxies, the correct path to PROJECT_DERIVED_FILE_DIR, |
234 # and therefore SYMROOT, needs to be set at the project level. | 304 # and therefore SYMROOT, needs to be set at the project level. |
235 'SYMROOT': '<(DEPTH)/xcodebuild', | 305 'SYMROOT': '<(DEPTH)/xcodebuild', |
236 }, | 306 }, |
237 } | 307 } |
OLD | NEW |