Re: [xml] -fexceptions
- From: Daniel Veillard <veillard redhat com>
- To: Graham Bennett <graham-libxml simulcra org>
- Cc: xml gnome org
- Subject: Re: [xml] -fexceptions
- Date: Mon, 28 Jul 2003 11:23:17 -0400
On Thu, Apr 03, 2003 at 07:21:29PM +0100, Graham Bennett wrote:
Hi,
Is there an easy way to enable the -fexceptions flag for gcc when
building libxml? If not, I think it would be worth adding to the
configure script (e.g. --with-exceptions). It would be very useful to
be able to throw from SAX callbacks when using libxml from C++.
Okay, I did look at this. I did some checks:
Compiled with -O2
gnome:~/XML -> ls -l .libs/libxml2.a .libs/libxml2.so.2.5.7
-rw-rw-r-- 1 veillard www 1136512 Jul 27 09:02 .libs/libxml2.a
-rwxrwxr-x 1 veillard www 1056727 Jul 27 09:02 .libs/libxml2.so.2.5.7*
gnome:~/XML -> ./xmllint --timing --stream db100000.xml
Parsing took 14399 ms
gnome:~/XML ->
Compiled with -O2 -fexceptions
gnome:~/XML -> ls -l .libs/libxml2.a .libs/libxml2.so.2.5.7
-rw-rw-r-- 1 veillard www 1216584 Jul 27 09:15 .libs/libxml2.a
-rwxrwxr-x 1 veillard www 1171039 Jul 27 09:15 .libs/libxml2.so.2.5.7*
gnome:~/XML -> ./xmllint --timing --stream db100000.xml
Parsing took 14334 ms
gnome:~/XML ->
I'm afraid that taking a 10+% hit on code size is a bit hard to justify
so I simply added this as an option to configure:
gnome:~/XML -> ./configure --help | grep exception
--with-fexceptions add GCC flag -fexceptions for C++ exceptions (off)
gnome:~/XML ->
which is kept off by default. I hope it's sufficient. It's in CVS now,
Daniel
--
Daniel Veillard | Red Hat Network https://rhn.redhat.com/
veillard redhat com | libxml GNOME XML XSLT toolkit http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]