llvm / llvm-project

The LLVM Project is a collection of modular and reusable compiler and toolchain technologies.
http://llvm.org
Other
27.64k stars 11.37k forks source link

test-release.sh -triple doesn't set LLVM_HOST_TRIPLE #81235

Open rorth opened 6 months ago

rorth commented 6 months ago

When building LLVM 18.1.0 rc2 on Linux/sparc64, I passed -triple sparcv9-unknown-linux-gnu (overriding the config.guess default of sparc64-unknown-linux-gnu to avoid the inconsistency meant to be handled by [Driver] Support non-canonical triples with new runtime lib layout).

Unfortunately, the only effect of test-release.sh -triple <triple> is to change the triple used in the final tarball. Unexpectedly, to actually build LLVM with a different triple requires to also pass -configure-flags "-DLLVM_HOST_TRIPLE=$triple" which is highly unintuitive and in this case only noticed after the build has finished.

llvmbot commented 6 months ago

@llvm/issue-subscribers-infrastructure

Author: Rainer Orth (rorth)

When building LLVM 18.1.0 rc2 on Linux/sparc64, I passed `-triple sparcv9-unknown-linux-gnu` (overriding the `config.guess` default of `sparc64-unknown-linux-gnu` to avoid the inconsistency meant to be handled by [[Driver] Support non-canonical triples with new runtime lib layout](https://reviews.llvm.org/D133407)). Unfortunately, the only effect of `test-release.sh -triple <triple>` is to change the triple used in the final tarball. Unexpectedly, to actually build LLVM with a different triple requires to also pass `-configure-flags "-DLLVM_HOST_TRIPLE=$triple"` which is highly unintuitive and in this case only noticed after the build has finished.