mirror of
https://github.com/Mbed-TLS/mbedtls-framework.git
synced 2026-08-04 10:17:46 +00:00
Prepare check_names.py for the deprecation of Make
We now use CMake to build the Mbed TLS libraries in both the development and 3.6 cases. This change aligns with what is already done for TF-PSA-Crypto. Signed-off-by: Ronald Cron <[email protected]>
This commit is contained in:
+20
-14
@@ -971,15 +971,17 @@ class MBEDTLSCodeParser(CodeParser):
|
||||
)
|
||||
my_environment = os.environ.copy()
|
||||
my_environment["CFLAGS"] = "-fno-asynchronous-unwind-tables"
|
||||
# Run make clean separately to lib to prevent unwanted behavior when
|
||||
# make is invoked with parallelism.
|
||||
|
||||
source_dir = os.getcwd()
|
||||
build_dir = tempfile.mkdtemp()
|
||||
os.chdir(build_dir)
|
||||
subprocess.run(
|
||||
["make", "clean"],
|
||||
["cmake", "-DGEN_FILES=ON", source_dir],
|
||||
universal_newlines=True,
|
||||
check=True
|
||||
)
|
||||
subprocess.run(
|
||||
["make", "lib"],
|
||||
["make"],
|
||||
env=my_environment,
|
||||
universal_newlines=True,
|
||||
stdout=subprocess.PIPE,
|
||||
@@ -988,17 +990,21 @@ class MBEDTLSCodeParser(CodeParser):
|
||||
)
|
||||
|
||||
# Perform object file analysis using nm
|
||||
symbols = self.parse_symbols_from_nm([
|
||||
"library/libmbedcrypto.a",
|
||||
"library/libmbedtls.a",
|
||||
"library/libmbedx509.a"
|
||||
])
|
||||
if build_tree.is_mbedtls_3_6():
|
||||
symbols = self.parse_symbols_from_nm([
|
||||
"library/libmbedcrypto.a",
|
||||
"library/libmbedtls.a",
|
||||
"library/libmbedx509.a"
|
||||
])
|
||||
else:
|
||||
symbols = self.parse_symbols_from_nm([
|
||||
"library/libtfpsacrypto.a",
|
||||
"library/libmbedtls.a",
|
||||
"library/libmbedx509.a"
|
||||
])
|
||||
|
||||
subprocess.run(
|
||||
["make", "clean"],
|
||||
universal_newlines=True,
|
||||
check=True
|
||||
)
|
||||
os.chdir(source_dir)
|
||||
shutil.rmtree(build_dir)
|
||||
except subprocess.CalledProcessError as error:
|
||||
self.log.debug(error.output)
|
||||
raise error
|
||||
|
||||
Reference in New Issue
Block a user