Changeset 2493


Ignore:
Timestamp:
05/11/12 12:12:38 (12 years ago)
Author:
Malte Marquarding
Message:

clean up compiler args

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/distutils/setupext.py

    r2492 r2493  
    124124
    125125    def build_extensions(self):
    126         delargs = ["-Wstrict-prototypes", "-Wshorten-64-to-32",
    127                    "-fwrapv"]
    128         for comp in [self.compiler.compiler, self.compiler.compiler_so,
    129                      self.compiler.compiler_cxx]:
    130             for arg in comp:
    131                 if arg in delargs:
    132                     comp.remove(arg)
     126        def remove_args(args):
     127            out = []
     128            delargs = ["-Wstrict-prototypes", "-Wshorten-64-to-32",
     129                       "-fwrapv", ]
     130            for arg in args:
     131                if arg not in delargs and arg not in out:
     132                    out.append(arg)
     133            return out
    133134
     135        self.compiler.compiler = remove_args(self.compiler.compiler)
     136        self.compiler.compiler_so = remove_args(self.compiler.compiler_so)
     137        self.compiler.compiler_cxx = remove_args(self.compiler.compiler_cxx)
     138   
    134139        build_ext.build_ext.build_extensions(self)
Note: See TracChangeset for help on using the changeset viewer.