Details
- Reviewers
Xiangling_L - Commits
- rG369c0e0f48dd: [AIX] Diagnose thinLTO usage in clang on AIX.
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
clang/lib/Driver/Driver.cpp | ||
---|---|---|
4006 | I would suggest a better way to specify the target is to use err_drv_unsupported_opt_for_target like above rather than hardcoding. |
clang/lib/Driver/Driver.cpp | ||
---|---|---|
4006 | using err_drv_unsupported_opt_for_target requires an option spelling, which implies we need an option present. Here I wanted to diagnose that thinLTO is not supported on AIX regardless of how we reached the decision that LTOMode is LTOK_Thin (for example, maybe -flto will start implying LTOK_Thin) So we have two options:
Diag(diag::err_drv_clang_unsupported) << ("thinLTO on target '" + RawTriple.str() + "'").c_str();
if (Arg *A = C.getArgs().getLastArg(options::OPT_flto_EQ)) if (!strcmp(A->getValue(), "thin")) Diag(diag::err_drv_unsupported_opt_for_target) << (A->getSpelling() + std::string("thin")).c_str() << RawTriple.str(); Please, let me know which you prefer and whether there's another way to do this. |
clang/lib/Driver/Driver.cpp | ||
---|---|---|
4006 | Thanks for your explanation and all possibilities provided. I think it makes sense to keep what you already have in this patch. |
I would suggest a better way to specify the target is to use err_drv_unsupported_opt_for_target like above rather than hardcoding.