File tree 1 file changed +10
-3
lines changed
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):
605
605
if (src_path / 'objs' / '.libs' / libfreetype ).is_file ():
606
606
return # Bail out because we have already built FreeType.
607
607
608
+ cc = get_ccompiler ()
609
+
608
610
print (f"Building freetype in { src_path } " )
609
611
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
+ }
611
618
subprocess .check_call (
612
619
["./configure" , "--with-zlib=no" , "--with-bzip2=no" ,
613
620
"--with-png=no" , "--with-harfbuzz=no" , "--enable-static" ,
614
- "--disable-shared" ],
621
+ "--disable-shared" ,
622
+ "--host=" + sysconfig .get_config_var ('BUILD_GNU_TYPE' )],
615
623
env = env , cwd = src_path )
616
624
if 'GNUMAKE' in env :
617
625
make = env ['GNUMAKE' ]
@@ -660,7 +668,6 @@ def do_custom_build(self, env):
660
668
f .truncate ()
661
669
f .write (vcxproj )
662
670
663
- cc = get_ccompiler ()
664
671
cc .initialize () # Get msbuild in the %PATH% of cc.spawn.
665
672
cc .spawn (["msbuild" , str (sln_path ),
666
673
"/t:Clean;Build" ,
You can’t perform that action at this time.
0 commit comments