[Numpy-svn] r4231 - branches/numpy.scons/numpy/distutils/scons

numpy-svn@scip... numpy-svn@scip...
Thu Oct 18 04:38:46 CDT 2007


Author: cdavid
Date: 2007-10-18 04:38:38 -0500 (Thu, 18 Oct 2007)
New Revision: 4231

Modified:
   branches/numpy.scons/numpy/distutils/scons/default.py
   branches/numpy.scons/numpy/distutils/scons/numpyenv.py
Log:
Add basic optimization options for gcc

Modified: branches/numpy.scons/numpy/distutils/scons/default.py
===================================================================
--- branches/numpy.scons/numpy/distutils/scons/default.py	2007-10-18 08:48:21 UTC (rev 4230)
+++ branches/numpy.scons/numpy/distutils/scons/default.py	2007-10-18 09:38:38 UTC (rev 4231)
@@ -1,5 +1,5 @@
 #! /usr/bin/env python
-# Last Change: Thu Oct 11 04:00 PM 2007 J
+# Last Change: Thu Oct 18 05:00 PM 2007 J
 
 # This is a copy of scons/Tools/__init__.py, because scons does not offer any
 # public api for this

Modified: branches/numpy.scons/numpy/distutils/scons/numpyenv.py
===================================================================
--- branches/numpy.scons/numpy/distutils/scons/numpyenv.py	2007-10-18 08:48:21 UTC (rev 4230)
+++ branches/numpy.scons/numpy/distutils/scons/numpyenv.py	2007-10-18 09:38:38 UTC (rev 4231)
@@ -159,6 +159,11 @@
         env['ENV']['HOME'] = os.environ['HOME']
     except KeyError:
         pass
+
+    # XXX: think about how to handle optimizations per compiler
+    if env['CC'] == 'gcc':
+        env.Append(CCFLAGS = "-Wall -Wstrict-prototypes -fno-strict-aliasing -O3 -g")
+
     #print Environment().Dump()
     # Adding custom builder
     env['BUILDERS']['NumpySharedLibrary'] = NumpySharedLibrary
@@ -180,4 +185,3 @@
     env['NUMPYCONFIG'] = config
 
     return env
-



More information about the Numpy-svn mailing list