Lines 166-181
class UnixCCompiler(CCompiler):
Link Here
|
166 |
except DistutilsExecError, msg: |
166 |
except DistutilsExecError, msg: |
167 |
raise CompileError, msg |
167 |
raise CompileError, msg |
168 |
|
168 |
|
169 |
def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): |
169 |
def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts, |
|
|
170 |
lang='c'): |
170 |
compiler_so = self.compiler_so |
171 |
compiler_so = self.compiler_so |
171 |
compiler_cxx_so = self.compiler_cxx_so |
172 |
compiler_cxx_so = self.compiler_cxx_so |
172 |
if sys.platform == 'darwin': |
173 |
if sys.platform == 'darwin': |
173 |
compiler_so = _darwin_compiler_fixup(compiler_so, cc_args + extra_postargs) |
174 |
compiler_so = _darwin_compiler_fixup(compiler_so, cc_args + extra_postargs) |
174 |
try: |
175 |
try: |
175 |
if ext == '.c' or ext == '.m': |
176 |
if lang == 'c++': |
176 |
cc = compiler_so + cc_args |
|
|
177 |
else: |
178 |
cc = compiler_cxx_so + cc_args |
177 |
cc = compiler_cxx_so + cc_args |
|
|
178 |
else: |
179 |
cc = compiler_so + cc_args |
179 |
self.spawn(cc + cc_args + [src, '-o', obj] + |
180 |
self.spawn(cc + cc_args + [src, '-o', obj] + |
180 |
extra_postargs) |
181 |
extra_postargs) |
181 |
except DistutilsExecError, msg: |
182 |
except DistutilsExecError, msg: |