[PATCH] D101630: [HIP] Fix device-only compilation
Jan Svoboda via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue May 4 05:00:50 PDT 2021
jansvoboda11 added inline comments.
================
Comment at: clang/include/clang/Driver/Options.td:977
NegFlag<SetFalse>>;
+defm hip_bundle_device_output : BoolFOption<"hip-bundle-device-output", EmptyKPM, DefaultTrue,
+ PosFlag<SetTrue, []>,
----------------
The TableGen marshalling infrastructure (`BoolFOption` et. al.) is only intended for flags that map to the `-cc1` frontend and its `CompilerInvocation` class. (`EmptyKPM` that disables this mapping shouldn't even exist anymore.)
Since these flags only work on the driver level, use something like this instead:
```
def fhip_bundle_device_output : Flag<["-"], "fhip-bundle-device-output">, Group<f_Group>;
def fno_hip_bundle_device_output : Flag<["-"], "fno-hip-bundle-device-output">, Group<f_Group>, HelpText<"Do not bundle output files of HIP device compilation">;
```
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D101630/new/
https://reviews.llvm.org/D101630
More information about the cfe-commits
mailing list