Platform/Platform-specific build defines: Difference between revisions
< Platform
Jump to navigation
Jump to search
m (Small attempt at reformatting the wikitext to make it easier to follow (checking if it doesn't get clobbered during save)) |
m (Added wikitext comment to make the tables easier to edit. Also made tables width:100%) |
||
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" style="text-align: center;" | {|border="1" style="text-align: center; width: 100%" | ||
!OS | !OS | ||
!colspan="3"|Windows | !colspan="3"|Windows | ||
Line 45: | Line 45: | ||
|- | |- | ||
!XP_DARWIN | !XP_DARWIN | ||
| | <!-- Windows: Desktop, B2G, Mulet --> | ||
| | | | ||
| | | | ||
|style="background: green; color: white"|✓ | | | ||
|style="background: green; color: white"|✓ | <!-- OS X: Desktop, B2G, Mulet --> | ||
|style="background: green; color: white"|✓ | | style="background: green; color: white"|✓ | ||
| | | style="background: green; color: white"|✓ | ||
| | | style="background: green; color: white"|✓ | ||
| | <!-- Linux-gtk: Desktop, B2G, Mulet --> | ||
| | | | ||
| | | | ||
| | | | ||
|style="background: green; color: white"|✓ | <!-- Android: Fennec, B2G, B2Gdroid --> | ||
| | |||
| | |||
| | |||
<!-- iOS --> | |||
| style="background: green; color: white"|✓ | |||
|- | |- | ||
!XP_MACOSX | !XP_MACOSX | ||
| | <!-- Windows: Desktop, B2G, Mulet --> | ||
| | | | ||
| | | | ||
|style="background: green; color: white"|✓ | | | ||
|style="background: green; color: white"|✓ | <!-- OS X: Desktop, B2G, Mulet --> | ||
|style="background: green; color: white"|✓ | | style="background: green; color: white"|✓ | ||
| | | style="background: green; color: white"|✓ | ||
| | | style="background: green; color: white"|✓ | ||
| | <!-- Linux-gtk: Desktop, B2G, Mulet --> | ||
| | | | ||
| | | | ||
| | | | ||
| | <!-- Android: Fennec, B2G, B2Gdroid --> | ||
| | |||
| | |||
| | |||
<!-- iOS --> | |||
| | |||
|- | |- | ||
!XP_IOS | !XP_IOS | ||
| | <!-- Windows: Desktop, B2G, Mulet --> | ||
| | | | ||
| | | | ||
| | | | ||
| | <!-- OS X: Desktop, B2G, Mulet --> | ||
| | | | ||
| | | | ||
| | | | ||
| | <!-- Linux-gtk: Desktop, B2G, Mulet --> | ||
| | | | ||
| | | | ||
| | | | ||
|style="background: green; color: white"|✓ | <!-- Android: Fennec, B2G, B2Gdroid --> | ||
| | |||
| | |||
| | |||
<!-- iOS --> | |||
| style="background: green; color: white"|✓ | |||
|- | |- | ||
!XP_UNIX | !XP_UNIX | ||
| | <!-- Windows: Desktop, B2G, Mulet --> | ||
| | | | ||
| | | | ||
|style="background: green; color: white"|✓ | | | ||
|style="background: green; color: white"|✓ | <!-- OS X: Desktop, B2G, Mulet --> | ||
|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"|✓ | <!-- Linux-gtk: Desktop, B2G, Mulet --> | ||
|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: Fennec, B2G, B2Gdroid --> | ||
| style="background: green; color: white"|✓ | |||
| style="background: green; color: white"|✓ | |||
| style="background: green; color: white"|✓ | |||
<!-- iOS --> | |||
| style="background: green; color: white"|✓ | |||
|- | |- | ||
!XP_LINUX | !XP_LINUX | ||
| | <!-- Windows: Desktop, B2G, Mulet --> | ||
| | | | ||
| | | | ||
| | | | ||
| | <!-- OS X: Desktop, B2G, Mulet --> | ||
| | | | ||
|style="background: green; color: white"|✓ | | | ||
|style="background: green; color: white"|✓ | | | ||
|style="background: green; color: white"|✓ | <!-- Linux-gtk: Desktop, B2G, Mulet --> | ||
|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: Fennec, B2G, B2Gdroid --> | ||
| style="background: green; color: white"|✓ | |||
| style="background: green; color: white"|✓ | |||
| style="background: green; color: white"|✓ | |||
<!-- iOS --> | |||
| | |||
|- | |- | ||
!ANDROID | !ANDROID | ||
| | <!-- Windows: Desktop, B2G, Mulet --> | ||
| | | | ||
| | | | ||
| | | | ||
| | <!-- OS X: Desktop, B2G, Mulet --> | ||
| | | | ||
| | | | ||
| | | | ||
| | <!-- Linux-gtk: Desktop, B2G, Mulet --> | ||
|style="background: green; color: white"|✓ | | | ||
|style="background: green; color: white"|✓ | | | ||
|style="background: green; color: white"|✓ | | | ||
| | <!-- Android: Fennec, B2G, B2Gdroid --> | ||
| style="background: green; color: white"|✓ | |||
| style="background: green; color: white"|✓ | |||
| style="background: green; color: white"|✓ | |||
<!-- iOS --> | |||
| | |||
|- | |- | ||
!MOZ_B2G | !MOZ_B2G | ||
| | <!-- Windows: Desktop, B2G, Mulet --> | ||
|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"|✓ | <!-- OS X: Desktop, B2G, Mulet --> | ||
|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"|✓ | <!-- Linux-gtk: Desktop, B2G, Mulet --> | ||
| | | | ||
|style="background: green; color: white"|✓ | | style="background: green; color: white"|✓ | ||
|style="background: green; color: white"|✓ | | style="background: green; color: white"|✓ | ||
| | <!-- Android: Fennec, B2G, B2Gdroid --> | ||
| | |||
| style="background: green; color: white"|✓ | |||
| style="background: green; color: white"|✓ | |||
<!-- iOS --> | |||
| | |||
|- | |- | ||
!MOZ_B2GDROID | !MOZ_B2GDROID | ||
| | <!-- Windows: Desktop, B2G, Mulet --> | ||
| | | | ||
| | | | ||
| | | | ||
| | <!-- OS X: Desktop, B2G, Mulet --> | ||
| | | | ||
| | | | ||
| | | | ||
| | <!-- Linux-gtk: Desktop, B2G, Mulet --> | ||
| | | | ||
| | | | ||
|style="background: green; color: white"|✓ | | | ||
| | <!-- Android: Fennec, B2G, B2Gdroid --> | ||
| | |||
| | |||
| style="background: green; color: white"|✓ | |||
<!-- iOS --> | |||
| | |||
|- | |- | ||
!MOZ_MULET | !MOZ_MULET | ||
| | <!-- Windows: Desktop, B2G, Mulet --> | ||
| | | | ||
|style="background: green; color: white"|✓ | | | ||
| | | style="background: green; color: white"|✓ | ||
| | <!-- OS X: Desktop, B2G, Mulet --> | ||
|style="background: green; color: white"|✓ | | | ||
| | | | ||
| | | style="background: green; color: white"|✓ | ||
|style="background: green; color: white"|✓ | <!-- Linux-gtk: Desktop, B2G, Mulet --> | ||
| | | | ||
| | | | ||
| | | style="background: green; color: white"|✓ | ||
| | <!-- Android: Fennec, B2G, B2Gdroid --> | ||
| | |||
| | |||
| | |||
<!-- iOS --> | |||
| | |||
|- | |- | ||
!MOZ_WIDGET_GTK | !MOZ_WIDGET_GTK | ||
| | <!-- Windows: Desktop, B2G, Mulet --> | ||
| | | | ||
| | | | ||
| | | | ||
| | <!-- OS X: Desktop, B2G, Mulet --> | ||
| | | | ||
|style="background: green; color: white"|✓ | | | ||
|style="background: green; color: white"|✓ | | | ||
|style="background: green; color: white"|✓ | <!-- Linux-gtk: Desktop, B2G, Mulet --> | ||
| | | style="background: green; color: white"|✓ | ||
| | | style="background: green; color: white"|✓ | ||
| | | style="background: green; color: white"|✓ | ||
| | <!-- Android: Fennec, B2G, B2Gdroid --> | ||
| | |||
| | |||
| | |||
<!-- iOS --> | |||
| | |||
|- | |- | ||
!MOZ_WIDGET_ANDROID | !MOZ_WIDGET_ANDROID | ||
| | <!-- Windows: Desktop, B2G, Mulet --> | ||
| | | | ||
| | | | ||
| | | | ||
| | <!-- OS X: Desktop, B2G, Mulet --> | ||
| | | | ||
| | | | ||
| | | | ||
| | <!-- Linux-gtk: Desktop, B2G, Mulet --> | ||
|style="background: green; color: white"|✓ | | | ||
| | | | ||
|style="background: green; color: white"|✓ | | | ||
| | <!-- Android: Fennec, B2G, B2Gdroid --> | ||
| style="background: green; color: white"|✓ | |||
| | |||
| style="background: green; color: white"|✓ | |||
<!-- iOS --> | |||
| | |||
|- | |- | ||
!MOZ_WIDGET_GONK | !MOZ_WIDGET_GONK | ||
| | <!-- Windows: Desktop, B2G, Mulet --> | ||
| | | | ||
| | | | ||
| | | | ||
| | <!-- OS X: Desktop, B2G, Mulet --> | ||
| | | | ||
| | | | ||
| | | | ||
| | <!-- Linux-gtk: Desktop, B2G, Mulet --> | ||
| | | | ||
|style="background: green; color: white"|✓ | | | ||
| | | | ||
| | <!-- Android: Fennec, B2G, B2Gdroid --> | ||
| | |||
| style="background: green; color: white"|✓ | |||
| | |||
<!-- iOS --> | |||
| | |||
|- | |- | ||
!MOZ_WIDGET_UIKIT | !MOZ_WIDGET_UIKIT | ||
| | <!-- Windows: Desktop, B2G, Mulet --> | ||
| | | | ||
| | | | ||
| | | | ||
| | <!-- OS X: Desktop, B2G, Mulet --> | ||
| | | | ||
| | | | ||
| | | | ||
| | <!-- Linux-gtk: Desktop, B2G, Mulet --> | ||
| | | | ||
| | | | ||
| | | | ||
|style="background: green; color: white"|✓ | <!-- Android: Fennec, B2G, B2Gdroid --> | ||
| | |||
| | |||
| | |||
<!-- iOS --> | |||
| style="background: green; color: white"|✓ | |||
|} | |} | ||
Line 244: | Line 309: | ||
Here is a similar table, but to see which prefs get used in which product: | Here is a similar table, but to see which prefs get used in which product: | ||
{|border="1" style="text-align: center;" | {|border="1" style="text-align: center; width: 100%" | ||
!OS | !OS | ||
!colspan="3"|Windows | !colspan="3"|Windows | ||
Line 268: | Line 333: | ||
|- | |- | ||
|[https://hg.mozilla.org/mozilla-central/file/tip/modules/libpref/init/all.js all.js] | |[https://hg.mozilla.org/mozilla-central/file/tip/modules/libpref/init/all.js all.js] | ||
|style="background: green; color: white"|✓ | <!-- Windows: Desktop, B2G, Mulet --> | ||
|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"|✓ | <!-- OS X: Desktop, B2G, Mulet --> | ||
|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"|✓ | <!-- Linux-gtk: Desktop, B2G, Mulet --> | ||
|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: Fennec, B2G, B2Gdroid --> | ||
| style="background: green; color: white"|✓ | |||
| style="background: green; color: white"|✓ | |||
| style="background: green; color: white"|✓ | |||
<!-- iOS --> | |||
| style="background: green; color: white"|✓ | |||
|- | |- | ||
|[https://hg.mozilla.org/mozilla-central/file/tip/browser/app/profile/firefox.js firefox.js] | |[https://hg.mozilla.org/mozilla-central/file/tip/browser/app/profile/firefox.js firefox.js] | ||
|style="background: green; color: white"|✓ | <!-- Windows: Desktop, B2G, Mulet --> | ||
| | | style="background: green; color: white"|✓ | ||
|style="background: green; color: white"|✓ | | | ||
|style="background: green; color: white"|✓ | | style="background: green; color: white"|✓ | ||
| | <!-- OS X: Desktop, B2G, Mulet --> | ||
|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"|✓ | <!-- Linux-gtk: Desktop, B2G, Mulet --> | ||
| | | style="background: green; color: white"|✓ | ||
| | | | ||
| | | style="background: green; color: white"|✓ | ||
| | <!-- Android: Fennec, B2G, B2Gdroid --> | ||
| | |||
| | |||
| | |||
<!-- iOS --> | |||
| | |||
|- | |- | ||
|[https://hg.mozilla.org/mozilla-central/file/tip/mobile/android/app/mobile.js mobile.js] | |[https://hg.mozilla.org/mozilla-central/file/tip/mobile/android/app/mobile.js mobile.js] | ||
| | <!-- Windows: Desktop, B2G, Mulet --> | ||
| | | | ||
| | | | ||
| | | | ||
| | <!-- OS X: Desktop, B2G, Mulet --> | ||
| | | | ||
| | | | ||
| | | | ||
| | <!-- Linux-gtk: Desktop, B2G, Mulet --> | ||
|style="background: green; color: white"|✓ | | | ||
| | | | ||
| | | | ||
| | <!-- Android: Fennec, B2G, B2Gdroid --> | ||
| style="background: green; color: white"|✓ | |||
| | |||
| | |||
<!-- iOS --> | |||
| | |||
|- | |- | ||
|[https://hg.mozilla.org/mozilla-central/file/tip/mobile/android/b2gdroid/app/b2gdroid.js b2gdroid.js] | |[https://hg.mozilla.org/mozilla-central/file/tip/mobile/android/b2gdroid/app/b2gdroid.js b2gdroid.js] | ||
| | <!-- Windows: Desktop, B2G, Mulet --> | ||
| | | | ||
| | | | ||
| | | | ||
| | <!-- OS X: Desktop, B2G, Mulet --> | ||
| | | | ||
| | | | ||
| | | | ||
| | <!-- Linux-gtk: Desktop, B2G, Mulet --> | ||
| | | | ||
| | | | ||
|style="background: green; color: white"|✓ | | | ||
| | <!-- Android: Fennec, B2G, B2Gdroid --> | ||
| | |||
| | |||
| style="background: green; color: white"|✓ | |||
<!-- iOS --> | |||
| | |||
|- | |- | ||
|[https://hg.mozilla.org/mozilla-central/file/tip/b2g/app/b2g.js b2g.js] | |[https://hg.mozilla.org/mozilla-central/file/tip/b2g/app/b2g.js b2g.js] | ||
| | <!-- Windows: Desktop, B2G, Mulet --> | ||
|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"|✓ | <!-- OS X: Desktop, B2G, Mulet --> | ||
|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"|✓ | <!-- Linux-gtk: Desktop, B2G, Mulet --> | ||
| | | | ||
|style="background: green; color: white"|✓ | | style="background: green; color: white"|✓ | ||
| | | style="background: green; color: white"|✓ | ||
| | <!-- Android: Fennec, B2G, B2Gdroid --> | ||
| | |||
| style="background: green; color: white"|✓ | |||
| | |||
<!-- iOS --> | |||
| | |||
|- | |- | ||
|[https://hg.mozilla.org/mozilla-central/file/tip/b2g/dev/app/mulet.js mulet.js] | |[https://hg.mozilla.org/mozilla-central/file/tip/b2g/dev/app/mulet.js mulet.js] | ||
| | <!-- Windows: Desktop, B2G, Mulet --> | ||
| | | | ||
|style="background: green; color: white"|✓ | | | ||
| | | style="background: green; color: white"|✓ | ||
| | <!-- OS X: Desktop, B2G, Mulet --> | ||
|style="background: green; color: white"|✓ | | | ||
| | | | ||
| | | style="background: green; color: white"|✓ | ||
|style="background: green; color: white"|✓ | <!-- Linux-gtk: Desktop, B2G, Mulet --> | ||
| | | | ||
| | | | ||
| | | style="background: green; color: white"|✓ | ||
| | <!-- Android: Fennec, B2G, B2Gdroid --> | ||
| | |||
| | |||
| | |||
<!-- iOS --> | |||
| | |||
|- | |- | ||
|[https://hg.mozilla.org/mozilla-central/file/tip/b2g/graphene/graphene.js graphene.js] | |[https://hg.mozilla.org/mozilla-central/file/tip/b2g/graphene/graphene.js graphene.js] | ||
|??| | <!-- Windows: Desktop, B2G, Mulet --> | ||
|??| | | ?? | ||
|??| | | ?? | ||
|??| | | ?? | ||
|?? | <!-- OS X: Desktop, B2G, Mulet --> | ||
|?? | | ?? | ||
|?? | | ?? | ||
| ?? | |||
<!-- Linux-gtk: Desktop, B2G, Mulet --> | |||
| ?? | |||
| ?? | |||
| ?? | |||
<!-- Android: Fennec, B2G, B2Gdroid --> | |||
| ?? | |||
| ?? | |||
| ?? | |||
<!-- iOS --> | |||
| ?? | |||
|} | |} | ||
Line 373: | Line 479: | ||
Here is another table that tells you what conditions are true on various platforms for use in reftest.list conditions. | Here is another table that tells you what conditions are true on various platforms for use in reftest.list conditions. | ||
{|border="1" style="text-align: center;" | {|border="1" style="text-align: center; width: 100%" | ||
!OS | !OS | ||
!colspan="2"|Windows | !colspan="2"|Windows | ||
Line 394: | Line 500: | ||
|- | |- | ||
!B2G | !B2G | ||
| | | <!-- Windows: Desktop, B2G --> | ||
| | | | | ||
| | | | | ||
| | | | ||
|style="background: green; color: white"|✓ | | | ||
| | | | ||
| | |||
| | |||
| | |||
| style="background: green; color: white"|✓ | |||
| | |||
|- | |- | ||
!B2GDT | !B2GDT | ||
| | <!-- Windows: Desktop, B2G --> | ||
|style="background: green; color: white"|✓ | | | ||
| | | style="background: green; color: white"|✓ | ||
|style="background: green; color: white"|✓ | <!-- OS X: Desktop, B2G --> | ||
| | | | ||
|style="background: green; color: white"|✓ | | style="background: green; color: white"|✓ | ||
| | <!-- Linux-gtk: Desktop, B2G, Mulet --> | ||
| | | | | ||
| | | style="background: green; color: white"|✓ | ||
| | |||
<!-- Android: Fennec, B2G --> | |||
| | |||
| | |||
<!-- iOS --> | |||
| | |||
|- | |- | ||
!Android | !Android | ||
| | | <!-- Windows: Desktop, B2G --> | ||
| | | | | ||
| | | | | ||
|style="background: green; color: white"|✓ | <!-- OS X: Desktop, B2G --> | ||
| | | | ||
| | | | ||
<!-- Linux-gtk: Desktop, B2G, Mulet --> | |||
| | |||
| | |||
| | |||
<!-- Android: Fennec, B2G --> | |||
| style="background: green; color: white"|✓ | |||
| | |||
<!-- iOS --> | |||
| | |||
|- | |- | ||
!cocoaWidget | !cocoaWidget | ||
| | | <!-- Windows: Desktop, B2G --> | ||
|style="background: green; color: white"|✓ | | | ||
|style="background: green; color: white"|✓ | | | ||
| | | <!-- OS X: Desktop, B2G --> | ||
| | | | style="background: green; color: white"|✓ | ||
| | | style="background: green; color: white"|✓ | ||
<!-- Linux-gtk: Desktop, B2G, Mulet --> | |||
| | |||
| | |||
| | |||
<!-- Android: Fennec, B2G --> | |||
| | |||
| | |||
<!-- iOS --> | |||
| | |||
|- | |- | ||
!gtkWidget | !gtkWidget | ||
| | | <!-- Windows: Desktop, B2G --> | ||
| | | | | ||
|style="background: green; color: white"|✓ | | | ||
|style="background: green; color: white"|✓ | <!-- OS X: Desktop, B2G --> | ||
|style="background: green; color: white"|✓ | | | ||
| | | | | ||
| | <!-- Linux-gtk: Desktop, B2G, Mulet --> | ||
| style="background: green; color: white"|✓ | |||
| style="background: green; color: white"|✓ | |||
| style="background: green; color: white"|✓ | |||
<!-- Android: Fennec, B2G --> | |||
| | |||
| | |||
<!-- iOS --> | |||
| | |||
|- | |- | ||
!qtWidget | !qtWidget | ||
| | | <!-- Windows: Desktop, B2G --> | ||
| | | | | ||
| | | | | ||
| | | <!-- OS X: Desktop, B2G --> | ||
| | | | ||
| | |||
<!-- Linux-gtk: Desktop, B2G, Mulet --> | |||
| | |||
| | |||
| | |||
<!-- Android: Fennec, B2G --> | |||
| | |||
| | |||
<!-- iOS --> | |||
| | |||
|- | |- | ||
!winWidget | !winWidget | ||
|style="background: green; color: white"|✓ | <!-- Windows: Desktop, B2G --> | ||
|style="background: green; color: white"|✓ | | style="background: green; color: white"|✓ | ||
| | | | style="background: green; color: white"|✓ | ||
| | | <!-- OS X: Desktop, B2G --> | ||
| | | | | ||
| | | | ||
<!-- Linux-gtk: Desktop, B2G, Mulet --> | |||
| | |||
| | |||
| | |||
<!-- Android: Fennec, B2G --> | |||
| | |||
| | |||
<!-- iOS --> | |||
| | |||
|- | |- | ||
!Mulet | !Mulet | ||
| | | <!-- Windows: Desktop, B2G --> | ||
| | | | | ||
| | | | | ||
|style="background: green; color: white"|✓ | <!-- OS X: Desktop, B2G --> | ||
| | | | | ||
| | | | ||
<!-- Linux-gtk: Desktop, B2G, Mulet --> | |||
| | |||
| | |||
| style="background: green; color: white"|✓ | |||
| | |||
| | |||
<!-- iOS --> | |||
| | |||
|} | |} | ||
Line 465: | Line 635: | ||
Here is another table that tells you what different condition values are on various platforms for use in mochitest.ini/a11y.ini/chrome.ini/browser.ini conditions. | Here is another table that tells you what different condition values are on various platforms for use in mochitest.ini/a11y.ini/chrome.ini/browser.ini conditions. | ||
{|border="1" style="text-align: center;" | {|border="1" style="text-align: center; width: 100%" | ||
!OS | !OS | ||
!colspan="2"|Windows | !colspan="2"|Windows | ||
Line 486: | Line 656: | ||
|- | |- | ||
!os | !os | ||
|win| | <!-- Windows: Desktop, B2G --> | ||
|mac| | | win | ||
|linux| | | ?? | ||
|android| | <!-- OS X: Desktop, B2G --> | ||
|?? | | mac | ||
| ?? | |||
<!-- Linux-gtk: Desktop, B2G, Mulet --> | |||
| linux | |||
| ?? | |||
| ?? | |||
<!-- Android: Fennec, B2G --> | |||
| android | |||
| b2g | |||
<!-- iOS --> | |||
| ?? | |||
|- | |- | ||
!toolkit | !toolkit | ||
|windows| | <!-- Windows: Desktop, B2G --> | ||
|cocoa| | | windows | ||
|gtk2 or gtk3| | | ?? | ||
|android| | <!-- OS X: Desktop, B2G --> | ||
|?? | | cocoa | ||
| ?? | |||
<!-- Linux-gtk: Desktop, B2G, Mulet --> | |||
| gtk2 or gtk3 | |||
| ?? | |||
| ?? | |||
<!-- Android: Fennec, B2G --> | |||
| android | |||
| gonk | |||
<!-- iOS --> | |||
| ?? | |||
|- | |- | ||
!buildapp | !buildapp | ||
|??| | <!-- Windows: Desktop, B2G --> | ||
|??| | | ?? | ||
|??| | | ?? | ||
|??| | <!-- OS X: Desktop, B2G --> | ||
|?? | | ?? | ||
| ?? | |||
<!-- Linux-gtk: Desktop, B2G, Mulet --> | |||
| ?? | |||
| ?? | |||
| mulet | |||
<!-- Android: Fennec, B2G --> | |||
| ?? | |||
| b2g | |||
<!-- iOS --> | |||
| ?? | |||
|} | |} | ||
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 15:27, 4 December 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 | Mulet | Desktop | B2G | Mulet | Desktop | B2G | Mulet | Fennec | B2G | B2Gdroid | iOS |
XP_WIN | ✓ | ✓ | ✓ | ||||||||||
XP_DARWIN | ✓ | ✓ | ✓ | ✓ | |||||||||
XP_MACOSX | ✓ | ✓ | ✓ | ||||||||||
XP_IOS | ✓ | ||||||||||||
XP_UNIX | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | |||
XP_LINUX | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | |||||||
ANDROID | ✓ | ✓ | ✓ | ||||||||||
MOZ_B2G | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | |||||
MOZ_B2GDROID | ✓ | ||||||||||||
MOZ_MULET | ✓ | ✓ | ✓ | ||||||||||
MOZ_WIDGET_GTK | ✓ | ✓ | ✓ | ||||||||||
MOZ_WIDGET_ANDROID | ✓ | ✓ | |||||||||||
MOZ_WIDGET_GONK | ✓ | ||||||||||||
MOZ_WIDGET_UIKIT | ✓ |
Prefs files
Here is a similar table, but to see which prefs get used in which product:
OS | Windows | OS X | Linux-gtk | Android | iOS | ||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Product | Desktop | B2G | Mulet | Desktop | B2G | Mulet | Desktop | B2G | Mulet | Fennec | B2G | B2Gdroid | iOS |
all.js | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
firefox.js | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | |||||||
mobile.js | ✓ | ||||||||||||
b2gdroid.js | ✓ | ||||||||||||
b2g.js | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ||||||
mulet.js | ✓ | ✓ | ✓ | ||||||||||
graphene.js | ?? | ?? | ?? | ?? | ?? | ?? | ?? | ?? | ?? | ?? | ?? | ?? | ?? |
WARNING: Until bug 1174234 is resolved firefox.js prefs will override mulet.js prefs on Mulet.
Reftest conditions
Here is another table that tells you what conditions are true on various platforms for use in reftest.list conditions.
OS | Windows | OS X | Linux-gtk | Android | iOS | |||||
---|---|---|---|---|---|---|---|---|---|---|
Product | Desktop | B2G | Desktop | B2G | Desktop | B2G | Mulet | Fennec | B2G | iOS |
B2G | ✓ | |||||||||
B2GDT | ✓ | ✓ | ✓ | |||||||
Android | ✓ | |||||||||
cocoaWidget | ✓ | ✓ | ||||||||
gtkWidget | ✓ | ✓ | ✓ | |||||||
qtWidget | ||||||||||
winWidget | ✓ | ✓ | ||||||||
Mulet | ✓ |
Mochitest conditions
Here is another table that tells you what different condition values are on various platforms for use in mochitest.ini/a11y.ini/chrome.ini/browser.ini conditions.
OS | Windows | OS X | Linux-gtk | Android | iOS | |||||
---|---|---|---|---|---|---|---|---|---|---|
Product | Desktop | B2G | Desktop | B2G | Desktop | B2G | Mulet | Fennec | B2G | iOS |
os | win | ?? | mac | ?? | linux | ?? | ?? | android | b2g | ?? |
toolkit | windows | ?? | cocoa | ?? | gtk2 or gtk3 | ?? | ?? | android | gonk | ?? |
buildapp | ?? | ?? | ?? | ?? | ?? | ?? | mulet | ?? | b2g | ?? |
You may also be interested in Platform/Channel-specific_build_defines