Use different toolchain for building test VMs, so only they can use FP.
Bug: 115484857
Bug: 129131324
Change-Id: Idf6fc28b712594559aa263503fe10fc9f30b68f4
diff --git a/build/toolchain/embedded.gni b/build/toolchain/embedded.gni
index 4372904..2b232c6 100644
--- a/build/toolchain/embedded.gni
+++ b/build/toolchain/embedded.gni
@@ -371,3 +371,41 @@
platform_name = target_name
}
}
+
+template("aarch64_toolchains") {
+ aarch64_toolchain("${target_name}") {
+ forward_variables_from(invoker,
+ [
+ "origin_address",
+ "use_pl011",
+ "pl011_base_address",
+ "gic_version",
+ "gicd_base_address",
+ "gicr_base_address",
+ "heap_pages",
+ "max_cpus",
+ "max_vms",
+ ])
+ cpu = "${invoker.cpu}+nofp"
+ }
+
+ # Toolchain for building test VMs which run under Hafnium.
+ aarch64_toolchain("${target_name}_vm") {
+ # TODO(b/115484857): Remove access to PL011 from VMs.
+ forward_variables_from(invoker,
+ [
+ "origin_address",
+ "use_pl011",
+ "pl011_base_address",
+ "gic_version",
+ "gicd_base_address",
+ "gicr_base_address",
+ ])
+ cpu = "${invoker.cpu}+fp"
+
+ # Nonsense values because they are required but shouldn't be used.
+ heap_pages = 0
+ max_cpus = 0
+ max_vms = 0
+ }
+}