@@ -195,23 +195,24 @@ def walk_sources(directory: str) -> Iterator[str]:
195195MSVC_CFLAGS = {"DEBUG" : ["/Od" ], "RELEASE" : ["/GL" , "/O2" , "/GS-" , "/wd4996" ]}
196196MSVC_LDFLAGS : dict [str , list [str ]] = {"DEBUG" : [], "RELEASE" : ["/LTCG" ]}
197197GCC_CFLAGS = {
198- "DEBUG" : ["-std=c99" , "-Og" , "-g" ],
198+ "DEBUG" : ["-std=c99" , "-Og" , "-g" , "-fPIC" ],
199199 "RELEASE" : [
200200 "-std=c99" ,
201201 "-flto" ,
202202 "-O3" ,
203203 "-g" ,
204+ "-fPIC" ,
204205 "-Wno-deprecated-declarations" ,
205206 "-Wno-discarded-qualifiers" , # Ignore discarded restrict qualifiers.
206207 ],
207208}
208209
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])
215216
216217ffi = FFI ()
217218sdl_cdef , sdl_strings = build_sdl .get_cdef ()
0 commit comments