From 3f55a9e636a67b92ccd15b07b15622547760f8ce Mon Sep 17 00:00:00 2001 From: ausimian Date: Tue, 14 Apr 2026 10:39:02 +0930 Subject: [PATCH] Silence third-party header warnings via -isystem MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit MLX's bf16.h triggers -Wdeprecated-copy on its own implicit copy assignment operator. The warning isn't actionable from our side — it's an upstream issue — but it clutters the build log and, with -Werror, would break CI. Switch `-I` to `-isystem` for both MLX and fine includes so the compiler treats them as system headers and suppresses diagnostics inside them. Our own code keeps full warning coverage under $(ERTS_INCLUDE_DIR)/-I paths. --- Makefile | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index beca450..3299211 100644 --- a/Makefile +++ b/Makefile @@ -11,7 +11,11 @@ OBJECTS := $(patsubst c_src/%.cpp,$(BUILD_DIR)/%.o,$(SOURCES)) # Flags CXXFLAGS := -std=c++17 -O3 -fPIC -fvisibility=hidden -Wall -Wextra -CXXFLAGS += -I$(ERTS_INCLUDE_DIR) -I$(FINE_INCLUDE_DIR) -I$(MLX_INCLUDE_DIR) +CXXFLAGS += -I$(ERTS_INCLUDE_DIR) +# Third-party headers: use -isystem so warnings inside them (e.g. MLX's +# -Wdeprecated-copy on _MLX_BFloat16) don't clutter our builds or trip +# -Werror. +CXXFLAGS += -isystem $(FINE_INCLUDE_DIR) -isystem $(MLX_INCLUDE_DIR) LDFLAGS := -L$(MLX_LIB_DIR) -lmlx -shared