| OLD | NEW |
| 1 # Copyright 2008 the V8 project authors. All rights reserved. | 1 # Copyright 2008 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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 47 'CXXFLAGS': ['$CCFLAGS', '-fno-rtti', '-fno-exceptions'], | 47 'CXXFLAGS': ['$CCFLAGS', '-fno-rtti', '-fno-exceptions'], |
| 48 'LIBS': ['pthread'] | 48 'LIBS': ['pthread'] |
| 49 }, | 49 }, |
| 50 'mode:debug': { | 50 'mode:debug': { |
| 51 'CCFLAGS': ['-g', '-O0'], | 51 'CCFLAGS': ['-g', '-O0'], |
| 52 'CPPDEFINES': ['ENABLE_DISASSEMBLER', 'DEBUG'] | 52 'CPPDEFINES': ['ENABLE_DISASSEMBLER', 'DEBUG'] |
| 53 }, | 53 }, |
| 54 'mode:release': { | 54 'mode:release': { |
| 55 'CCFLAGS': ['-O3', '-fomit-frame-pointer'] | 55 'CCFLAGS': ['-O3', '-fomit-frame-pointer'] |
| 56 }, | 56 }, |
| 57 'os:freebsd': { |
| 58 'LIBS': ['execinfo'] |
| 59 }, |
| 57 'wordsize:64': { | 60 'wordsize:64': { |
| 58 'CCFLAGS': ['-m32'], | 61 'CCFLAGS': ['-m32'], |
| 59 'LINKFLAGS': ['-m32'] | 62 'LINKFLAGS': ['-m32'] |
| 60 } | 63 } |
| 61 }, | 64 }, |
| 62 'msvc': { | 65 'msvc': { |
| 63 'all': { | 66 'all': { |
| 64 'DIALECTFLAGS': ['/nologo'], | 67 'DIALECTFLAGS': ['/nologo'], |
| 65 'CCFLAGS': ['$DIALECTFLAGS', '$WARNINGFLAGS'], | 68 'CCFLAGS': ['$DIALECTFLAGS', '$WARNINGFLAGS'], |
| 66 'CXXFLAGS': ['$CCFLAGS', '/GR-', '/Gy'], | 69 'CXXFLAGS': ['$CCFLAGS', '/GR-', '/Gy'], |
| (...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 179 SAMPLE_FLAGS = { | 182 SAMPLE_FLAGS = { |
| 180 'all': { | 183 'all': { |
| 181 'CPPPATH': [join(abspath('.'), 'include')], | 184 'CPPPATH': [join(abspath('.'), 'include')], |
| 182 'LIBS': ['$LIBRARY'], | 185 'LIBS': ['$LIBRARY'], |
| 183 }, | 186 }, |
| 184 'gcc': { | 187 'gcc': { |
| 185 'all': { | 188 'all': { |
| 186 'LIBS': ['pthread'], | 189 'LIBS': ['pthread'], |
| 187 'LIBPATH': ['.'] | 190 'LIBPATH': ['.'] |
| 188 }, | 191 }, |
| 192 'os:freebsd': { |
| 193 'LIBS': ['execinfo'] |
| 194 }, |
| 189 'wordsize:64': { | 195 'wordsize:64': { |
| 190 'CCFLAGS': ['-m32'], | 196 'CCFLAGS': ['-m32'], |
| 191 'LINKFLAGS': ['-m32'] | 197 'LINKFLAGS': ['-m32'] |
| 192 }, | 198 }, |
| 193 'mode:release': { | 199 'mode:release': { |
| 194 'CCFLAGS': ['-O2'] | 200 'CCFLAGS': ['-O2'] |
| 195 }, | 201 }, |
| 196 'mode:debug': { | 202 'mode:debug': { |
| 197 'CCFLAGS': ['-g', '-O0'] | 203 'CCFLAGS': ['-g', '-O0'] |
| 198 } | 204 } |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 257 WORDSIZE_GUESS = utils.GuessWordsize() | 263 WORDSIZE_GUESS = utils.GuessWordsize() |
| 258 | 264 |
| 259 | 265 |
| 260 SIMPLE_OPTIONS = { | 266 SIMPLE_OPTIONS = { |
| 261 'toolchain': { | 267 'toolchain': { |
| 262 'values': ['gcc', 'msvc'], | 268 'values': ['gcc', 'msvc'], |
| 263 'default': TOOLCHAIN_GUESS, | 269 'default': TOOLCHAIN_GUESS, |
| 264 'help': 'the toolchain to use' | 270 'help': 'the toolchain to use' |
| 265 }, | 271 }, |
| 266 'os': { | 272 'os': { |
| 267 'values': ['linux', 'macos', 'win32'], | 273 'values': ['freebsd', 'linux', 'macos', 'win32'], |
| 268 'default': OS_GUESS, | 274 'default': OS_GUESS, |
| 269 'help': 'the os to build for' | 275 'help': 'the os to build for' |
| 270 }, | 276 }, |
| 271 'arch': { | 277 'arch': { |
| 272 'values':['arm', 'ia32'], | 278 'values':['arm', 'ia32'], |
| 273 'default': ARCH_GUESS, | 279 'default': ARCH_GUESS, |
| 274 'help': 'the architecture to build for' | 280 'help': 'the architecture to build for' |
| 275 }, | 281 }, |
| 276 'snapshot': { | 282 'snapshot': { |
| 277 'values': ['on', 'off'], | 283 'values': ['on', 'off'], |
| (...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 534 context = BuildSpecific(env.Copy(), mode, env_overrides) | 540 context = BuildSpecific(env.Copy(), mode, env_overrides) |
| 535 libraries += context.library_targets | 541 libraries += context.library_targets |
| 536 cctests += context.cctest_targets | 542 cctests += context.cctest_targets |
| 537 samples += context.sample_targets | 543 samples += context.sample_targets |
| 538 d8s += context.d8_targets | 544 d8s += context.d8_targets |
| 539 | 545 |
| 540 env.Alias('library', libraries) | 546 env.Alias('library', libraries) |
| 541 env.Alias('cctests', cctests) | 547 env.Alias('cctests', cctests) |
| 542 env.Alias('sample', samples) | 548 env.Alias('sample', samples) |
| 543 env.Alias('d8', d8s) | 549 env.Alias('d8', d8s) |
| 544 | 550 |
| 545 if env['sample']: | 551 if env['sample']: |
| 546 env.Default('sample') | 552 env.Default('sample') |
| 547 else: | 553 else: |
| 548 env.Default('library') | 554 env.Default('library') |
| 549 | 555 |
| 550 | 556 |
| 551 # We disable deprecation warnings because we need to be able to use | 557 # We disable deprecation warnings because we need to be able to use |
| 552 # env.Copy without getting warnings for compatibility with older | 558 # env.Copy without getting warnings for compatibility with older |
| 553 # version of scons. Also, there's a bug in some revisions that | 559 # version of scons. Also, there's a bug in some revisions that |
| 554 # doesn't allow this flag to be set, so we swallow any exceptions. | 560 # doesn't allow this flag to be set, so we swallow any exceptions. |
| 555 # Lovely. | 561 # Lovely. |
| 556 try: | 562 try: |
| 557 SetOption('warn', 'no-deprecated') | 563 SetOption('warn', 'no-deprecated') |
| 558 except: | 564 except: |
| 559 pass | 565 pass |
| 560 | 566 |
| 561 | 567 |
| 562 Build() | 568 Build() |
| OLD | NEW |