[clang] [Clang] Make `-Xarch_` handling generic for all toolchains (PR #125421)
Artem Belevich via cfe-commits
cfe-commits at lists.llvm.org
Mon Feb 3 11:44:53 PST 2025
================
@@ -1697,19 +1721,17 @@ llvm::opt::DerivedArgList *ToolChain::TranslateXarchArgs(
} else if (A->getOption().matches(options::OPT_Xarch_host)) {
NeedTrans = !IsDevice;
Skip = IsDevice;
- } else if (A->getOption().matches(options::OPT_Xarch__) && IsDevice) {
- // Do not translate -Xarch_ options for non CUDA/HIP toolchain since
- // they may need special translation.
- // Skip this argument unless the architecture matches BoundArch
- if (BoundArch.empty() || A->getValue(0) != BoundArch)
- Skip = true;
- else
- NeedTrans = true;
+ } else if (A->getOption().matches(options::OPT_Xarch__)) {
----------------
Artem-B wrote:
Ugh... Never mind, my brain was on vacation, apparently. Not sure if I need more coffee, or less coffee this morning.
https://github.com/llvm/llvm-project/pull/125421
More information about the cfe-commits
mailing list