[clang] [Driver] Mark -arch as TargetSpecific (PR #74365)

2023-12-05 Thread Daniil Kovalev via cfe-commits
kovdan01 wrote: OK, thanks for such a detailed explanation! Closing https://github.com/llvm/llvm-project/pull/72821 as not needed. https://github.com/llvm/llvm-project/pull/74365 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.ll

[clang] [Driver] Mark -arch as TargetSpecific (PR #74365)

2023-12-05 Thread Fangrui Song via cfe-commits
MaskRay wrote: When the target triple is aarch64 and `-arch ` is specified, e.g. `--target=aarch64 -arch arm64e`, there is currently no warning/error, because `clang/lib/Driver/ToolChains/Arch/AArch64.cpp` claims `OPT_arch` in quite a few places. We can safely remove these references now that

[clang] [Driver] Mark -arch as TargetSpecific (PR #74365)

2023-12-05 Thread Daniil Kovalev via cfe-commits
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-mu

[clang] [Driver] Mark -arch as TargetSpecific (PR #74365)

2023-12-05 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay closed 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

[clang] [Driver] Mark -arch as TargetSpecific (PR #74365)

2023-12-04 Thread Brad Smith via cfe-commits
https://github.com/brad0 approved this pull request. 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

[clang] [Driver] Mark -arch as TargetSpecific (PR #74365)

2023-12-04 Thread James Y Knight via cfe-commits
https://github.com/jyknight approved this pull request. 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

[clang] [Driver] Mark -arch as TargetSpecific (PR #74365)

2023-12-04 Thread Jon Roelofs via cfe-commits
https://github.com/jroelofs approved this pull request. 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

[clang] [Driver] Mark -arch as TargetSpecific (PR #74365)

2023-12-04 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-driver @llvm/pr-subscribers-clang Author: Fangrui Song (MaskRay) Changes `-arch` is a Darwin-specific option that is ignored for other targets and not known by GCC. ``` % clang -arch arm64 -c a.c clang: warning: argument unused during compilation:

[clang] [Driver] Mark -arch as TargetSpecific (PR #74365)

2023-12-04 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay created https://github.com/llvm/llvm-project/pull/74365 `-arch` is a Darwin-specific option that is ignored for other targets and not known by GCC. ``` % clang -arch arm64 -c a.c clang: warning: argument unused during compilation: '-arch arm64' [-Wunused-command-line-