[PATCH] D153667: [HIP]: Add -fhip-emit-relocatable to override link job creation for -fno-gpu-rdc
Yaxun Liu via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Jun 28 10:57:28 PDT 2023
yaxunl added inline comments.
================
Comment at: clang/lib/Driver/Driver.cpp:3335-3337
+ bool IsRDCMode = Args.hasFlag(options::OPT_fgpu_rdc,
+ options::OPT_fno_gpu_rdc, false);
+ bool DeviceOnly = C.getDriver().offloadDeviceOnly();
----------------
There are data members Relocatable and CompileDeviceOnly in the base class. You can use them instead of using local variables.
================
Comment at: clang/lib/Driver/Driver.cpp:3342
+ !IsRDCMode && DeviceOnly;
+ }
+
----------------
need to emit a diag diag::err_opt_not_valid_with_opt for fgpu-rdc
and diag::err_opt_not_valid_without_opt if it is not device only.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D153667/new/
https://reviews.llvm.org/D153667
More information about the cfe-commits
mailing list