diff options
author | mikhnenko <[email protected]> | 2025-08-27 10:33:29 +0300 |
---|---|---|
committer | mikhnenko <[email protected]> | 2025-08-27 10:59:58 +0300 |
commit | 1462fc75b21e6ae4e2029e95fbc1df56af3b355d (patch) | |
tree | 7f60a900de99f9f038642646887da16d96f675c8 /contrib/restricted/abseil-cpp-tstring/patches/fix-cuda.sh | |
parent | 9edf85d8840072bbd1089c51f39f54109bb7a104 (diff) |
clang20: Hide built-in functions for abseil to support clang20+cuda
commit_hash:602831c302dc4117f164efc02ff8636bb417c064
Diffstat (limited to 'contrib/restricted/abseil-cpp-tstring/patches/fix-cuda.sh')
-rw-r--r-- | contrib/restricted/abseil-cpp-tstring/patches/fix-cuda.sh | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/contrib/restricted/abseil-cpp-tstring/patches/fix-cuda.sh b/contrib/restricted/abseil-cpp-tstring/patches/fix-cuda.sh new file mode 100644 index 00000000000..40e31584435 --- /dev/null +++ b/contrib/restricted/abseil-cpp-tstring/patches/fix-cuda.sh @@ -0,0 +1,13 @@ +set -xue + +replace_has_keyword_in() +{ + sed 's/#if Y_ABSL_HAVE_'${1}'('${2}')/#if Y_ABSL_HAVE_'${1}'('${2}') \&\& !defined(__CUDACC__)/g' -i ${3} +} + +# cuda 10 support +replace_has_keyword_in ATTRIBUTE enable_if y_absl/types/compare.h + +# clang20 + cuda 12 support +replace_has_keyword_in BUILTIN __builtin_clzg y_absl/numeric/internal/bits.h +replace_has_keyword_in BUILTIN __builtin_ctzg y_absl/numeric/internal/bits.h |