File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -605,9 +605,16 @@ 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" ,
@@ -660,7 +667,6 @@ def do_custom_build(self, env):
660667 f .truncate ()
661668 f .write (vcxproj )
662669
663- cc = get_ccompiler ()
664670 cc .initialize () # Get msbuild in the %PATH% of cc.spawn.
665671 cc .spawn (["msbuild" , str (sln_path ),
666672 "/t:Clean;Build" ,
You can’t perform that action at this time.
0 commit comments