[clang] [Clang] Make `-Xarch_` handling generic for all toolchains (PR #125421)
Joseph Huber via cfe-commits
cfe-commits at lists.llvm.org
Mon Feb 3 11:39:44 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__)) {
----------------
jhuber6 wrote:
These are different options right? How could someone pass `-Xarch_device -Xarch_x86_64` or similar? It'd just be parsed as `-Xarch_device -option1 -Xarch_x86_64 -option2` so they'd just be handled separately.
https://github.com/llvm/llvm-project/pull/125421
More information about the cfe-commits
mailing list