diff options
| author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2022-08-05 12:40:25 +0100 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2022-08-08 15:44:20 +0100 |
| commit | 3350658cb24c84add4635e2b904ca94525dc0d61 (patch) | |
| tree | ea71609fb347a192e25300d17a3203d40f30f67a /meta | |
| parent | 5c45b73c8fa445b5192bb9fac1bc80b038b44c0d (diff) | |
| download | poky-3350658cb24c84add4635e2b904ca94525dc0d61.tar.gz | |
rust.inc: Rename variables to make code clearer
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.
(From OE-Core rev: 279b809e8306b0eb6ae6caeb6b0a3c3c62d2f9d2)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
| -rw-r--r-- | meta/recipes-devtools/rust/rust.inc | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/meta/recipes-devtools/rust/rust.inc b/meta/recipes-devtools/rust/rust.inc index aa067932fd..30f2b71fe8 100644 --- a/meta/recipes-devtools/rust/rust.inc +++ b/meta/recipes-devtools/rust/rust.inc | |||
| @@ -79,24 +79,24 @@ python do_configure() { | |||
| 79 | config = configparser.RawConfigParser() | 79 | config = configparser.RawConfigParser() |
| 80 | 80 | ||
| 81 | # [target.ARCH-poky-linux] | 81 | # [target.ARCH-poky-linux] |
| 82 | target_section = "target.{}".format(d.getVar('RUST_TARGET_SYS', True)) | 82 | host_section = "target.{}".format(d.getVar('RUST_TARGET_SYS', True)) |
| 83 | config.add_section(target_section) | 83 | config.add_section(host_section) |
| 84 | 84 | ||
| 85 | llvm_config = d.expand("${YOCTO_ALTERNATE_EXE_PATH}") | 85 | llvm_config = d.expand("${YOCTO_ALTERNATE_EXE_PATH}") |
| 86 | config.set(target_section, "llvm-config", e(llvm_config)) | 86 | config.set(host_section, "llvm-config", e(llvm_config)) |
| 87 | 87 | ||
| 88 | config.set(target_section, "cxx", e(d.expand("${RUST_TARGET_CXX}"))) | 88 | config.set(host_section, "cxx", e(d.expand("${RUST_TARGET_CXX}"))) |
| 89 | config.set(target_section, "cc", e(d.expand("${RUST_TARGET_CC}"))) | 89 | config.set(host_section, "cc", e(d.expand("${RUST_TARGET_CC}"))) |
| 90 | 90 | ||
| 91 | # If we don't do this rust-native will compile it's own llvm for BUILD. | 91 | # If we don't do this rust-native will compile it's own llvm for BUILD. |
| 92 | # [target.${BUILD_ARCH}-unknown-linux-gnu] | 92 | # [target.${BUILD_ARCH}-unknown-linux-gnu] |
| 93 | target_section = "target.{}".format(d.getVar('SNAPSHOT_BUILD_SYS', True)) | 93 | build_section = "target.{}".format(d.getVar('SNAPSHOT_BUILD_SYS', True)) |
| 94 | config.add_section(target_section) | 94 | config.add_section(build_section) |
| 95 | 95 | ||
| 96 | config.set(target_section, "llvm-config", e(llvm_config)) | 96 | config.set(build_section, "llvm-config", e(llvm_config)) |
| 97 | 97 | ||
| 98 | config.set(target_section, "cxx", e(d.expand("${RUST_BUILD_CXX}"))) | 98 | config.set(build_section, "cxx", e(d.expand("${RUST_BUILD_CXX}"))) |
| 99 | config.set(target_section, "cc", e(d.expand("${RUST_BUILD_CC}"))) | 99 | config.set(build_section, "cc", e(d.expand("${RUST_BUILD_CC}"))) |
| 100 | 100 | ||
| 101 | # [llvm] | 101 | # [llvm] |
| 102 | config.add_section("llvm") | 102 | config.add_section("llvm") |
