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 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
108 }, | 108 }, |
109 'debuggersupport:on': { | 109 'debuggersupport:on': { |
110 'CPPDEFINES': ['ENABLE_DEBUGGER_SUPPORT'], | 110 'CPPDEFINES': ['ENABLE_DEBUGGER_SUPPORT'], |
111 } | 111 } |
112 }, | 112 }, |
113 'gcc': { | 113 'gcc': { |
114 'all': { | 114 'all': { |
115 'CCFLAGS': ['$DIALECTFLAGS', '$WARNINGFLAGS'], | 115 'CCFLAGS': ['$DIALECTFLAGS', '$WARNINGFLAGS'], |
116 'CXXFLAGS': ['$CCFLAGS', '-fno-rtti', '-fno-exceptions'], | 116 'CXXFLAGS': ['$CCFLAGS', '-fno-rtti', '-fno-exceptions'], |
117 }, | 117 }, |
118 'visibility:hidden': { | |
119 # Use visibility=default to disable this | |
Erik Corry
2009/09/15 11:09:25
.
| |
120 'CXXFLAGS': ['-fvisibility=hidden'] | |
121 }, | |
118 'mode:debug': { | 122 'mode:debug': { |
119 'CCFLAGS': ['-g', '-O0'], | 123 'CCFLAGS': ['-g', '-O0'], |
120 'CPPDEFINES': ['ENABLE_DISASSEMBLER', 'DEBUG'], | 124 'CPPDEFINES': ['ENABLE_DISASSEMBLER', 'DEBUG'], |
121 'os:android': { | 125 'os:android': { |
122 'CCFLAGS': ['-mthumb'] | 126 'CCFLAGS': ['-mthumb'] |
123 } | 127 } |
124 }, | 128 }, |
125 'mode:release': { | 129 'mode:release': { |
126 'CCFLAGS': ['-O3', '-fomit-frame-pointer', '-fdata-sections', | 130 'CCFLAGS': ['-O3', '-fomit-frame-pointer', '-fdata-sections', |
127 '-ffunction-sections'], | 131 '-ffunction-sections'], |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
226 'ARFLAGS': ['/LTCG'], | 230 'ARFLAGS': ['/LTCG'], |
227 } | 231 } |
228 } | 232 } |
229 } | 233 } |
230 } | 234 } |
231 | 235 |
232 | 236 |
233 V8_EXTRA_FLAGS = { | 237 V8_EXTRA_FLAGS = { |
234 'gcc': { | 238 'gcc': { |
235 'all': { | 239 'all': { |
236 'CXXFLAGS': [], #['-fvisibility=hidden'], | |
237 'WARNINGFLAGS': ['-Wall', | 240 'WARNINGFLAGS': ['-Wall', |
238 '-Werror', | 241 '-Werror', |
239 '-W', | 242 '-W', |
240 '-Wno-unused-parameter', | 243 '-Wno-unused-parameter', |
241 '-Wnon-virtual-dtor'] | 244 '-Wnon-virtual-dtor'] |
242 }, | 245 }, |
243 'os:win32': { | 246 'os:win32': { |
244 'WARNINGFLAGS': ['-pedantic', '-Wno-long-long'] | 247 'WARNINGFLAGS': ['-pedantic', '-Wno-long-long'] |
245 }, | 248 }, |
246 'os:linux': { | 249 'os:linux': { |
(...skipping 375 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
622 }, | 625 }, |
623 'console': { | 626 'console': { |
624 'values': ['dumb', 'readline'], | 627 'values': ['dumb', 'readline'], |
625 'default': 'dumb', | 628 'default': 'dumb', |
626 'help': 'the console to use for the d8 shell' | 629 'help': 'the console to use for the d8 shell' |
627 }, | 630 }, |
628 'verbose': { | 631 'verbose': { |
629 'values': ['on', 'off'], | 632 'values': ['on', 'off'], |
630 'default': 'off', | 633 'default': 'off', |
631 'help': 'more output from compiler and linker' | 634 'help': 'more output from compiler and linker' |
635 }, | |
636 'visibility': { | |
637 'values': ['default', 'hidden'], | |
638 'default': 'hidden', | |
639 'help': 'shared library symbol visibility' | |
632 } | 640 } |
633 } | 641 } |
634 | 642 |
635 | 643 |
636 def GetOptions(): | 644 def GetOptions(): |
637 result = Options() | 645 result = Options() |
638 result.Add('mode', 'compilation mode (debug, release)', 'release') | 646 result.Add('mode', 'compilation mode (debug, release)', 'release') |
639 result.Add('sample', 'build sample (shell, process)', '') | 647 result.Add('sample', 'build sample (shell, process)', '') |
640 result.Add('env', 'override environment settings (NAME0:value0,NAME1:value1,.. .)', '') | 648 result.Add('env', 'override environment settings (NAME0:value0,NAME1:value1,.. .)', '') |
641 result.Add('importenv', 'import environment settings (NAME0,NAME1,...)', '') | 649 result.Add('importenv', 'import environment settings (NAME0,NAME1,...)', '') |
(...skipping 331 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
973 # version of scons. Also, there's a bug in some revisions that | 981 # version of scons. Also, there's a bug in some revisions that |
974 # doesn't allow this flag to be set, so we swallow any exceptions. | 982 # doesn't allow this flag to be set, so we swallow any exceptions. |
975 # Lovely. | 983 # Lovely. |
976 try: | 984 try: |
977 SetOption('warn', 'no-deprecated') | 985 SetOption('warn', 'no-deprecated') |
978 except: | 986 except: |
979 pass | 987 pass |
980 | 988 |
981 | 989 |
982 Build() | 990 Build() |
OLD | NEW |