aboutsummaryrefslogtreecommitdiffstats
path: root/util
diff options
context:
space:
mode:
authorakhropov <akhropov@yandex-team.com>2024-08-16 22:01:08 +0300
committerakhropov <akhropov@yandex-team.com>2024-08-16 22:12:43 +0300
commit4216b16bbaa20122c440773c8360527e846305cc (patch)
tree59728ce3686e3a5aa100776033e36fbc42a4df03 /util
parent0046422cdf7d52fdc7f8cacf92cb78744815b3af (diff)
downloadydb-4216b16bbaa20122c440773c8360527e846305cc.tar.gz
Allow to use clang < 13 as a CUDA host compiler (as intended for CUDA < 11.8).
f8fbe3627553dc1353ece3c098bb5df2ab788b92
Diffstat (limited to 'util')
-rw-r--r--util/system/compiler.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/util/system/compiler.h b/util/system/compiler.h
index 2b4b05fc5f..a076c0308c 100644
--- a/util/system/compiler.h
+++ b/util/system/compiler.h
@@ -666,7 +666,7 @@ Y_FORCE_INLINE void DoNotOptimizeAway(const T&) = delete;
* an object or reference refers to another object with a shorter lifetime.
*/
#if defined(__clang__) && defined(__cplusplus) && defined(__has_cpp_attribute)
- #if defined(__CUDACC__) && !Y_CUDA_AT_LEAST(11, 0)
+ #if defined(__CUDACC__) && (!Y_CUDA_AT_LEAST(11, 0) || (__clang_major__ < 13))
#define Y_LIFETIME_BOUND
#elif __has_cpp_attribute(clang::lifetimebound)
#define Y_LIFETIME_BOUND [[clang::lifetimebound]]