kovdan01 wrote:

@MaskRay Unfortunately, the case I was initially trying to fix still has a 
problem after applying this patch. Consider 
`LLVM_DEFAULT_TARGET_TRIPLE=aarch64-linux-musl`. In such a case, running `clang 
-arch arm64e -c test.c -###` will show us `"-triple" 
"aarch64-unknown-linux-musl"`. As far as I understood from the comment 
https://github.com/llvm/llvm-project/pull/72821#issuecomment-1839435929, a 
warning `-Wunused-command-line-argument` should be emitted - but it is not 
(this does not change even if we really compile to the object file instead of 
just printing cli args with `-###`).

Are we supposed to pass `-target` to clang in addition to `-arch` if we want to 
be sure to compile with Apple's triple? It might be reasonable, but in such 
case many tests which use `-arch` without `-target` actually might run with 
undesired non-Apple triple - I find such behavior a bit misleading. Is this "by 
design"?

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

Reply via email to