You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Branko Čibej <br...@xbc.nu> on 2003/08/01 05:05:12 UTC
Re: [PATCH] dynamically link swig runtime on windows (Can I commit
this?)
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.
* 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. 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).
--
Brane Čibej <br...@xbc.nu> http://www.xbc.nu/brane/
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: [PATCH] dynamically link swig runtime on windows (Can I commit
this?)
Posted by Brandon Ehle <az...@yahoo.com>.
>
>
>>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.
>>
>>
>>
>Great, that makes gen-make.py's job even easier. I'd still like to see
>at least a '--with-swig' option (IMHO the default should be to not
>generate projects for the bindings, so that we don't have yet another
>hard dependency in the Win32 build), but that can be added later in
>another patch.
>
>
>
>
I've already got a patch that does this, will clean it up and submit it
tomorrow.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: [PATCH] dynamically link swig runtime on windows (Can I commit
this?)
Posted by Branko Čibej <br...@xbc.nu>.
Russell Yanofsky wrote:
>Branko Čibej wrote:
>
>
>> * 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.
>
Ah. O.K., then just generate them from gen_win.py.
>>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.
>
Great, that makes gen-make.py's job even easier. I'd still like to see
at least a '--with-swig' option (IMHO the default should be to not
generate projects for the bindings, so that we don't have yet another
hard dependency in the Win32 build), but that can be added later in
another patch.
--
Brane Čibej <br...@xbc.nu> http://www.xbc.nu/brane/
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: [PATCH] dynamically link swig runtime on windows (Can I commit this?)
Posted by Russell Yanofsky <re...@columbia.edu>.
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