Source
1045
1045
elif arch == "64bit":
1046
1046
cc_args.append("-m64")
1047
1047
else:
1048
1048
print(
1049
1049
"\nPlatform has architecture '%s' which is unknown to "
1050
1050
"the setup script. Proceed with caution\n" % arch
1051
1051
)
1052
1052
return cc_args
1053
1053
1054
1054
sys_cflags=''
1055
-
def sys_cflags = update_sys_cflags():
1055
+
def update_sys_cflags():
1056
1056
global sys_cflags
1057
1057
sys_cflags = sep.join(
1058
1058
list(
1059
1059
filter(
1060
1060
lambda flag: not flag.startswith('-O'),sysconfig.get_config_var('CFLAGS').split()
1061
1061
)
1062
1062
)
1063
1063
)
1064
1064
return sys_cflags
1065
1065
1116
1116
else:
1117
1117
local_library_path = [ ]
1118
1118
1119
1119
if os.path.isfile(local_mangle_file):
1120
1120
with open(local_mangle_file,'rb') as f:
1121
1121
library_mangle = pickle.load(f)
1122
1122
else:
1123
1123
library_mangle = { }
1124
1124
1125
1125
# Mimic the makefile so that the same ccache results can be used:
1126
-
filtered_sys_cflags = filter_optim_debug(sys_cflags = update_sys_cflags()).split() # yes, we join only to take advantage of filter_optim_debug
1126
+
filtered_sys_cflags = filter_optim_debug(update_sys_cflags()).split() # yes, we join only to take advantage of filter_optim_debug
1127
1127
1128
1128
def _link(target_desc, objects, output_filename, output_dir=None,
1129
1129
libraries=None, library_dirs=None, runtime_library_dirs=None,
1130
1130
export_symbols=None, debug=0, extra_preargs=None,
1131
1131
extra_postargs=None, build_temp=None, target_lang=None):
1132
1132
fn = os.path.basename(output_filename)
1133
1133
if fn.startswith('lib') and fn.endswith(".so"):
1134
1134
print("linking shared library...")
1135
1135
self.linker_so = list(map(lambda f: "-dynamiclib" if f == "-bundle" else f,self.linker_so))
1136
1136
if sys.platform == 'darwin':