[OpenMP] `-Xopenmp-target=<triple> <arg>` does not pass `<arg>` to `<triple>`
I don't know if this is the desired behavior, but I tried to pass -verify to the offloading toolchain. With -Xopenmp-target -verify I got the warning argument unused during compilation: '-Xopenmp-target -verify'. I instead tried to pass it as -Xopenmp-target=amdgcn-amd-amdhsa -verify to pass it to the offloading toolchain, and while the warning was not emitted, the -verify argument was also not passed to the offloading toolchain when compiling for an amdgcn-amd-amdhsa target. Is this the expected behavior?
A small update: One can for instance pass -fopenmp-simd or -Werror to the device with -Xopenmp-target=<triple>.
@llvm/issue-subscribers-openmp
@llvm/issue-subscribers-clang-driver
I'm pretty sure -verify is a CC1 option, meaning you need to pass it with -Xclang. However, using -Xopenmp-target or -Xarch_device both cannot forward options requiring arguments. E.g., the following doesn't work clang foo.c -Xarch_device -Xclang -Xarch_device -verify. Your best bet for now is probably to use -### to get the list of options that clang would generate and put it into a script, then add the desired option.