By default, Terra uses LLVM to auto-detect the CPU it's running on, and chooses a target triple and target CPU architecture native to that CPU. The latter is the moral equivalent of -march=native in Clang.
This creates problems for certain users who want to build on a different platform than they intend to run on. This isn't usually full-on cross-compilation. Typically it's variations on the same overall architecture (i.e., one generation of x86 to another, not x86 to ARM).
It would be nice to provide a flag or other option to specify Terra's native target triple and architecture so that the user can configure this more easily, without having to manually define a new target to pass to saveobj.
By default, Terra uses LLVM to auto-detect the CPU it's running on, and chooses a target triple and target CPU architecture native to that CPU. The latter is the moral equivalent of
-march=native
in Clang.This creates problems for certain users who want to build on a different platform than they intend to run on. This isn't usually full-on cross-compilation. Typically it's variations on the same overall architecture (i.e., one generation of x86 to another, not x86 to ARM).
It would be nice to provide a flag or other option to specify Terra's native target triple and architecture so that the user can configure this more easily, without having to manually define a new target to pass to
saveobj
.