Skip to content

Commit c7988a4

Browse files
authored
[Comgr] Disable PCH probe (llvm#3440)
PCH probe is used to promote -include a.h into -include-pch a.h.pch. Nothing guarantees that the process has read-access to a.h.pch, or that it is in the correct format. Related to [SWDEV-547683: hiprtcCompileProgram fails if inaccessible hiprtc_runtime.h.pch exists](https://ontrack-internal.amd.com/browse/SWDEV-547683)
1 parent ae68759 commit c7988a4

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

amd/comgr/src/comgr-compiler.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -750,6 +750,11 @@ AMDGPUCompiler::executeInProcessDriver(ArrayRef<const char *> Args) {
750750
"AMDGPU Code Object Manager", OverlayFS);
751751
TheDriver.setCheckInputsExist(false);
752752

753+
// We do not want the driver to promote -include into -include-pch.
754+
// Otherwise, the driver may pick PCH in the wrong format, without permissions,
755+
// in the process's CWD.
756+
TheDriver.setProbePrecompiled(false);
757+
753758
// Log arguments used to build compilation
754759
if (env::shouldEmitVerboseLogs()) {
755760
LogS << " Compilation Args: ";

0 commit comments

Comments
 (0)