Skip to content

Commit

Permalink
[Clang] Fix preprocessing device only in HIP mode
Browse files Browse the repository at this point in the history
Summary:
A recent change made the HIP compilation bundle by default. However we
don't want to do this for `-E`, which silently broke some handling.
  • Loading branch information
jhuber6 committed Mar 18, 2024
1 parent ece2903 commit 280c7a9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion clang/lib/Driver/Driver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4647,7 +4647,8 @@ Action *Driver::BuildOffloadingActions(Compilation &C,

// All kinds exit now in device-only mode except for non-RDC mode HIP.
if (offloadDeviceOnly() &&
(!C.isOffloadingHostKind(Action::OFK_HIP) ||
(getFinalPhase(Args) == phases::Preprocess ||
!C.isOffloadingHostKind(Action::OFK_HIP) ||
!Args.hasFlag(options::OPT_gpu_bundle_output,
options::OPT_no_gpu_bundle_output, true) ||
Args.hasFlag(options::OPT_fgpu_rdc, options::OPT_fno_gpu_rdc, false)))
Expand Down

0 comments on commit 280c7a9

Please sign in to comment.