Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 # Copyright 2012 the V8 project authors. All rights reserved. | 1 # Copyright 2012 the V8 project authors. All rights reserved. |
| 2 # Redistribution and use in source and binary forms, with or without | 2 # Redistribution and use in source and binary forms, with or without |
| 3 # modification, are permitted provided that the following conditions are | 3 # modification, are permitted provided that the following conditions are |
| 4 # met: | 4 # met: |
| 5 # | 5 # |
| 6 # * Redistributions of source code must retain the above copyright | 6 # * Redistributions of source code must retain the above copyright |
| 7 # notice, this list of conditions and the following disclaimer. | 7 # notice, this list of conditions and the following disclaimer. |
| 8 # * Redistributions in binary form must reproduce the above | 8 # * Redistributions in binary form must reproduce the above |
| 9 # copyright notice, this list of conditions and the following | 9 # copyright notice, this list of conditions and the following |
| 10 # disclaimer in the documentation and/or other materials provided | 10 # disclaimer in the documentation and/or other materials provided |
| (...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 145 'target_conditions': [ | 145 'target_conditions': [ |
| 146 ['_toolset=="target"', { | 146 ['_toolset=="target"', { |
| 147 'cflags': ['-mfloat-abi=hard',], | 147 'cflags': ['-mfloat-abi=hard',], |
| 148 }], | 148 }], |
| 149 ], | 149 ], |
| 150 }, { | 150 }, { |
| 151 'defines': [ | 151 'defines': [ |
| 152 'USE_EABI_HARDFLOAT=0', | 152 'USE_EABI_HARDFLOAT=0', |
| 153 ], | 153 ], |
| 154 }], | 154 }], |
| 155 # The ARM assembler assumes the host is 32 bits, | |
| 156 # so force building 32-bit host tools. | |
| 157 ['host_arch=="x64" or OS=="android"', { | |
| 158 'target_conditions': [ | |
| 159 ['_toolset=="host"', { | |
| 160 'cflags': ['-m32'], | |
| 161 'ldflags': ['-m32'], | |
| 162 }], | |
| 163 ], | |
| 164 }], | |
| 165 ], | 155 ], |
| 166 }], | 156 }], |
| 167 ['v8_target_arch=="ia32"', { | 157 ['v8_target_arch=="ia32"', { |
| 168 'defines': [ | 158 'defines': [ |
| 169 'V8_TARGET_ARCH_IA32', | 159 'V8_TARGET_ARCH_IA32', |
| 170 ], | 160 ], |
| 171 }], | 161 }], |
| 172 ['v8_target_arch=="mips"', { | 162 ['v8_target_arch=="mips"', { |
| 173 'defines': [ | 163 'defines': [ |
| 174 'V8_TARGET_ARCH_MIPS', | 164 'V8_TARGET_ARCH_MIPS', |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 216 'defines': [ | 206 'defines': [ |
| 217 '__mips_soft_float=1' | 207 '__mips_soft_float=1' |
| 218 ], | 208 ], |
| 219 }], | 209 }], |
| 220 ['mips_arch_variant=="mips32r2"', { | 210 ['mips_arch_variant=="mips32r2"', { |
| 221 'defines': ['_MIPS_ARCH_MIPS32R2',], | 211 'defines': ['_MIPS_ARCH_MIPS32R2',], |
| 222 }], | 212 }], |
| 223 ['mips_arch_variant=="loongson"', { | 213 ['mips_arch_variant=="loongson"', { |
| 224 'defines': ['_MIPS_ARCH_LOONGSON',], | 214 'defines': ['_MIPS_ARCH_LOONGSON',], |
| 225 }], | 215 }], |
| 226 # The MIPS assembler assumes the host is 32 bits, | |
| 227 # so force building 32-bit host tools. | |
| 228 ['host_arch=="x64"', { | |
| 229 'target_conditions': [ | |
| 230 ['_toolset=="host"', { | |
| 231 'cflags': ['-m32'], | |
| 232 'ldflags': ['-m32'], | |
| 233 }], | |
| 234 ], | |
| 235 }], | |
| 236 ], | 216 ], |
| 237 }], | 217 }], |
| 238 ['v8_target_arch=="x64"', { | 218 ['v8_target_arch=="x64"', { |
| 239 'defines': [ | 219 'defines': [ |
| 240 'V8_TARGET_ARCH_X64', | 220 'V8_TARGET_ARCH_X64', |
| 241 ], | 221 ], |
| 242 }], | 222 }], |
| 243 ], | 223 ], |
| 244 }, { # Section for OS=="mac". | 224 }, { # Section for OS=="mac". |
| 245 'conditions': [ | 225 'conditions': [ |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 283 ['OS=="win" and v8_target_arch=="x64"', { | 263 ['OS=="win" and v8_target_arch=="x64"', { |
| 284 'msvs_settings': { | 264 'msvs_settings': { |
| 285 'VCLinkerTool': { | 265 'VCLinkerTool': { |
| 286 'StackReserveSize': '2097152', | 266 'StackReserveSize': '2097152', |
| 287 }, | 267 }, |
| 288 }, | 268 }, |
| 289 }], | 269 }], |
| 290 ['OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="solaris" \ | 270 ['OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="solaris" \ |
| 291 or OS=="netbsd"', { | 271 or OS=="netbsd"', { |
| 292 'conditions': [ | 272 'conditions': [ |
| 293 [ 'v8_target_arch!="x64"', { | |
| 294 # Pass -m32 to the compiler iff it understands the flag. | |
| 295 'variables': { | |
| 296 'm32flag': '<!((echo | $(echo ${CXX:-$(which g++)}) -m32 -E - > /d ev/null 2>&1) && echo -n "-m32" || true)', | |
| 297 }, | |
| 298 'cflags': [ '<(m32flag)' ], | |
| 299 'ldflags': [ '<(m32flag)' ], | |
| 300 }], | |
| 301 [ 'v8_no_strict_aliasing==1', { | 273 [ 'v8_no_strict_aliasing==1', { |
| 302 'cflags': [ '-fno-strict-aliasing' ], | 274 'cflags': [ '-fno-strict-aliasing' ], |
| 303 }], | 275 }], |
| 304 ], # conditions | 276 ], # conditions |
| 305 }], | 277 }], |
| 306 ['OS=="solaris"', { | 278 ['OS=="solaris"', { |
| 307 'defines': [ '__C99FEATURES__=1' ], # isinf() etc. | 279 'defines': [ '__C99FEATURES__=1' ], # isinf() etc. |
| 308 }], | 280 }], |
| 281 ['v8_target_arch!="x64"', { | |
|
Jakob Kummerow
2012/05/15 14:05:34
The condition must check for OS as well, as the sh
yongsheng
2012/05/15 14:20:49
I'll change it.
yongsheng
2012/05/15 14:36:03
Sorry, I forget "Android". will add it.
| |
| 282 # Check whether the host compiler and target compiler support '-m32' opt ion and set it if yes | |
|
Jakob Kummerow
2012/05/15 14:05:34
nit: for comments, please keep the 80-col limit pe
yongsheng
2012/05/15 14:20:49
okay,thanks a lot for your review.
| |
| 283 # except that 'v8_target_arch'is x64 | |
| 284 'target_conditions': [ | |
| 285 ['_toolset=="host"', { | |
| 286 'variables': { | |
| 287 'm32flag': '<!((echo | $(echo ${CXX_host:-${CXX:-$(which g++)}}) - m32 -E - > /dev/null 2>&1) && echo -n "-m32" || true)', | |
| 288 }, | |
| 289 'cflags': [ '<(m32flag)' ], | |
| 290 'ldflags': [ '<(m32flag)' ], | |
| 291 }], | |
| 292 ['_toolset=="target"', { | |
| 293 'variables': { | |
| 294 'm32flag': '<!((echo | $(echo ${CXX_target:-${CXX:-$(which g++)}}) -m32 -E - > /dev/null 2>&1) && echo -n "-m32" || true)', | |
| 295 }, | |
| 296 'cflags': [ '<(m32flag)' ], | |
| 297 'ldflags': [ '<(m32flag)' ], | |
| 298 }], | |
| 299 ], | |
| 300 }], | |
| 309 ], # conditions | 301 ], # conditions |
| 310 'configurations': { | 302 'configurations': { |
| 311 'Debug': { | 303 'Debug': { |
| 312 'defines': [ | 304 'defines': [ |
| 313 'DEBUG', | 305 'DEBUG', |
| 314 'ENABLE_DISASSEMBLER', | 306 'ENABLE_DISASSEMBLER', |
| 315 'V8_ENABLE_CHECKS', | 307 'V8_ENABLE_CHECKS', |
| 316 'OBJECT_PRINT', | 308 'OBJECT_PRINT', |
| 317 ], | 309 ], |
| 318 'msvs_settings': { | 310 'msvs_settings': { |
| (...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 412 'OptimizeReferences': '2', | 404 'OptimizeReferences': '2', |
| 413 'EnableCOMDATFolding': '2', | 405 'EnableCOMDATFolding': '2', |
| 414 }, | 406 }, |
| 415 }, | 407 }, |
| 416 }], # OS=="win" | 408 }], # OS=="win" |
| 417 ], # conditions | 409 ], # conditions |
| 418 }, # Release | 410 }, # Release |
| 419 }, # configurations | 411 }, # configurations |
| 420 }, # target_defaults | 412 }, # target_defaults |
| 421 } | 413 } |
| OLD | NEW |