Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(68)

Side by Side Diff: SConstruct

Issue 155085: Separate native and interpreted regexp by compile time flag, not runtime. (Closed)
Patch Set: Addressed review comments. Adapted builds scripts. Created 11 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | src/flag-definitions.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 '-Wl,--gc-sections', 88 '-Wl,--gc-sections',
89 '-Wl,-z,nocopyreloc', 89 '-Wl,-z,nocopyreloc',
90 '-Wl,-rpath-link=' + ANDROID_TOP + '/out/target/product/gen eric/obj/lib', 90 '-Wl,-rpath-link=' + ANDROID_TOP + '/out/target/product/gen eric/obj/lib',
91 ANDROID_TOP + '/out/target/product/generic/obj/lib/crtbegin _dynamic.o', 91 ANDROID_TOP + '/out/target/product/generic/obj/lib/crtbegin _dynamic.o',
92 ANDROID_TOP + '/prebuilt/linux-x86/toolchain/arm-eabi-4.2.1 /lib/gcc/arm-eabi/4.2.1/interwork/libgcc.a', 92 ANDROID_TOP + '/prebuilt/linux-x86/toolchain/arm-eabi-4.2.1 /lib/gcc/arm-eabi/4.2.1/interwork/libgcc.a',
93 ANDROID_TOP + '/out/target/product/generic/obj/lib/crtend_a ndroid.o']; 93 ANDROID_TOP + '/out/target/product/generic/obj/lib/crtend_a ndroid.o'];
94 94
95 LIBRARY_FLAGS = { 95 LIBRARY_FLAGS = {
96 'all': { 96 'all': {
97 'CPPDEFINES': ['ENABLE_LOGGING_AND_PROFILING'], 97 'CPPDEFINES': ['ENABLE_LOGGING_AND_PROFILING'],
98 'CPPPATH': [join(root_dir, 'src')] 98 'CPPPATH': [join(root_dir, 'src')],
99 'regexp:native': {
100 'arch:ia32' : {
101 'CPPDEFINES': ['V8_NATIVE_REGEXP']
102 }
103 }
99 }, 104 },
100 'gcc': { 105 'gcc': {
101 'all': { 106 'all': {
102 'CCFLAGS': ['$DIALECTFLAGS', '$WARNINGFLAGS'], 107 'CCFLAGS': ['$DIALECTFLAGS', '$WARNINGFLAGS'],
103 'CXXFLAGS': ['$CCFLAGS', '-fno-rtti', '-fno-exceptions'], 108 'CXXFLAGS': ['$CCFLAGS', '-fno-rtti', '-fno-exceptions'],
104 }, 109 },
105 'mode:debug': { 110 'mode:debug': {
106 'CCFLAGS': ['-g', '-O0'], 111 'CCFLAGS': ['-g', '-O0'],
107 'CPPDEFINES': ['ENABLE_DISASSEMBLER', 'DEBUG'], 112 'CPPDEFINES': ['ENABLE_DISASSEMBLER', 'DEBUG'],
108 'os:android': { 113 'os:android': {
(...skipping 430 matching lines...) Expand 10 before | Expand all | Expand 10 after
539 'os': { 544 'os': {
540 'values': ['freebsd', 'linux', 'macos', 'win32', 'android'], 545 'values': ['freebsd', 'linux', 'macos', 'win32', 'android'],
541 'default': OS_GUESS, 546 'default': OS_GUESS,
542 'help': 'the os to build for (' + OS_GUESS + ')' 547 'help': 'the os to build for (' + OS_GUESS + ')'
543 }, 548 },
544 'arch': { 549 'arch': {
545 'values':['arm', 'ia32', 'x64'], 550 'values':['arm', 'ia32', 'x64'],
546 'default': ARCH_GUESS, 551 'default': ARCH_GUESS,
547 'help': 'the architecture to build for (' + ARCH_GUESS + ')' 552 'help': 'the architecture to build for (' + ARCH_GUESS + ')'
548 }, 553 },
554 'regexp': {
555 'values': ['native', 'interpreted'],
556 'default': 'native',
557 'help': 'Whether to use native or interpreted regexp implementation'
558 },
549 'snapshot': { 559 'snapshot': {
550 'values': ['on', 'off', 'nobuild'], 560 'values': ['on', 'off', 'nobuild'],
551 'default': 'off', 561 'default': 'off',
552 'help': 'build using snapshots for faster start-up' 562 'help': 'build using snapshots for faster start-up'
553 }, 563 },
554 'prof': { 564 'prof': {
555 'values': ['on', 'off', 'oprofile'], 565 'values': ['on', 'off', 'oprofile'],
556 'default': 'off', 566 'default': 'off',
557 'help': 'enable profiling of build target' 567 'help': 'enable profiling of build target'
558 }, 568 },
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
670 Abort("Illegal value for option %s '%s'." % (option, s)) 680 Abort("Illegal value for option %s '%s'." % (option, s))
671 return False 681 return False
672 return True 682 return True
673 683
674 684
675 def VerifyOptions(env): 685 def VerifyOptions(env):
676 if not IsLegal(env, 'mode', ['debug', 'release']): 686 if not IsLegal(env, 'mode', ['debug', 'release']):
677 return False 687 return False
678 if not IsLegal(env, 'sample', ["shell", "process"]): 688 if not IsLegal(env, 'sample', ["shell", "process"]):
679 return False 689 return False
690 if not IsLegal(env, 'regexp', ["native", "interpreted"]):
691 return False
680 if env['os'] == 'win32' and env['library'] == 'shared' and env['prof'] == 'on' : 692 if env['os'] == 'win32' and env['library'] == 'shared' and env['prof'] == 'on' :
681 Abort("Profiling on windows only supported for static library.") 693 Abort("Profiling on windows only supported for static library.")
682 if env['prof'] == 'oprofile' and env['os'] != 'linux': 694 if env['prof'] == 'oprofile' and env['os'] != 'linux':
683 Abort("OProfile is only supported on Linux.") 695 Abort("OProfile is only supported on Linux.")
684 if env['os'] == 'win32' and env['soname'] == 'on': 696 if env['os'] == 'win32' and env['soname'] == 'on':
685 Abort("Shared Object soname not applicable for Windows.") 697 Abort("Shared Object soname not applicable for Windows.")
686 if env['soname'] == 'on' and env['library'] == 'static': 698 if env['soname'] == 'on' and env['library'] == 'static':
687 Abort("Shared Object soname not applicable for static library.") 699 Abort("Shared Object soname not applicable for static library.")
688 for (name, option) in SIMPLE_OPTIONS.iteritems(): 700 for (name, option) in SIMPLE_OPTIONS.iteritems():
689 if (not option.get('default')) and (name not in ARGUMENTS): 701 if (not option.get('default')) and (name not in ARGUMENTS):
(...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after
926 # version of scons. Also, there's a bug in some revisions that 938 # version of scons. Also, there's a bug in some revisions that
927 # doesn't allow this flag to be set, so we swallow any exceptions. 939 # doesn't allow this flag to be set, so we swallow any exceptions.
928 # Lovely. 940 # Lovely.
929 try: 941 try:
930 SetOption('warn', 'no-deprecated') 942 SetOption('warn', 'no-deprecated')
931 except: 943 except:
932 pass 944 pass
933 945
934 946
935 Build() 947 Build()
OLDNEW
« no previous file with comments | « no previous file | src/flag-definitions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698