@@ -195,23 +195,24 @@ def walk_sources(directory: str) -> Iterator[str]:
195
195
MSVC_CFLAGS = {"DEBUG" : ["/Od" ], "RELEASE" : ["/GL" , "/O2" , "/GS-" , "/wd4996" ]}
196
196
MSVC_LDFLAGS : dict [str , list [str ]] = {"DEBUG" : [], "RELEASE" : ["/LTCG" ]}
197
197
GCC_CFLAGS = {
198
- "DEBUG" : ["-std=c99" , "-Og" , "-g" ],
198
+ "DEBUG" : ["-std=c99" , "-Og" , "-g" , "-fPIC" ],
199
199
"RELEASE" : [
200
200
"-std=c99" ,
201
201
"-flto" ,
202
202
"-O3" ,
203
203
"-g" ,
204
+ "-fPIC" ,
204
205
"-Wno-deprecated-declarations" ,
205
206
"-Wno-discarded-qualifiers" , # Ignore discarded restrict qualifiers.
206
207
],
207
208
}
208
209
209
- if sys .platform == "win32" and "--compiler=mingw32" not in sys .argv :
210
- extra_compile_args .extend (MSVC_CFLAGS [tdl_build ])
211
- extra_link_args .extend (MSVC_LDFLAGS [tdl_build ])
212
- else :
213
- extra_compile_args .extend (GCC_CFLAGS [tdl_build ])
214
- extra_link_args .extend (GCC_CFLAGS [tdl_build ])
210
+ # if sys.platform == "win32" and "--compiler=mingw32" not in sys.argv:
211
+ # extra_compile_args.extend(MSVC_CFLAGS[tdl_build])
212
+ # extra_link_args.extend(MSVC_LDFLAGS[tdl_build])
213
+ # else:
214
+ # extra_compile_args.extend(GCC_CFLAGS[tdl_build])
215
+ # extra_link_args.extend(GCC_CFLAGS[tdl_build])
215
216
216
217
ffi = FFI ()
217
218
sdl_cdef , sdl_strings = build_sdl .get_cdef ()
0 commit comments