diff --git a/include/nccl_ofi_config_bottom.h b/include/nccl_ofi_config_bottom.h index 5c18d7c83..479906d87 100644 --- a/include/nccl_ofi_config_bottom.h +++ b/include/nccl_ofi_config_bottom.h @@ -9,7 +9,11 @@ #define OFI_LIKELY(x) __builtin_expect((x), 1) #define OFI_UNLIKELY(x) __builtin_expect((x), 0) +#ifdef __cplusplus +#define NCCL_OFI_EXPORT_SYMBOL __attribute__((visibility("default"))) [[maybe_unused]] +#else #define NCCL_OFI_EXPORT_SYMBOL __attribute__((visibility("default"))) +#endif #ifndef __cplusplus #define static_assert _Static_assert