[PATCH] D157750: Properly handle -fsplit-machine-functions for fatbinary compilation
Fangrui Song via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Sat Aug 19 11:18:56 PDT 2023
MaskRay added a comment.
Sorry, but I think this change should be reverted.
(a) `-fsplit-machine-functions` on an unsupported target now emits a warning instead of an error. This diverges from the regular expectation for target-specific features.
% fclang --target=riscv64 -fsplit-machine-functions -c a.c
warning: -fsplit-machine-functions is not valid for riscv64 [-Wbackend-plugin]
`warn_drv_for_elf_only` is not necessary. We typically just use `err_drv_unsupported_opt_for_target`.
(b) the test needs substantial change (D158231 <https://reviews.llvm.org/D158231>)
(c) The error reporting should be on the driver side, not in backend. `void DiagnosticInfoMachineFunctionSplit::print(DiagnosticPrinter &DP) const` is not necessary.
At the very least, it should not be in the generic `IR/DiagnosticInfo.cpp`
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D157750/new/
https://reviews.llvm.org/D157750
More information about the cfe-commits
mailing list