Author: Joseph Huber Date: 2024-03-18T12:12:17-05:00 New Revision: 280c7a9526a9ae7f959117c9cec94f8c8887f15c
URL: https://github.com/llvm/llvm-project/commit/280c7a9526a9ae7f959117c9cec94f8c8887f15c DIFF: https://github.com/llvm/llvm-project/commit/280c7a9526a9ae7f959117c9cec94f8c8887f15c.diff LOG: [Clang] Fix preprocessing device only in HIP mode 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. Added: Modified: clang/lib/Driver/Driver.cpp Removed: ################################################################################ diff --git a/clang/lib/Driver/Driver.cpp b/clang/lib/Driver/Driver.cpp index 5015ce9f6d68e0..1daf588142b3b4 100644 --- a/clang/lib/Driver/Driver.cpp +++ b/clang/lib/Driver/Driver.cpp @@ -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))) _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits