diff --git a/CMakeLists.txt b/CMakeLists.txt index 4b0a0998614..377072b4014 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -366,6 +366,8 @@ add_custom_command(TARGET clang_links POST_BUILD ) # install certain LLVM libraries needed by HIP +# TODO: why HIP needs this random soup is unclear; the HC specific passes are +# definitely not "certain LLVM libraries needed by HIP". install(PROGRAMS $ $ $ @@ -374,7 +376,6 @@ install(PROGRAMS $ $ $ $ - $ DESTINATION lib COMPONENT compiler ) diff --git a/include/hc.hpp b/include/hc.hpp index f1800d431e6..fbb15ff0585 100644 --- a/include/hc.hpp +++ b/include/hc.hpp @@ -12,6 +12,10 @@ #pragma once +#if !defined(__HIPCC__) + #warning "This header is only intended for HIP usage, and not for direct inclusion." +#endif + #include "hc_defines.h" #include "kalmar_exception.h" #include "kalmar_runtime.h" diff --git a/include/hc_am.hpp b/include/hc_am.hpp index 592efa6e59c..8f86d54c6b8 100644 --- a/include/hc_am.hpp +++ b/include/hc_am.hpp @@ -1,5 +1,9 @@ #pragma once +#if !defined(__HIPCC__) + #warning "This header is only intended for HIP usage, and not for direct inclusion." +#endif + #include "hc.hpp" #include #include diff --git a/include/hc_am_internal.hpp b/include/hc_am_internal.hpp index 029d420e6b5..2341e23261f 100644 --- a/include/hc_am_internal.hpp +++ b/include/hc_am_internal.hpp @@ -1,5 +1,9 @@ #pragma once +#if !defined(__HIPCC__) + #warning "This header is only intended for HIP usage, and not for direct inclusion." +#endif + #include "hc_am.hpp" namespace hc { diff --git a/include/hc_defines.h b/include/hc_defines.h index 23a092c667a..721af248b74 100644 --- a/include/hc_defines.h +++ b/include/hc_defines.h @@ -1,5 +1,9 @@ #pragma once +#if !defined(__HIPCC__) + #warning "This header is only intended for HIP usage, and not for direct inclusion." +#endif + // C++ headers #include #include diff --git a/include/hc_math.hpp b/include/hc_math.hpp index f27dd4ee76b..5f320879f51 100644 --- a/include/hc_math.hpp +++ b/include/hc_math.hpp @@ -1,5 +1,9 @@ #pragma once +#if !defined(__HIPCC__) + #warning "This header is only intended for HIP usage, and not for direct inclusion." +#endif + #include "hc.hpp" #include diff --git a/include/hc_printf.hpp b/include/hc_printf.hpp index b03e645da5c..ecbd8e32e15 100644 --- a/include/hc_printf.hpp +++ b/include/hc_printf.hpp @@ -1,5 +1,9 @@ #pragma once +#if !defined(__HIPCC__) + #warning "This header is only intended for HIP usage, and not for direct inclusion." +#endif + #include #include #include diff --git a/include/hc_rt_debug.h b/include/hc_rt_debug.h index e5c624ba3ad..182fee92df0 100644 --- a/include/hc_rt_debug.h +++ b/include/hc_rt_debug.h @@ -1,5 +1,9 @@ #pragma once +#if !defined(__HIPCC__) + #warning "This header is only intended for HIP usage, and not for direct inclusion." +#endif + #include #include #ifndef USE_LIBCXX diff --git a/include/hcc_features.hpp b/include/hcc_features.hpp index 4191f79cbae..9e620716395 100644 --- a/include/hcc_features.hpp +++ b/include/hcc_features.hpp @@ -4,6 +4,10 @@ // #pragma once +#if !defined(__HIPCC__) + #warning "This header is only intended for HIP usage, and not for direct inclusion." +#endif + // // If set, am_memtracker_update API accepts appPtr parm #define __HCC_HAS_EXTENDED_AM_MEMTRACKER_UPDATE (1) diff --git a/include/kalmar_aligned_alloc.h b/include/kalmar_aligned_alloc.h index 81bb0cee790..4cb5d27c218 100644 --- a/include/kalmar_aligned_alloc.h +++ b/include/kalmar_aligned_alloc.h @@ -7,6 +7,10 @@ #pragma once +#if !defined(__HIPCC__) + #warning "This header is only intended for HIP usage, and not for direct inclusion." +#endif + #include #include #include diff --git a/include/kalmar_exception.h b/include/kalmar_exception.h index b865540f9fc..227c1f6a08a 100644 --- a/include/kalmar_exception.h +++ b/include/kalmar_exception.h @@ -7,6 +7,10 @@ #pragma once +#if !defined(__HIPCC__) + #warning "This header is only intended for HIP usage, and not for direct inclusion." +#endif + #include #include diff --git a/include/kalmar_runtime.h b/include/kalmar_runtime.h index 1da2df5046a..d881b8591cf 100644 --- a/include/kalmar_runtime.h +++ b/include/kalmar_runtime.h @@ -1,5 +1,9 @@ #pragma once +#if !defined(__HIPCC__) + #warning "This header is only intended for HIP usage, and not for direct inclusion." +#endif + #include "hc_defines.h" #include "kalmar_aligned_alloc.h"