delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin-developers/2002/07/27/17:16:42

Mailing-List: contact cygwin-developers-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-developers-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin-developers/>
List-Post: <mailto:cygwin-developers AT cygwin DOT com>
List-Help: <mailto:cygwin-developers-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-developers-owner AT cygwin DOT com
Delivered-To: mailing list cygwin-developers AT cygwin DOT com
Date: Sat, 27 Jul 2002 17:16:53 -0400
From: Christopher Faylor <cgf AT redhat DOT com>
To: cygwin-developers AT cygwin DOT com
Subject: Re: -fno-rtti
Message-ID: <20020727211653.GA8923@redhat.com>
Reply-To: cygwin-developers AT cygwin DOT com
Mail-Followup-To: cygwin-developers AT cygwin DOT com
References: <028701c235ac$b1c303f0$6132bc3e AT BABEL>
Mime-Version: 1.0
In-Reply-To: <028701c235ac$b1c303f0$6132bc3e@BABEL>
User-Agent: Mutt/1.3.23.1i

On Sat, Jul 27, 2002 at 09:32:14PM +0100, Conrad Scott wrote:
>Is there any strong reason currently to use the -fno-rtti flag in
>building the cygwin DLL?  AFAICT from the archives, the reasons have
>been to do with executable size.  From a quick test, it seems to make
>no more than a small difference in the size of the DLL (less than 1%)
>and doesn't seem to change the run-time size of objects (tho' this
>wasn't a very scientific test).  Also, the DLL seems to work fine when
>compiled with rtti.
>
>The main reason for asking (other than my usual simple minded
>curiosity) is that I would like to use dynamic_cast in some cygserver
>code I'm writing.  If the decision is to keep the -fno-rtti flag for
>the DLL, I can build the objects for the cygserver executable with rtti
>(which I'm assuming wouldn't be a problem), but given the intertwining
>of the code base, it might be "cleaner" to compile it all up with the
>same set of flags.

The Cygwin DLL has always used "c++ lite".  Part of the reason was that
g++ didn't work too well when cygwin was first conceived so things like
dynamic casts and exceptions were to be avoided.  Part of the reason
was that the original developer was teaching himself c++ when he initially
wrote cygwin.

There is also the issue of impacting dll size and speed with some
features like rtti.  It means that we use malloc in most cases where a
normal c++ program would use new.  We use small_printf rather than
trying to adapt some kind of cout mechanism.

My preference would be for you to avoid the use of this feature.  9k is
9k.  We already seem to grow and slow the dll with each release.  I'd
rather not make a conscious decision to do this when it can be avoided.

cgf

- Raw text -


  webmaster     delorie software   privacy  
  Copyright 2019   by DJ Delorie     Updated Jul 2019