rorth wrote:

When comparing the `clang` invocations between Solaris/amd64 (test `PASS`es) 
and Solaris/sparcv9 (test `FAIL`s), I find this crucial difference:
```
-"-funwind-tables=2"
-"-target-cpu"
-"x86-64"
-"-tune-cpu"
-"generic"
+"-mfloat-abi"
+"hard"
```
Looking closer, `-target-cpu` is only printed in 
`clang/lib/Driver/ToolChains/Clang.cpp` (`Clang::RenderTargetOptions`) iff 
`!CPU.empty()`.  However, in `clang/lib/Driver/ToolChains/Arch/Sparc.cpp` 
(`sparc::getSparcTargetCPU`) returns the empty string for a default SPARC V9 
compilation.

So expecting `-target-cpu` to always be present is a fallacy if not specifying 
a specific target.  If doing so (and this should be some `x86_64` target 
obviously), the tests needs to ascertain that the `clang` under test is built 
with `x86_64` support using `REQUIRES: x86-registered-target`.

https://github.com/llvm/llvm-project/pull/125646
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to