Source
1196
1196
print("\nPlatform has architecture '%%s' which is unknown to "
1197
1197
"the setup script. Proceed with caution\n" %% arch)
1198
1198
""" % gfortran_flag_additions
1199
1199
cc_args = get_fortran_compiler_flags(ext)
1200
1200
try:
1201
1201
self.spawn(compiler_so + cc_args + [src, '-o', obj] + postargs)
1202
1202
except DistutilsExecError as msg:
1203
1203
raise CompileError(msg)
1204
1204
else:
1205
1205
cc_copy = list(cc_args)
1206
-
tmp_sys_cflags = ''
1206
+
tmp_sys_cflags = []
1207
1207
if ext == ".c" :
1208
1208
print("c compile...")
1209
1209
new_compiler = new_compiler_cc
1210
1210
else:
1211
1211
print("c++ compile...")
1212
1212
new_compiler = new_compiler_cxx
1213
-
# Mimic the makefile so that the same ccache results can be used:
1214
-
# DEPFLAGS = -MT $@ -MMD -MP -MF $(DEPDIR)/$*.Td
1215
-
cc_copy += ['-MT', obj, '-MMD', '-MP', '-MF', depdir+'/'+re.sub('\.o$','.Td',obj)]
1216
1213
tmp_sys_cflags = filtered_sys_cflags
1217
1214
## get the cflags for the module being built; key is a subdir, value are flags
1218
1215
m_cflags = map(lambda x: x[1] if x[0] in src else [], module_cflags.items())
1219
1216
m_cflags = [item for sublist in m_cflags for item in sublist] ### python has not yet hit upon a flatten function...
1220
1217
#self.set_executable('compiler_so', clean_args(new_compiler + m_cflags + ( [ '-DUSE_GRPC' ] if props['option.grpc'] != "0" else [ ] )))
1221
1218
self.set_executable('compiler_so', clean_args(new_compiler + m_cflags + tmp_sys_cflags + get_use_grpc()))
1222
-
supercc(obj, src, ext, clean_args(cc_copy), clean_args(postargs), clean_args(pp_copy))
1219
+
supercc(obj, src, ext, clean_args(cc_copy), clean_args(postargs), clean_args(pp_opts))
1223
1220
1224
1221
# reset the default compiler_so (may not be necessary)
1225
1222
self.compiler_so = default_compiler_so
1226
1223
1227
1224
# inject our redefined _compile method into the class
1228
1225
self._compile = _compile
1229
1226
self.link = _link
1230
1227
1231
1228
1232
1229
def customize_swig(self):