You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iceberg.apache.org by ga...@apache.org on 2026/06/29 03:29:47 UTC

(iceberg-cpp) branch main updated: build: silence benign MSVC C4251/C4275 dll-interface warnings (#768)

This is an automated email from the ASF dual-hosted git repository.

wgtmac pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/iceberg-cpp.git


The following commit(s) were added to refs/heads/main by this push:
     new b65352a0 build: silence benign MSVC C4251/C4275 dll-interface warnings (#768)
b65352a0 is described below

commit b65352a095dcfe35d82d4d849fcbababc7afcc14
Author: Abanoub Doss <ab...@gmail.com>
AuthorDate: Sun Jun 28 22:29:41 2026 -0500

    build: silence benign MSVC C4251/C4275 dll-interface warnings (#768)
    
    ## What
    Add `/wd4251` and `/wd4275` in `meson.build`, applied only where the
    compiler accepts them.
    
    ## Why
    The MSVC build prints tens of thousands of lines of C4251/C4275 warnings
    about exported classes (like `TableProperties` and `ConfigBase`/`Entry`)
    that hold standard-library members. These are harmless when everything
    is built as one DLL with one compiler, but they bury the warnings that
    actually matter in the Windows logs. The flags are ignored on GCC and
    Clang, which don't have these warnings.
    
    For reference, the average Meson Windows build logs ~22k of these
    warning lines (971 unique messages), drowning the handful of real
    warnings in the same run:
    
    https://github.com/apache/iceberg-cpp/actions/runs/27870777076/job/82482181520
    
    Co-authored-by: Abanoub Doss <ab...@gmail.com>
---
 meson.build | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/meson.build b/meson.build
index 46446cd8..199ac1fe 100644
--- a/meson.build
+++ b/meson.build
@@ -31,7 +31,9 @@ project(
 )
 
 cpp = meson.get_compiler('cpp')
-args = cpp.get_supported_arguments(['/bigobj'])
+# Hide two noisy MSVC warnings (C4251/C4275) about standard-library types used in
+# our public classes. They're harmless because the whole library ships as one DLL.
+args = cpp.get_supported_arguments(['/bigobj', '/wd4251', '/wd4275'])
 add_project_arguments(args, language: 'cpp')
 
 subdir('src')