not reliable way to detect target architecture
Metadata
Current evaluation
No evaluation has been recorded for this issue yet.
Issue body
There is no reliable way to determine target snap architecture or at least project.target_arch does not provide consistent value
tested with snapcraft version 3.0.1
Tested use cases:
native build:
project.target_arch - has expected value
SNAPCRAFT_ARCH_TRIPLET has host arch
cross build with --target-arch:
project.target_arch has expected target arch value
SNAPCRAFT_ARCH_TRIPLET has target arch
build on amd64 with following statement in snapcraft.yaml
architectures:
- build-on: [amd64, arm64]
run-on: arm64
expected values:
project.target_arch has target arch
SNAPCRAFT_ARCH_TRIPLET has target arch
actual values:
project.target_arch is empty
SNAPCRAFT_ARCH_TRIPLET has host arch
Evaluation history
No evaluation history available.