From 6bb56fec46879e8d976dc272098e29ef85fd349d Mon Sep 17 00:00:00 2001 From: Mark Dokter Date: Tue, 24 Sep 2024 17:14:44 +0200 Subject: [PATCH] [DAPHNE-#830] Fix duplicate symbol linker issue Compiling with Clang/LLD complains about duplicate symbols of supportsUnaryOp and supportsBinaryOp. --- src/runtime/local/kernels/BinaryOpCode.h | 6 +++--- src/runtime/local/kernels/UnaryOpCode.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/runtime/local/kernels/BinaryOpCode.h b/src/runtime/local/kernels/BinaryOpCode.h index 12a2fd35f..775d3af9a 100644 --- a/src/runtime/local/kernels/BinaryOpCode.h +++ b/src/runtime/local/kernels/BinaryOpCode.h @@ -93,7 +93,7 @@ static constexpr bool supportsBinaryOp = false; // simplicity). #define SUPPORT(Op, VT) \ template <> \ - constexpr bool supportsBinaryOp = true; + static constexpr bool supportsBinaryOp = true; // Generates code specifying that all binary operations of a certain category // should be supported on the given value type `VT` (for the result and the two @@ -154,10 +154,10 @@ SUPPORT_NUMERIC_INT(uint64_t) SUPPORT_NUMERIC_INT(uint32_t) SUPPORT_NUMERIC_INT(uint8_t) template <> -constexpr bool supportsBinaryOp = true; template <> -constexpr bool +static constexpr bool supportsBinaryOp = true; diff --git a/src/runtime/local/kernels/UnaryOpCode.h b/src/runtime/local/kernels/UnaryOpCode.h index 249d84982..d70bf5d38 100644 --- a/src/runtime/local/kernels/UnaryOpCode.h +++ b/src/runtime/local/kernels/UnaryOpCode.h @@ -88,7 +88,7 @@ static constexpr bool supportsUnaryOp = false; // on the value type `VT` (for both the result and the argument, for // simplicity). #define SUPPORT(Op, VT) \ - template <> constexpr bool supportsUnaryOp = true; + template <> static constexpr bool supportsUnaryOp = true; // Generates code specifying that all unary operations typically supported on // numeric value types should be supported on the given value type `VT`