Platform/Platform-specific build defines: Difference between revisions
< Platform
Jump to navigation
Jump to search
(Add a green background for the trues.) |
(Decluttering a bit) |
||
| Line 1: | Line 1: | ||
In the Gecko code we have a bunch of preprocessor conditions that help us conditionally compile code for specific platforms. These can get confusing so here is a handy-dandy table to help you keep them straight. | In the Gecko code we have a bunch of preprocessor conditions that help us conditionally compile code for specific platforms. These can get confusing so here is a handy-dandy table to help you keep them straight. | ||
{|border="1" | {|border="1" style="text-align: center;" | ||
!OS | !OS | ||
!colspan="2"|Windows | !colspan="2"|Windows | ||
| Line 22: | Line 22: | ||
|- | |- | ||
!XP_WIN | !XP_WIN | ||
|style="background: green; color: white"| | |style="background: green; color: white"|✓ | ||
|style="background: green; color: white"| | |style="background: green; color: white"|✓ | ||
| | | || | ||
| | | || || | ||
| | | || | ||
| | | | ||
|- | |- | ||
!XP_DARWIN | !XP_DARWIN | ||
| | | || | ||
|style="background: green; color: white"| | |style="background: green; color: white"|✓ | ||
|style="background: green; color: white"| | |style="background: green; color: white"|✓ | ||
| | | || || | ||
| | | || | ||
|style="background: green; color: white"| | |style="background: green; color: white"|✓ | ||
|- | |- | ||
!XP_MACOSX | !XP_MACOSX | ||
| | | || | ||
|style="background: green; color: white"| | |style="background: green; color: white"|✓ | ||
|style="background: green; color: white"| | |style="background: green; color: white"|✓ | ||
| | | || || | ||
| | | || | ||
| | | | ||
|- | |- | ||
!XP_IOS | !XP_IOS | ||
| | | || | ||
| | | || | ||
| | | || || | ||
| | | || | ||
|style="background: green; color: white"| | |style="background: green; color: white"|✓ | ||
|- | |- | ||
!XP_UNIX | !XP_UNIX | ||
| | | || | ||
|style="background: green; color: white"| | |style="background: green; color: white"|✓ | ||
|style="background: green; color: white"| | |style="background: green; color: white"|✓ | ||
|style="background: green; color: white"| | |style="background: green; color: white"|✓ | ||
|style="background: green; color: white"| | |style="background: green; color: white"|✓ | ||
|style="background: green; color: white"| | |style="background: green; color: white"|✓ | ||
|style="background: green; color: white"| | |style="background: green; color: white"|✓ | ||
|style="background: green; color: white"| | |style="background: green; color: white"|✓ | ||
|style="background: green; color: white"| | |style="background: green; color: white"|✓ | ||
|- | |- | ||
!XP_LINUX | !XP_LINUX | ||
| | | || | ||
| | | || | ||
|style="background: green; color: white"| | |style="background: green; color: white"|✓ | ||
|style="background: green; color: white"| | |style="background: green; color: white"|✓ | ||
|style="background: green; color: white"| | |style="background: green; color: white"|✓ | ||
|style="background: green; color: white"| | |style="background: green; color: white"|✓ | ||
|style="background: green; color: white"| | |style="background: green; color: white"|✓ | ||
| | | | ||
|- | |- | ||
!ANDROID | !ANDROID | ||
| | | || | ||
| | | || | ||
| | | || || | ||
|style="background: green; color: white"| | |style="background: green; color: white"|✓ | ||
|style="background: green; color: white"| | |style="background: green; color: white"|✓ | ||
| | | | ||
|- | |- | ||
!MOZ_B2G | !MOZ_B2G | ||
| | | | ||
|style="background: green; color: white"| | |style="background: green; color: white"|✓ | ||
| | | | ||
|style="background: green; color: white"| | |style="background: green; color: white"|✓ | ||
| | | | ||
|style="background: green; color: white"| | |style="background: green; color: white"|✓ | ||
|style="background: green; color: white"| | |style="background: green; color: white"|✓ | ||
| | | | ||
|style="background: green; color: white"| | |style="background: green; color: white"|✓ | ||
| | | | ||
|- | |- | ||
!MOZ_WIDGET_GTK | !MOZ_WIDGET_GTK | ||
| | | || | ||
| | | || | ||
|style="background: green; color: white"| | |style="background: green; color: white"|✓ | ||
|style="background: green; color: white"| | |style="background: green; color: white"|✓ | ||
|style="background: green; color: white"| | |style="background: green; color: white"|✓ | ||
| | | || | ||
| | | | ||
|- | |- | ||
!MOZ_WIDGET_ANDROID | !MOZ_WIDGET_ANDROID | ||
| | | || | ||
| | | || | ||
| | | || || | ||
|style="background: green; color: white"| | |style="background: green; color: white"|✓ | ||
| | | | ||
| | | | ||
|- | |- | ||
!MOZ_WIDGET_GONK | !MOZ_WIDGET_GONK | ||
| | | || | ||
| | | || | ||
| | | || || | ||
| | | | ||
|style="background: green; color: white"| | |style="background: green; color: white"|✓ | ||
| | | | ||
|- | |- | ||
!MOZ_WIDGET_UIKIT | !MOZ_WIDGET_UIKIT | ||
| | | || | ||
| | | || | ||
| | | || || | ||
| | | || | ||
|style="background: green; color: white"| | |style="background: green; color: white"|✓ | ||
|} | |} | ||
You may also be interested in [[Platform/Channel-specific_build_defines]] | You may also be interested in [[Platform/Channel-specific_build_defines]] | ||
Revision as of 03:19, 4 June 2015
In the Gecko code we have a bunch of preprocessor conditions that help us conditionally compile code for specific platforms. These can get confusing so here is a handy-dandy table to help you keep them straight.
| OS | Windows | OS X | Linux-gtk | Android | iOS | |||||
|---|---|---|---|---|---|---|---|---|---|---|
| Product | Desktop | B2G | Desktop | B2G | Desktop | B2G | Mulet | Fennec | B2G | iOS |
| XP_WIN | ✓ | ✓ | ||||||||
| XP_DARWIN | ✓ | ✓ | ✓ | |||||||
| XP_MACOSX | ✓ | ✓ | ||||||||
| XP_IOS | ✓ | |||||||||
| XP_UNIX | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ||
| XP_LINUX | ✓ | ✓ | ✓ | ✓ | ✓ | |||||
| ANDROID | ✓ | ✓ | ||||||||
| MOZ_B2G | ✓ | ✓ | ✓ | ✓ | ✓ | |||||
| MOZ_WIDGET_GTK | ✓ | ✓ | ✓ | |||||||
| MOZ_WIDGET_ANDROID | ✓ | |||||||||
| MOZ_WIDGET_GONK | ✓ | |||||||||
| MOZ_WIDGET_UIKIT | ✓ | |||||||||
You may also be interested in Platform/Channel-specific_build_defines