================
@@ -68,7 +68,9 @@ llvm::opt::DerivedArgList 
*AMDGPUOpenMPToolChain::TranslateArgs(
     Action::OffloadKind DeviceOffloadKind) const {
   DerivedArgList *DAL =
       HostTC.TranslateArgs(Args, BoundArch, DeviceOffloadKind);
-  if (!DAL || Args.hasArg(options::OPT_fsanitize_EQ))
+  // Skip sanitize options passed from the HostTC. The decision to instrument
+  // device code is computed only by 'shouldSkipSanitizeOption'.
+  if (!DAL && DAL->hasArg(options::OPT_fsanitize_EQ))
----------------
jhuber6 wrote:

I just don't really understand what problem this is meant to be solving. We 
don't need to do this for *any* of the other options that the device toolchain 
uses, so what's special about this one? If the user does `-fsanitize=address` 
it will show up in the device toolchain args. if it's not legal for some case, 
then emit an error. If the user doesn't want it then they can do `-Xarch-host 
-fsanitize=address`.

https://github.com/llvm/llvm-project/pull/126671
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to