ROCm / ROCm-CompilerSupport

The compiler support repository provides various Lightning Compiler related services.
47 stars 31 forks source link

Specify clang exe path in Driver Creation #50

Closed littlewu2508 closed 5 months ago

littlewu2508 commented 1 year ago

By doing so, TheDriver can get the correct resource dir.

Closes: #48 Reference: #49

littlewu2508 commented 1 year ago

I believe this is the ultimate fix for #48, and its related issue #49.

https://github.com/RadeonOpenCompute/ROCm-CompilerSupport/blob/846cd67177bcf91dbbb941d525fff99d04364a0b/lib/comgr/src/comgr-compiler.cpp#L1021-L1024

Manually specifying ClangIncludePath is not needed if the driver is created with the correct clang binary path as first argument. In #48 it can be seen that clang driver can add the correct -resource-dir and -internal-isystem itself.

littlewu2508 commented 1 year ago

With this patch, compile_hip_test_in_process passed on Gentoo, and if I changed clang version from 15.0.1 to 15.0.3 the tests can also pass without recompiling libamd_comgr.so.

lamb-j commented 5 months ago

Merged here https://github.com/ROCm/llvm-project/commit/6eb9d123a905464a2c20a5605e5dbf599af17fde

Thanks for bringing this up!