[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: [PATCH] dynamically link swig runtime on windows (Can I commit this?)

From: Russell Yanofsky <rey4_at_columbia.edu>
Date: 2003-08-01 07:58:44 CEST

Branko Čibej wrote:
> Russell Yanofsky wrote:
>
>> I was recently given commit access for the swig bindings, but I'd
>> like to check in some changes to the build generator. A patch is
>> attached. Is it ok for me to check this in?
>>
>> Log Message:
>>
>> Changed Visual Studio builds of SWIG bindings to dynamically link
>> with the SWIG runtime instead of statically linking with it.
>> (Makefile builds already do this). This is needed because the
>> SWIG runtime functions read and write global data. When static
>> linking is used each module gets its own incomplete copy of the
>> global data, now data is shared and accessible to all modules.
>>
>> Also some other minor changes:
>> - solution and workspace files list projects in alphabetical
>> order instead of in random order
>> - solution file no longer refers to non-existant __INSTALLER__
>> project
>>
> Two things:
>
> * These are (at least) two separate patches. The "some other minor
> changes" have nothing to do with the SWIG runtime.

Agreed.

> * Lose the gen_swig_runtime batch file, it's horrible. Instead of
> generating those files during build time, just generate
> appropriate references to the sources in the .dsp and .vcproj
> files. There's no need at all to copy the runtime sources
> anywhere.

AFAICT, that's not possible. The source files in the swig directory are just
fragments of C code. They have to be copied together in order to be
compilable.

> Then add a '--with-swig=DIR' option to gen-make.py,
> and only generate the __SWIG_*__ projects if it's set (take a
> look at how '--with-httpd' does that for the Apache modules).

This was the first approach I took, but it turned out to be unneccessary
since you can get the path to the swig libraries either by running
"swig -libdir" or by reading the SWIG_LIB environment variable.

- Russ

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Fri Aug 1 08:00:09 2003

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.