Closed GoogleCodeExporter closed 9 years ago
Here is a patch that I've created from the search and replace that setup.py
does to v8's code. I cleaned it up a bit so there are only needed changes.
--- standalone.gypi.bak 2013-01-10 23:22:36.000000000 -0500
+++ standalone.gypi 2013-01-11 13:04:02.000000000 -0500
@@ -94,8 +94,7 @@
or OS=="netbsd"', {
'target_defaults': {
'cflags': [ '-Wall', '<(werror)', '-W', '-Wno-unused-parameter',
- '-Wnon-virtual-dtor', '-pthread', '-fno-rtti',
- '-fno-exceptions', '-pedantic' ],
+ '-Wnon-virtual-dtor', '-pthread', '-pedantic' ],
'ldflags': [ '-pthread', ],
'conditions': [
[ 'OS=="linux"', {
@@ -132,7 +131,7 @@
'MinimalRebuild': 'false',
'BufferSecurityCheck': 'true',
'EnableFunctionLevelLinking': 'true',
- 'RuntimeTypeInfo': 'false',
+ 'RuntimeTypeInfo': 'true',
'WarningLevel': '3',
'WarnAsError': 'true',
'DebugInformationFormat': '3',
@@ -144,7 +143,7 @@
['component=="shared_library"', {
'ExceptionHandling': '1', # /EHsc
}, {
- 'ExceptionHandling': '0',
+ 'ExceptionHandling': '1',
}],
],
},
@@ -184,8 +183,8 @@
'GCC_CW_ASM_SYNTAX': 'NO', # No -fasm-blocks
'GCC_DYNAMIC_NO_PIC': 'NO', # No -mdynamic-no-pic
# (Equivalent to -fPIC)
- 'GCC_ENABLE_CPP_EXCEPTIONS': 'NO', # -fno-exceptions
- 'GCC_ENABLE_CPP_RTTI': 'NO', # -fno-rtti
+ 'GCC_ENABLE_CPP_EXCEPTIONS': 'YES', # -fno-exceptions
+ 'GCC_ENABLE_CPP_RTTI': 'YES', # -fno-rtti
'GCC_ENABLE_PASCAL_STRINGS': 'NO', # No -mpascal-strings
# GCC_INLINES_ARE_PRIVATE_EXTERN maps to -fvisibility-inlines-hidden
'GCC_INLINES_ARE_PRIVATE_EXTERN': 'YES',
Original comment by rsimmo...@gmail.com
on 11 Jan 2013 at 6:07
I have gone ahead and submitted patches to the v8 project that add build
options for rtti=on and exceptions=on which are both required by pyv8 via
boost-python.
If these patches are accepted, there will be no need to patch the v8 source
tree in setup.py. I will submit the patches to make this change to pyv8 if the
other patches are accepted into v8.
This will bring pyv8 halfway to decoupling the build of pyv8 from v8 if the
user wants to. The next step is to add an option --skip-v8-build that skips
the private v8 build completely.
The patches that I submitted to v8 are in the following defect report:
http://code.google.com/p/v8/issues/detail?id=2482
Original comment by rsimmo...@gmail.com
on 12 Jan 2013 at 8:57
Original comment by flier...@gmail.com
on 13 Jan 2013 at 3:35
I have added a `v8build` command, which use the standalone build process
without private v8 build, you could just use `python setup.py v8build` to build
pyv8 with preinstalled v8 and boost.
For the diff file, I think if v8 team could add some options will be better,
thanks for your suggestion and patches :)
Original comment by flier...@gmail.com
on 15 Jan 2013 at 4:43
Original issue reported on code.google.com by
rsimmo...@gmail.com
on 10 Jan 2013 at 11:04