Skip to contentSkip to conversation

meson: Allow building with empty target_arch[] source set

PATCH In review Philippe Mathieu-Daudé 3 participants 3 messages May 6 Arm/Amlogic Meson SoC support

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 meson: Allow building with empty target_arch[] source set

Complete commit 83d5db95d38 ("meson: Allow system binaries to not have target-specific units") with yet another guard, allowing empty target_arch[] source sets for some targets.

---
 meson.build | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)
meson.build +5 -3
index 4176d020c21..987f33bacee 100644
@@ -4332,9 +4332,11 @@ foreach target : target_dirs
     arch_srcs += files('target-info-stub.c')
   endif
 
-  t = target_arch[target_base_arch].apply(config_target, strict: false)
-  arch_srcs += t.sources()
-  arch_deps += t.dependencies()
+  if target_base_arch in target_arch
+    t = target_arch[target_base_arch].apply(config_target, strict: false)
+    arch_srcs += t.sources()
+    arch_deps += t.dependencies()
+  endif
 
   target_common = common_ss.apply(config_target, strict: false)
   objects = [common_all.extract_objects(target_common.sources())]
Signature · 1 line
2.53.0
Reviewed-by on v1 1/1
#1 lore raw
Quoted 7 lines · Philippe Mathieu-Daudé

Complete commit 83d5db95d38 ("meson: Allow system binaries to not have target-specific units") with yet another guard, allowing empty target_arch[] source sets for some targets.

---

Quoted 25 lines
 meson.build | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)
meson.build +5 -4
index 4176d020c21..987f33bacee 100644
@@ -4332,9 +4332,11 @@ foreach target : target_dirs
     arch_srcs += files('target-info-stub.c')
   endif
 
-  t = target_arch[target_base_arch].apply(config_target, strict: false)
-  arch_srcs += t.sources()
-  arch_deps += t.dependencies()
+  if target_base_arch in target_arch
+    t = target_arch[target_base_arch].apply(config_target, strict: false)
+    arch_srcs += t.sources()
+    arch_deps += t.dependencies()
+  endif
 
   target_common = common_ss.apply(config_target, strict: false)
   objects = [common_all.extract_objects(target_common.sources())]
--

2.53.0

Reviewed-by on v1 1/1
#2 lore raw
In reply to Philippe Mathieu-Daudé
Quoted 9 lines · Philippe Mathieu-Daudé

Complete commit 83d5db95d38 ("meson: Allow system binaries to not have target-specific units") with yet another guard, allowing empty target_arch[] source sets for some targets.

---
 meson.build | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)