Closed Bug 2063823 Opened 3 months ago Closed 2 months ago

MOZ_WINCONSOLE is defined but mostly unused since bug 1972782

Categories

(Firefox Build System :: General, task)

task

Tracking

(firefox157 fixed)

RESOLVED FIXED
157 Branch
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.

See Also: → 1659746

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: nobody → sguelton

It's unused at taskcluster level and we already have per-directory
configuration capability through WINCONFIG.

Attachment #9629290 - Attachment description: Bug 2063823 - define MOZ_WINCONFIG per directory when WINCONFIG is set in moz.build r=ahochheiden → Bug 2063823 - define MOZ_WINCONSOLE per directory when WINCONSOLE is set in moz.build r=ahochheiden
Attachment #9629291 - Attachment description: Bug 2063823 - Obsolete MOZ_WINCONFIG configure option r=ahochheiden → Bug 2063823 - Obsolete MOZ_WINCONSOLE configure option r=ahochheiden
Blocks: 2069767
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: