MOZ_WINCONSOLE is defined but mostly unused since bug 1972782
Categories
(Firefox Build System :: General, task)
Tracking
(firefox157 fixed)
| Tracking | Status | |
|---|---|---|
| firefox157 | --- | fixed |
People
(Reporter: mathew.hodson, Assigned: sergesanspaille)
References
(Blocks 1 open bug)
Details
Attachments
(2 external files)
In moz.configure "MOZ_WINCONSOLE" is defined but it isn't really used since bug 1972782.
There are two places where it is used:
https://searchfox.org/firefox-main/rev/dd2579cb6e7f1761a27ce64fb84d92c61d85c27f/browser/app/nsBrowserApp.cpp#128
https://searchfox.org/firefox-main/rev/dd2579cb6e7f1761a27ce64fb84d92c61d85c27f/toolkit/xre/nsAppRunner.cpp#492
It seems like those two places are going to be broken because they expect it to be defined when the console is used but it won't be since bug 1972782.
Maybe those two places should be replaced with #if defined(MOZ_ASAN) || defined(DEBUG) since that's what's being checked in moz.build now.
| Assignee | ||
Comment 1•2 months ago
|
||
I re-checked https://phabricator.services.mozilla.com/D254178 and I fail to see any place that actually sets the MOZ_WINCONSOLE macro at C preprocessor level, I only see it being defined at Make level.
I used git's pickaxe to better understand the situation and I found commit 79195bc5d59f0aafdd4811f0dadaf2c52e55a9b6 to be the point that introduced the define in configure.in. At that point we actually loose the link between the option and the define.
That file got renamed into old-configure.in, and at some point (5a95c565acf7460fb10a849bd1af93ae96ee14a8) MOZ_WINCONSOLE got turned into a moz.configure option, but we still have no definition of the macro at the C++ level, as far as I understand. So it seems that MOZ_WINCONSOLE is only defined if set at configure time, which arguably never happens. The appropriate fix seems to define it based on the info in moz.build.
| Assignee | ||
Comment 2•2 months ago
|
||
| Assignee | ||
Comment 3•2 months ago
|
||
It's unused at taskcluster level and we already have per-directory
configuration capability through WINCONFIG.
Updated•2 months ago
|
Updated•2 months ago
|
Comment 5•2 months ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/fcd41da62e2c
https://hg.mozilla.org/mozilla-central/rev/7401fca914b8
Description
•