File tree Expand file tree Collapse file tree 1 file changed +10
-3
lines changed
Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -605,13 +605,21 @@ def do_custom_build(self, env):
605605 if (src_path / 'objs' / '.libs' / libfreetype ).is_file ():
606606 return # Bail out because we have already built FreeType.
607607
608+ cc = get_ccompiler ()
609+
608610 print (f"Building freetype in { src_path } " )
609611 if sys .platform != 'win32' : # compilation on non-windows
610- env = {** env , "CFLAGS" : "{} -fPIC" .format (env .get ("CFLAGS" , "" ))}
612+ env = {
613+ ** env ,
614+ "CC" : (shlex .join (cc .compiler ) if sys .version_info >= (3 , 8 )
615+ else " " .join (shlex .quote (x ) for x in cc .compiler )),
616+ "CFLAGS" : "{} -fPIC" .format (env .get ("CFLAGS" , "" )),
617+ }
611618 subprocess .check_call (
612619 ["./configure" , "--with-zlib=no" , "--with-bzip2=no" ,
613620 "--with-png=no" , "--with-harfbuzz=no" , "--enable-static" ,
614- "--disable-shared" ],
621+ "--disable-shared" ,
622+ "--host=" + sysconfig .get_config_var ('BUILD_GNU_TYPE' )],
615623 env = env , cwd = src_path )
616624 if 'GNUMAKE' in env :
617625 make = env ['GNUMAKE' ]
@@ -660,7 +668,6 @@ def do_custom_build(self, env):
660668 f .truncate ()
661669 f .write (vcxproj )
662670
663- cc = get_ccompiler ()
664671 cc .initialize () # Get msbuild in the %PATH% of cc.spawn.
665672 cc .spawn (["msbuild" , str (sln_path ),
666673 "/t:Clean;Build" ,
You can’t perform that action at this time.
0 commit comments