diff mbox series

[11/29] rust.inc: Rename variables to make code clearer

Message ID 20220805131252.3706794-11-richard.purdie@linuxfoundation.org
State Accepted, archived
Commit 279b809e8306b0eb6ae6caeb6b0a3c3c62d2f9d2
Headers show
Series [01/29] nativesdk: Clear TUNE_FEATURES | expand

Commit Message

Richard Purdie Aug. 5, 2022, 1:12 p.m. UTC
Instead of reusing a "target_section" variable, name them host and build
section instead. This patch sets things up for other improvementsm,
separating out the renaming.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---
 meta/recipes-devtools/rust/rust.inc | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)
diff mbox series

Patch

diff --git a/meta/recipes-devtools/rust/rust.inc b/meta/recipes-devtools/rust/rust.inc
index aa067932fdd..30f2b71fe8c 100644
--- a/meta/recipes-devtools/rust/rust.inc
+++ b/meta/recipes-devtools/rust/rust.inc
@@ -79,24 +79,24 @@  python do_configure() {
     config = configparser.RawConfigParser()
 
     # [target.ARCH-poky-linux]
-    target_section = "target.{}".format(d.getVar('RUST_TARGET_SYS', True))
-    config.add_section(target_section)
+    host_section = "target.{}".format(d.getVar('RUST_TARGET_SYS', True))
+    config.add_section(host_section)
 
     llvm_config = d.expand("${YOCTO_ALTERNATE_EXE_PATH}")
-    config.set(target_section, "llvm-config", e(llvm_config))
+    config.set(host_section, "llvm-config", e(llvm_config))
 
-    config.set(target_section, "cxx", e(d.expand("${RUST_TARGET_CXX}")))
-    config.set(target_section, "cc", e(d.expand("${RUST_TARGET_CC}")))
+    config.set(host_section, "cxx", e(d.expand("${RUST_TARGET_CXX}")))
+    config.set(host_section, "cc", e(d.expand("${RUST_TARGET_CC}")))
 
     # If we don't do this rust-native will compile it's own llvm for BUILD.
     # [target.${BUILD_ARCH}-unknown-linux-gnu]
-    target_section = "target.{}".format(d.getVar('SNAPSHOT_BUILD_SYS', True))
-    config.add_section(target_section)
+    build_section = "target.{}".format(d.getVar('SNAPSHOT_BUILD_SYS', True))
+    config.add_section(build_section)
 
-    config.set(target_section, "llvm-config", e(llvm_config))
+    config.set(build_section, "llvm-config", e(llvm_config))
 
-    config.set(target_section, "cxx", e(d.expand("${RUST_BUILD_CXX}")))
-    config.set(target_section, "cc", e(d.expand("${RUST_BUILD_CC}")))
+    config.set(build_section, "cxx", e(d.expand("${RUST_BUILD_CXX}")))
+    config.set(build_section, "cc", e(d.expand("${RUST_BUILD_CC}")))
 
     # [llvm]
     config.add_section("llvm")