mingw is less aggressive about dead code removal that other gccs are, so

we need to add dependencies in places where they're really not used.
This commit is contained in:
David Given
2025-08-27 03:06:31 +02:00
parent e61fcf1d9b
commit a1e2191ad5
3 changed files with 69 additions and 3 deletions

View File

@@ -13,12 +13,14 @@ ifeq ($(BUILDTYPE),windows)
CC = $(MINGW)gcc CC = $(MINGW)gcc
CXX = $(MINGW)g++ -std=c++20 CXX = $(MINGW)g++ -std=c++20
CFLAGS += -g -O3 \ CFLAGS += -g -O3 \
-Wno-unknown-warning-option -Wno-unknown-warning-option \
-ffunction-sections \
-fdata-sections
CXXFLAGS += \ CXXFLAGS += \
-fext-numeric-literals \ -fext-numeric-literals \
-Wno-deprecated-enum-float-conversion \ -Wno-deprecated-enum-float-conversion \
-Wno-deprecated-enum-enum-conversion -Wno-deprecated-enum-enum-conversion
LDFLAGS += -static LDFLAGS += -static -Wl,--gc-sections
AR = $(MINGW)ar AR = $(MINGW)ar
PKG_CONFIG = $(MINGW)pkg-config -static PKG_CONFIG = $(MINGW)pkg-config -static
WINDRES = $(MINGW)windres WINDRES = $(MINGW)windres

View File

@@ -4,11 +4,72 @@
#include <fstream> #include <fstream>
#include "fmt/format.h" #include "fmt/format.h"
#include "lib/core/globals.h" #include "lib/core/globals.h"
#include "lib/core/logger.h"
#include "tests/testproto.pb.h" #include "tests/testproto.pb.h"
#include "lib/config/config.pb.h" #include "lib/config/config.pb.h"
#include <sstream> #include <sstream>
#include <locale> #include <locale>
void renderLogMessage(
LogRenderer& r, std::shared_ptr<const BeginSpeedOperationLogMessage> m)
{
}
void renderLogMessage(
LogRenderer& r, std::shared_ptr<const EndSpeedOperationLogMessage> m)
{
}
void renderLogMessage(
LogRenderer& r, std::shared_ptr<const BeginWriteOperationLogMessage> m)
{
}
void renderLogMessage(
LogRenderer& r, std::shared_ptr<const EndWriteOperationLogMessage> m)
{
}
void renderLogMessage(
LogRenderer& r, std::shared_ptr<const BeginReadOperationLogMessage> m)
{
}
void renderLogMessage(
LogRenderer& r, std::shared_ptr<const EndReadOperationLogMessage> m)
{
}
void renderLogMessage(
LogRenderer& r, std::shared_ptr<const TrackReadLogMessage> m)
{
}
void renderLogMessage(
LogRenderer& r, std::shared_ptr<const DiskReadLogMessage> m)
{
}
void renderLogMessage(
LogRenderer& r, std::shared_ptr<const BeginOperationLogMessage> m)
{
}
void renderLogMessage(
LogRenderer& r, std::shared_ptr<const EndOperationLogMessage> m)
{
}
void renderLogMessage(
LogRenderer& r, std::shared_ptr<const OperationProgressLogMessage> m)
{
}
void renderLogMessage(
LogRenderer& r, std::shared_ptr<const OptionLogMessage> m)
{
}
const std::string protoname = STRINGIFY(PROTO); const std::string protoname = STRINGIFY(PROTO);
static uint32_t readu8(std::string::iterator& it, std::string::iterator end) static uint32_t readu8(std::string::iterator& it, std::string::iterator end)

View File

@@ -64,11 +64,14 @@ export(
"+protobuf_lib", "+protobuf_lib",
"+protocol", "+protocol",
".+test_proto_lib", ".+test_proto_lib",
"dep/alphanum",
"dep/snowhouse", "dep/snowhouse",
"lib/algorithms",
"lib/config", "lib/config",
"lib/core", "lib/core",
"lib/data",
"lib/fluxsource+proto_lib", "lib/fluxsource+proto_lib",
"dep/alphanum", "src/formats",
], ],
), ),
) )