[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: How to disable optimization for Python distutils



Seo Sanghyeon writes:
> Python distutils use same CFLAGS as Python itself for modules it compile
> by default. As Python is compiled with -O3 by default, this means all
> Python modules using distutils are compiled with -O3 as well.
> 
> To disable optimization when compiling Python modules, just set CFLAGS.
> Example: CFLAGS=-O0 python setup.py build

I stand corrected, this is appended to the CFLAGS from the Makefile,
and therefore overrides the -O3. it doesn't change other flags.



Reply to: