Makefile: add static build for oss-fuzz - make it semi-static + libBlocksRuntime
@@ -174,9 +174,13 @@ ifeq ($(COMPILER),clang)
CFLAGS_BLOCKS = -fblocks
ifneq ($(OS),Darwin)
+ ifeq ($(BUILD_OSSFUZZ_STATIC),true)
+ ARCH_LDFLAGS += -Wl,-Bstatic -lBlocksRuntime -Wl,-Bdynamic
+ else
ARCH_LDFLAGS += -lBlocksRuntime
endif
endif
+endif
SRCS := $(COMMON_SRCS) $(ARCH_SRCS)
OBJS := $(SRCS:.c=.o)
