| 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 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 174 'CPPDEFINES': ['V8_TARGET_ARCH_X64'], | 174 'CPPDEFINES': ['V8_TARGET_ARCH_X64'], |
| 175 'CCFLAGS': ['-m64'], | 175 'CCFLAGS': ['-m64'], |
| 176 'LINKFLAGS': ['-m64'], | 176 'LINKFLAGS': ['-m64'], |
| 177 }, | 177 }, |
| 178 'prof:oprofile': { | 178 'prof:oprofile': { |
| 179 'CPPDEFINES': ['ENABLE_OPROFILE_AGENT'] | 179 'CPPDEFINES': ['ENABLE_OPROFILE_AGENT'] |
| 180 } | 180 } |
| 181 }, | 181 }, |
| 182 'msvc': { | 182 'msvc': { |
| 183 'all': { | 183 'all': { |
| 184 'DIALECTFLAGS': ['/nologo'], | |
| 185 'CCFLAGS': ['$DIALECTFLAGS', '$WARNINGFLAGS'], | 184 'CCFLAGS': ['$DIALECTFLAGS', '$WARNINGFLAGS'], |
| 186 'CXXFLAGS': ['$CCFLAGS', '/GR-', '/Gy'], | 185 'CXXFLAGS': ['$CCFLAGS', '/GR-', '/Gy'], |
| 187 'CPPDEFINES': ['WIN32', '_USE_32BIT_TIME_T'], | 186 'CPPDEFINES': ['WIN32'], |
| 188 'LINKFLAGS': ['/NOLOGO', '/MACHINE:X86', '/INCREMENTAL:NO', | 187 'LINKFLAGS': ['/INCREMENTAL:NO', '/NXCOMPAT', '/IGNORE:4221'], |
| 189 '/NXCOMPAT', '/IGNORE:4221'], | |
| 190 'ARFLAGS': ['/NOLOGO'], | |
| 191 'CCPDBFLAGS': ['/Zi'] | 188 'CCPDBFLAGS': ['/Zi'] |
| 192 }, | 189 }, |
| 190 'verbose:off': { |
| 191 'DIALECTFLAGS': ['/nologo'], |
| 192 'ARFLAGS': ['/NOLOGO'] |
| 193 }, |
| 193 'arch:ia32': { | 194 'arch:ia32': { |
| 194 'CPPDEFINES': ['V8_TARGET_ARCH_IA32'] | 195 'CPPDEFINES': ['V8_TARGET_ARCH_IA32', '_USE_32BIT_TIME_T'], |
| 196 'LINKFLAGS': ['/MACHINE:X86'], |
| 197 'ARFLAGS': ['/MACHINE:X86'] |
| 198 }, |
| 199 'arch:x64': { |
| 200 'CPPDEFINES': ['V8_TARGET_ARCH_X64'], |
| 201 'LINKFLAGS': ['/MACHINE:X64'], |
| 202 'ARFLAGS': ['/MACHINE:X64'] |
| 195 }, | 203 }, |
| 196 'mode:debug': { | 204 'mode:debug': { |
| 197 'CCFLAGS': ['/Od', '/Gm'], | 205 'CCFLAGS': ['/Od', '/Gm'], |
| 198 'CPPDEFINES': ['_DEBUG', 'ENABLE_DISASSEMBLER', 'DEBUG'], | 206 'CPPDEFINES': ['_DEBUG', 'ENABLE_DISASSEMBLER', 'DEBUG'], |
| 199 'LINKFLAGS': ['/DEBUG'], | 207 'LINKFLAGS': ['/DEBUG'], |
| 200 'msvcrt:static': { | 208 'msvcrt:static': { |
| 201 'CCFLAGS': ['/MTd'] | 209 'CCFLAGS': ['/MTd'] |
| 202 }, | 210 }, |
| 203 'msvcrt:shared': { | 211 'msvcrt:shared': { |
| 204 'CCFLAGS': ['/MDd'] | 212 'CCFLAGS': ['/MDd'] |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 246 }, | 254 }, |
| 247 'os:macos': { | 255 'os:macos': { |
| 248 'WARNINGFLAGS': ['-pedantic'] | 256 'WARNINGFLAGS': ['-pedantic'] |
| 249 }, | 257 }, |
| 250 'disassembler:on': { | 258 'disassembler:on': { |
| 251 'CPPDEFINES': ['ENABLE_DISASSEMBLER'] | 259 'CPPDEFINES': ['ENABLE_DISASSEMBLER'] |
| 252 } | 260 } |
| 253 }, | 261 }, |
| 254 'msvc': { | 262 'msvc': { |
| 255 'all': { | 263 'all': { |
| 256 'WARNINGFLAGS': ['/W3', '/WX', '/wd4355', '/wd4800'] | 264 'WARNINGFLAGS': ['/WX', '/wd4355', '/wd4800'] |
| 257 }, | 265 }, |
| 258 'library:shared': { | 266 'arch:ia32': { |
| 259 'CPPDEFINES': ['BUILDING_V8_SHARED'], | 267 'WARNINGFLAGS': ['/W3'] |
| 260 'LIBS': ['winmm', 'ws2_32'] | 268 }, |
| 269 'arch:x64': { |
| 270 'WARNINGFLAGS': ['/W2'] |
| 261 }, | 271 }, |
| 262 'arch:arm': { | 272 'arch:arm': { |
| 263 'CPPDEFINES': ['V8_TARGET_ARCH_ARM'], | 273 'CPPDEFINES': ['V8_TARGET_ARCH_ARM'], |
| 264 # /wd4996 is to silence the warning about sscanf | 274 # /wd4996 is to silence the warning about sscanf |
| 265 # used by the arm simulator. | 275 # used by the arm simulator. |
| 266 'WARNINGFLAGS': ['/wd4996'] | 276 'WARNINGFLAGS': ['/wd4996'] |
| 267 }, | 277 }, |
| 268 'disassembler:on': { | 278 'disassembler:on': { |
| 269 'CPPDEFINES': ['ENABLE_DISASSEMBLER'] | 279 'CPPDEFINES': ['ENABLE_DISASSEMBLER'] |
| 270 } | 280 } |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 348 'msvc': { | 358 'msvc': { |
| 349 'all': { | 359 'all': { |
| 350 'CPPDEFINES': ['_HAS_EXCEPTIONS=0'], | 360 'CPPDEFINES': ['_HAS_EXCEPTIONS=0'], |
| 351 'LIBS': ['winmm', 'ws2_32'] | 361 'LIBS': ['winmm', 'ws2_32'] |
| 352 }, | 362 }, |
| 353 'library:shared': { | 363 'library:shared': { |
| 354 'CPPDEFINES': ['USING_V8_SHARED'] | 364 'CPPDEFINES': ['USING_V8_SHARED'] |
| 355 }, | 365 }, |
| 356 'arch:ia32': { | 366 'arch:ia32': { |
| 357 'CPPDEFINES': ['V8_TARGET_ARCH_IA32'] | 367 'CPPDEFINES': ['V8_TARGET_ARCH_IA32'] |
| 358 } | 368 }, |
| 369 'arch:x64': { |
| 370 'CPPDEFINES': ['V8_TARGET_ARCH_X64'] |
| 371 }, |
| 359 } | 372 } |
| 360 } | 373 } |
| 361 | 374 |
| 362 | 375 |
| 363 SAMPLE_FLAGS = { | 376 SAMPLE_FLAGS = { |
| 364 'all': { | 377 'all': { |
| 365 'CPPPATH': [join(abspath('.'), 'include')], | 378 'CPPPATH': [join(abspath('.'), 'include')], |
| 366 'LIBS': ['$LIBRARY'], | 379 'LIBS': ['$LIBRARY'], |
| 367 }, | 380 }, |
| 368 'gcc': { | 381 'gcc': { |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 413 'mode:debug': { | 426 'mode:debug': { |
| 414 'CCFLAGS': ['-g', '-O0'] | 427 'CCFLAGS': ['-g', '-O0'] |
| 415 }, | 428 }, |
| 416 'prof:oprofile': { | 429 'prof:oprofile': { |
| 417 'LIBPATH': ['/usr/lib32', '/usr/lib32/oprofile'], | 430 'LIBPATH': ['/usr/lib32', '/usr/lib32/oprofile'], |
| 418 'LIBS': ['opagent'] | 431 'LIBS': ['opagent'] |
| 419 } | 432 } |
| 420 }, | 433 }, |
| 421 'msvc': { | 434 'msvc': { |
| 422 'all': { | 435 'all': { |
| 436 'LIBS': ['winmm', 'ws2_32'] |
| 437 }, |
| 438 'verbose:off': { |
| 423 'CCFLAGS': ['/nologo'], | 439 'CCFLAGS': ['/nologo'], |
| 424 'LINKFLAGS': ['/nologo'], | 440 'LINKFLAGS': ['/NOLOGO'] |
| 425 'LIBS': ['winmm', 'ws2_32'] | 441 }, |
| 442 'verbose:on': { |
| 443 'LINKFLAGS': ['/VERBOSE'] |
| 426 }, | 444 }, |
| 427 'library:shared': { | 445 'library:shared': { |
| 428 'CPPDEFINES': ['USING_V8_SHARED'] | 446 'CPPDEFINES': ['USING_V8_SHARED'] |
| 429 }, | 447 }, |
| 430 'prof:on': { | 448 'prof:on': { |
| 431 'LINKFLAGS': ['/MAP'] | 449 'LINKFLAGS': ['/MAP'] |
| 432 }, | 450 }, |
| 433 'mode:release': { | 451 'mode:release': { |
| 434 'CCFLAGS': ['/O2'], | 452 'CCFLAGS': ['/O2'], |
| 435 'LINKFLAGS': ['/OPT:REF', '/OPT:ICF'], | 453 'LINKFLAGS': ['/OPT:REF', '/OPT:ICF'], |
| 436 'msvcrt:static': { | 454 'msvcrt:static': { |
| 437 'CCFLAGS': ['/MT'] | 455 'CCFLAGS': ['/MT'] |
| 438 }, | 456 }, |
| 439 'msvcrt:shared': { | 457 'msvcrt:shared': { |
| 440 'CCFLAGS': ['/MD'] | 458 'CCFLAGS': ['/MD'] |
| 441 }, | 459 }, |
| 442 'msvcltcg:on': { | 460 'msvcltcg:on': { |
| 443 'CCFLAGS': ['/GL'], | 461 'CCFLAGS': ['/GL'], |
| 444 'LINKFLAGS': ['/LTCG'], | 462 'LINKFLAGS': ['/LTCG'], |
| 445 } | 463 } |
| 446 }, | 464 }, |
| 447 'arch:ia32': { | 465 'arch:ia32': { |
| 448 'CPPDEFINES': ['V8_TARGET_ARCH_IA32'] | 466 'CPPDEFINES': ['V8_TARGET_ARCH_IA32'], |
| 467 'LINKFLAGS': ['/MACHINE:X86'] |
| 468 }, |
| 469 'arch:x64': { |
| 470 'CPPDEFINES': ['V8_TARGET_ARCH_X64'], |
| 471 'LINKFLAGS': ['/MACHINE:X64'] |
| 449 }, | 472 }, |
| 450 'mode:debug': { | 473 'mode:debug': { |
| 451 'CCFLAGS': ['/Od'], | 474 'CCFLAGS': ['/Od'], |
| 452 'LINKFLAGS': ['/DEBUG'], | 475 'LINKFLAGS': ['/DEBUG'], |
| 453 'msvcrt:static': { | 476 'msvcrt:static': { |
| 454 'CCFLAGS': ['/MTd'] | 477 'CCFLAGS': ['/MTd'] |
| 455 }, | 478 }, |
| 456 'msvcrt:shared': { | 479 'msvcrt:shared': { |
| 457 'CCFLAGS': ['/MDd'] | 480 'CCFLAGS': ['/MDd'] |
| 458 } | 481 } |
| (...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 581 }, | 604 }, |
| 582 'sourcesignatures': { | 605 'sourcesignatures': { |
| 583 'values': ['MD5', 'timestamp'], | 606 'values': ['MD5', 'timestamp'], |
| 584 'default': 'MD5', | 607 'default': 'MD5', |
| 585 'help': 'set how the build system detects file changes' | 608 'help': 'set how the build system detects file changes' |
| 586 }, | 609 }, |
| 587 'console': { | 610 'console': { |
| 588 'values': ['dumb', 'readline'], | 611 'values': ['dumb', 'readline'], |
| 589 'default': 'dumb', | 612 'default': 'dumb', |
| 590 'help': 'the console to use for the d8 shell' | 613 'help': 'the console to use for the d8 shell' |
| 614 }, |
| 615 'verbose': { |
| 616 'values': ['on', 'off'], |
| 617 'default': 'off', |
| 618 'help': 'more output from compiler and linker' |
| 591 } | 619 } |
| 592 } | 620 } |
| 593 | 621 |
| 594 | 622 |
| 595 def GetOptions(): | 623 def GetOptions(): |
| 596 result = Options() | 624 result = Options() |
| 597 result.Add('mode', 'compilation mode (debug, release)', 'release') | 625 result.Add('mode', 'compilation mode (debug, release)', 'release') |
| 598 result.Add('sample', 'build sample (shell, process)', '') | 626 result.Add('sample', 'build sample (shell, process)', '') |
| 599 result.Add('env', 'override environment settings (NAME0:value0,NAME1:value1,..
.)', '') | 627 result.Add('env', 'override environment settings (NAME0:value0,NAME1:value1,..
.)', '') |
| 600 result.Add('importenv', 'import environment settings (NAME0,NAME1,...)', '') | 628 result.Add('importenv', 'import environment settings (NAME0,NAME1,...)', '') |
| (...skipping 327 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 928 # version of scons. Also, there's a bug in some revisions that | 956 # version of scons. Also, there's a bug in some revisions that |
| 929 # doesn't allow this flag to be set, so we swallow any exceptions. | 957 # doesn't allow this flag to be set, so we swallow any exceptions. |
| 930 # Lovely. | 958 # Lovely. |
| 931 try: | 959 try: |
| 932 SetOption('warn', 'no-deprecated') | 960 SetOption('warn', 'no-deprecated') |
| 933 except: | 961 except: |
| 934 pass | 962 pass |
| 935 | 963 |
| 936 | 964 |
| 937 Build() | 965 Build() |
| OLD | NEW |