Skip to content

Remove amalgamations (irc.mod first)#1877

Draft
thommey wants to merge 3 commits intodevelopfrom
task/remove-amalgamations
Draft

Remove amalgamations (irc.mod first)#1877
thommey wants to merge 3 commits intodevelopfrom
task/remove-amalgamations

Conversation

@thommey
Copy link
Member

@thommey thommey commented Feb 16, 2026

Found by: thommey
Patch by: thommey

One-line summary:
Remove C file amalgamations (huge .c file by #include of other .c files) in modules

Additional description (if needed):
This drastically improves IDE support. irc_proto.h is the internal header file for irc.mod interdependencies. The key strategy to minimal build system changes is incremental linking of multiple .o files into a single .o file:

../irc.o: irc.o mode.o ...
	$(CC) -r -nostdlib -o ../irc.o irc.o mode.o ...

Disclaimer: 90% AI generated (Claude Opus 4.6)

LD gets passed as SHLIB_LD by the main Makefile to module making,
if shared modules are desired. That already includes -shared which
should really be in LDFLAGS instead ...

To avoid breaking the build system, just use CC directly, which is
already properly split from CFLAGS to use it here.
@michaelortmann
Copy link
Member

instead of removing the static specifier for functions, we should first check, if the function could be moved to stay static. for example, check_tcl_pubm() should simply be moved from irc.c to chan.c and stay static there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants