@@ -810,7 +810,7 @@ def parse_symbols(self):
810810 check = True
811811 )
812812 subprocess .run (
813- ["make " ],
813+ ["cmake" , "--build" , ". " ],
814814 env = my_environment ,
815815 universal_newlines = True ,
816816 stdout = subprocess .PIPE ,
@@ -971,15 +971,17 @@ def parse_symbols(self):
971971 )
972972 my_environment = os .environ .copy ()
973973 my_environment ["CFLAGS" ] = "-fno-asynchronous-unwind-tables"
974- # Run make clean separately to lib to prevent unwanted behavior when
975- # make is invoked with parallelism.
974+
975+ source_dir = os .getcwd ()
976+ build_dir = tempfile .mkdtemp ()
977+ os .chdir (build_dir )
976978 subprocess .run (
977- ["make " , "clean" ],
979+ ["cmake " , "-DGEN_FILES=ON" , source_dir ],
978980 universal_newlines = True ,
979981 check = True
980982 )
981983 subprocess .run (
982- ["make " , "lib " ],
984+ ["cmake " , "--build" , ". " ],
983985 env = my_environment ,
984986 universal_newlines = True ,
985987 stdout = subprocess .PIPE ,
@@ -988,17 +990,21 @@ def parse_symbols(self):
988990 )
989991
990992 # Perform object file analysis using nm
991- symbols = self .parse_symbols_from_nm ([
992- "library/libmbedcrypto.a" ,
993- "library/libmbedtls.a" ,
994- "library/libmbedx509.a"
995- ])
993+ if build_tree .is_mbedtls_3_6 ():
994+ symbols = self .parse_symbols_from_nm ([
995+ "library/libmbedcrypto.a" ,
996+ "library/libmbedtls.a" ,
997+ "library/libmbedx509.a"
998+ ])
999+ else :
1000+ symbols = self .parse_symbols_from_nm ([
1001+ "library/libtfpsacrypto.a" ,
1002+ "library/libmbedtls.a" ,
1003+ "library/libmbedx509.a"
1004+ ])
9961005
997- subprocess .run (
998- ["make" , "clean" ],
999- universal_newlines = True ,
1000- check = True
1001- )
1006+ os .chdir (source_dir )
1007+ shutil .rmtree (build_dir )
10021008 except subprocess .CalledProcessError as error :
10031009 self .log .debug (error .output )
10041010 raise error
0 commit comments