From: Andrew Downing Date: Wed, 1 May 2024 21:31:30 +0000 (-0400) Subject: Update LOG_IMPL and LOG_TEE_IMPL (#7029) X-Git-Tag: upstream/0.0.4488~1707 X-Git-Url: https://git.djapps.eu/?a=commitdiff_plain;h=b0d943de179ad5dbd83d51f327fb566066f4ccda;p=pkg%2Fggml%2Fsources%2Fllama.cpp Update LOG_IMPL and LOG_TEE_IMPL (#7029) ROCm clang defines _MSC_VER which results in the wrong implementation of LOG_IMPL and LOG_TEE_IMPL being compiled. This fixes https://github.com/ggerganov/llama.cpp/issues/6972 --- diff --git a/common/log.h b/common/log.h index 2b2f0e45..6934c57b 100644 --- a/common/log.h +++ b/common/log.h @@ -234,7 +234,7 @@ inline std::string log_filename_generator_impl(LogTriState multilog, const std:: // INTERNAL, DO NOT USE // USE LOG() INSTEAD // -#if !defined(_MSC_VER) || defined(__INTEL_LLVM_COMPILER) +#if !defined(_MSC_VER) || defined(__INTEL_LLVM_COMPILER) || defined(__clang__) #define LOG_IMPL(str, ...) \ do { \ if (LOG_TARGET != nullptr) \ @@ -257,7 +257,7 @@ inline std::string log_filename_generator_impl(LogTriState multilog, const std:: // INTERNAL, DO NOT USE // USE LOG_TEE() INSTEAD // -#if !defined(_MSC_VER) || defined(__INTEL_LLVM_COMPILER) +#if !defined(_MSC_VER) || defined(__INTEL_LLVM_COMPILER) || defined(__clang__) #define LOG_TEE_IMPL(str, ...) \ do { \ if (LOG_TARGET != nullptr) \