Open Bug 2092728 Opened 13 days ago Updated 13 days ago

Move `WINCONSOLE` handling from the mozbuild emitter into the program templates

Categories

(Firefox Build System :: General, task, P3)

task

Tracking

(Not tracked)

People

(Reporter: RyanVM, Unassigned)

References

Details

TreeMetadataEmitter.emit_from_context turns the WINCONSOLE moz.build variable into the console or GUI subsystem flags (WIN32_CONSOLE_EXE_LDFLAGS or WIN32_GUI_EXE_LDFLAGS) and the MOZ_WINCONSOLE define. That is per-program logic living in the generator, and the comment on the USE_STATIC_MSVCRT handling next to it already says templates are the better place for this kind of thing.

ahochheiden's comment on D342784 describes a template-based shape for it. One wrinkle: the flags land in the directory-wide WIN32_EXE_LDFLAGS, while a template keyword reads as per-program, and some directories (toolkit/mozapps/update/tests) call a program template more than once.

WIN32_WIDE_ENTRY, which bug 2091109 adds to the emitter for the mingw -municode flag, would fit the same shape.

You need to log in before you can comment on or make changes to this bug.