summaryrefslogtreecommitdiffstats
path: root/meta/classes/rust-target-config.bbclass
diff options
context:
space:
mode:
Diffstat (limited to 'meta/classes/rust-target-config.bbclass')
-rw-r--r--meta/classes/rust-target-config.bbclass8
1 files changed, 7 insertions, 1 deletions
diff --git a/meta/classes/rust-target-config.bbclass b/meta/classes/rust-target-config.bbclass
index bc6bd77abb..0f0797603e 100644
--- a/meta/classes/rust-target-config.bbclass
+++ b/meta/classes/rust-target-config.bbclass
@@ -290,6 +290,10 @@ llvm_cpu[vardepvalue] = "${@llvm_cpu(d)}"
290 290
291def rust_gen_target(d, thing, wd, arch): 291def rust_gen_target(d, thing, wd, arch):
292 import json 292 import json
293
294 build_sys = d.getVar('BUILD_SYS')
295 target_sys = d.getVar('TARGET_SYS')
296
293 sys = d.getVar('{}_SYS'.format(thing)) 297 sys = d.getVar('{}_SYS'.format(thing))
294 prefix = d.getVar('{}_PREFIX'.format(thing)) 298 prefix = d.getVar('{}_PREFIX'.format(thing))
295 rustsys = d.getVar('RUST_{}_SYS'.format(thing)) 299 rustsys = d.getVar('RUST_{}_SYS'.format(thing))
@@ -298,7 +302,9 @@ def rust_gen_target(d, thing, wd, arch):
298 cpu = "generic" 302 cpu = "generic"
299 features = "" 303 features = ""
300 304
301 if thing == "TARGET": 305 # Need to apply the target tuning consitently, only if the triplet applies to the target
306 # and not in the native case
307 if sys == target_sys and sys != build_sys:
302 abi = d.getVar('ABIEXTENSION') 308 abi = d.getVar('ABIEXTENSION')
303 cpu = llvm_cpu(d) 309 cpu = llvm_cpu(d)
304 if bb.data.inherits_class('native', d): 310 if bb.data.inherits_class('native', d):