Skip to content

Option to force the "native" arch for dockerfile/variables/manifest command

Currently when the dockerfile, variables, manifest commands expand package listing for the "native" arch, they all assume native means currently executing host architecture.

In practice, what projects consuming lcitool are assuming is that native architecture is always x86_64, because that's the most common builder environment in CI systems.

If developers run these lcitool comamnds on, say, an aarch64 host the content will differ from what's currently committed to git.

Currently we have a '--cross-arch ARCH-NAME' argument and the omission of this implies native and this is not extensible nicely.

We need to control the choice of architecture independently of native vs cross build choice.

This perhaps suggests a new pair of args

  • --target cross|native
  • --arch ARCH-NAME

The current --cross-arch ARCH-NAME would be an alias for --target cross --arch ARCH-NAME.

The current (undesirable) behaviour syntax would be implicitly --target native, with arch unset.

The actual desired behaviour for projects would be --target native --arch x86_64.

This would let them also generate native outputs for other archs --target native --arch aarch64 while on an x86_64 host for example.