[Python-Dev] Proper place to put extra args for building
Brett C.
bac at OCF.Berkeley.EDU
Wed Apr 20 22:50:02 CEST 2005
Martin v. Löwis wrote:
> Brett C. wrote:
>
>>I am currently adding some code for a Py_COMPILER_DEBUG build for use on the
>>AST branch. I thought that OPT was the proper variable to put stuff like this
>>into for building (``-DPy_COMPILER_DEBUG``), but that erases ``-g -Wall
>>-Wstrict-prototypes``. Obviously I could just tack all of that into my own
>>thing, but that seems like an unneeded step.
>
>
> Actually, this step is needed.
>
Damn. OK.
[SNIP]
> It might be reasonable to add a variable that will just take additional
> compiler flags, and never be modified in configure.
The other option is to not make configure.in skip injecting arguments when a
pydebug build is done based on whether OPT is defined in the environment. So
configure.in:670 could change to ``OPT="$OPT -g -Wall -Wstrict-prototypes"``.
The line for a non-debug build could stay as-is since if people are bothering
to tweak those settings for a normal build they are going out of there way to
tweak settings. Seems like special-casing this for pydebug builds makes sense
since the default values will almost always be desired for a pydebug build.
And those rare cases you don't want them you could just edit the generated
Makefile by hand. Besides it just makes our lives easier and the special
builds even more usual since it is one less thing to have to tweak.
Sound reasonable?
-Brett
More information about the Python-Dev
mailing list