llvm-project icon indicating copy to clipboard operation
llvm-project copied to clipboard

[Clang] Wrong help text for `--offload-host-device` flag

Open AntonRydahl opened this issue 3 years ago • 3 comments

I have been making an overview of offloading related flags, and I stumbled upon the help text for --offload-host-device. I am pretty sure that the help text is wrong. It says

$ clang --help
  --offload-host-device   Only compile for the offloading host.

, but at the same time the flag --offload-host-device is an alias of --cuda-compile-host-device as far as I can see from clang/include/clang/Driver/Options.td:2883:

def cuda_compile_host_device : Flag<["--"], "cuda-compile-host-device">, Alias<offload_host_device>,
  HelpText<"Compile CUDA code for both host and device (default). Has no "
  "effect on non-CUDA compilations.">;

May I correct the help text to Compile the code for both host and device or something like that?

AntonRydahl avatar Jul 31 '23 02:07 AntonRydahl

Good catch! It's host + device obviously.

danix800 avatar Jul 31 '23 02:07 danix800

Thanks! I have prepared a patch on Phabricator: https://reviews.llvm.org/D156641

AntonRydahl avatar Jul 31 '23 03:07 AntonRydahl

@llvm/issue-subscribers-clang-driver

llvmbot avatar Jul 31 '23 03:07 llvmbot