aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Hu <david.hu@arm.com>2020-12-16 19:17:06 +0800
committerDavid Hu <david.hu@arm.com>2020-12-28 13:53:10 +0800
commit1d2329a88cf0d6437d3a3545f68bfb19203118fe (patch)
tree1d65f4be0d08431129d4018afc947b65a116ca2c
parentb7a131e0b0f1835f7a2fae4c3bd5778a88c30549 (diff)
downloadtrusted-firmware-m-1d2329a88cf0d6437d3a3545f68bfb19203118fe.tar.gz
Build: Skip building platform_ns when NS app is not selected
Set EXCLUDE_FROM_ALL property in platform_ns target to skip building platform_ns target when NS app is disabled. Change-Id: I2e9c5122ec3253d510806d5cdf3d18ee3e4b1985 Signed-off-by: David Hu <david.hu@arm.com>
-rw-r--r--interface/CMakeLists.txt13
-rwxr-xr-xplatform/CMakeLists.txt2
2 files changed, 2 insertions, 13 deletions
diff --git a/interface/CMakeLists.txt b/interface/CMakeLists.txt
index 3af7daa844..37ecfbc56d 100644
--- a/interface/CMakeLists.txt
+++ b/interface/CMakeLists.txt
@@ -15,7 +15,7 @@ if (TFM_MULTI_CORE_TOPOLOGY)
tfm_toolchain_reload_compiler()
# The platform target is created in this directory/file so that it has the
# same settings as the main ns target.
- add_library(platform_ns STATIC)
+ add_library(platform_ns STATIC EXCLUDE_FROM_ALL)
endif()
###################### PSA interface (header only) #############################
@@ -51,17 +51,6 @@ target_compile_definitions(psa_interface
$<$<BOOL:${FORWARD_PROT_MSG}>:FORWARD_PROT_MSG=${FORWARD_PROT_MSG}>
)
-# A dummy interface library to make sure platform NS build can proceed when NS
-# is disabled, if a platform doesn't use NS flag to control platform NS build.
-if (NOT NS)
- add_library(tfm_ns_interface INTERFACE)
-
- target_link_libraries(tfm_ns_interface
- INTERFACE
- psa_interface
- )
-endif()
-
###################### PSA api (S lib) #########################################
target_sources(tfm_secure_api
diff --git a/platform/CMakeLists.txt b/platform/CMakeLists.txt
index f7fd6ef19a..6cd9befdfb 100755
--- a/platform/CMakeLists.txt
+++ b/platform/CMakeLists.txt
@@ -14,7 +14,7 @@ add_library(platform_region_defs INTERFACE)
# under the multicore topology, NS is declared in the same place as the PSA
# interface so that it picks up the compiler definitions for the NS CPU
if(NOT TFM_MULTI_CORE_TOPOLOGY)
- add_library(platform_ns STATIC)
+ add_library(platform_ns STATIC EXCLUDE_FROM_ALL)
endif()
if (BL2)