]> granicus.if.org Git - python/commitdiff
Get OPT from the environment to build the CCSHARED command.
authorMartin v. Löwis <martin@v.loewis.de>
Fri, 10 Aug 2001 08:56:17 +0000 (08:56 +0000)
committerMartin v. Löwis <martin@v.loewis.de>
Fri, 10 Aug 2001 08:56:17 +0000 (08:56 +0000)
Fixes the problem reported in bug #438786.

setup.py

index 7a649c63d95fb6081fa73c627d90f238acc3c8d7..6de7aae76c0a507b4714c50e78b36020ecf8528f 100644 (file)
--- a/setup.py
+++ b/setup.py
@@ -138,8 +138,8 @@ class PyBuildExt(build_ext):
         # unfortunately, distutils doesn't let us provide separate C and C++
         # compilers
         if compiler is not None:
-            (ccshared,) = sysconfig.get_config_vars('CCSHARED')
-            args['compiler_so'] = compiler + ' ' + ccshared
+            (ccshared,opt) = sysconfig.get_config_vars('CCSHARED','OPT')
+            args['compiler_so'] = compiler + ' ' + opt + ' ' + ccshared
         if linker_so is not None:
             args['linker_so'] = linker_so + ' -shared'
         self.compiler.set_executables(**args)