Platform/Platform-specific build defines: Difference between revisions
< Platform
Jump to navigation
Jump to search
(MOZ_B2G is also removed from the codebase now) |
(Finish removal all of the rest of the B2G stuff and add in GeckoView) |
||
| Line 3: | Line 3: | ||
{|border="1" style="text-align: center; width: 100%" | {|border="1" style="text-align: center; width: 100%" | ||
!OS | !OS | ||
!colspan=" | !colspan="1"|Windows | ||
!colspan=" | !colspan="1"|OS X | ||
!colspan=" | !colspan="1"|Linux-gtk | ||
!colspan="2"|Android | !colspan="2"|Android | ||
!iOS | !iOS | ||
|- | |- | ||
!Product | !Product | ||
!Desktop | !Desktop | ||
!Desktop | !Desktop | ||
!Desktop | !Desktop | ||
!Fennec | !Fennec | ||
! | !GeckoView | ||
!iOS | !iOS | ||
|- | |- | ||
!XP_WIN | !XP_WIN | ||
<!-- Windows: Desktop | <!-- Windows: Desktop --> | ||
| style="background: green; color: white"|✓ | | style="background: green; color: white"|✓ | ||
<!-- OS X: Desktop --> | |||
<!-- OS X: Desktop | |||
| | | | ||
<!-- Linux-gtk: Desktop --> | |||
| | | | ||
<!-- Android: Fennec, GeckoView --> | |||
| | | | ||
| ?? | |||
| | |||
<!-- iOS --> | <!-- iOS --> | ||
| | | | ||
|- | |- | ||
!XP_DARWIN | !XP_DARWIN | ||
<!-- Windows: Desktop | <!-- Windows: Desktop --> | ||
| | | | ||
<!-- OS X: Desktop --> | |||
<!-- OS X: Desktop | |||
| style="background: green; color: white"|✓ | | style="background: green; color: white"|✓ | ||
<!-- Linux-gtk: Desktop --> | |||
<!-- Linux-gtk: Desktop | |||
| | | | ||
<!-- Android: Fennec, GeckoView --> | |||
| | | | ||
| ?? | |||
<!-- iOS --> | <!-- iOS --> | ||
| style="background: green; color: white"|✓ | | style="background: green; color: white"|✓ | ||
|- | |- | ||
!XP_MACOSX | !XP_MACOSX | ||
<!-- Windows: Desktop | <!-- Windows: Desktop --> | ||
| | | | ||
<!-- OS X: Desktop --> | |||
<!-- OS X: Desktop | |||
| style="background: green; color: white"|✓ | | style="background: green; color: white"|✓ | ||
<!-- Linux-gtk: Desktop --> | |||
<!-- Linux-gtk: Desktop | |||
| | | | ||
<!-- Android: Fennec, GeckoView --> | |||
| | | | ||
| ?? | |||
<!-- iOS --> | <!-- iOS --> | ||
| | | | ||
|- | |- | ||
!XP_IOS | !XP_IOS | ||
<!-- Windows: Desktop | <!-- Windows: Desktop --> | ||
| | | | ||
<!-- OS X: Desktop --> | |||
| | | | ||
<!-- Linux-gtk: Desktop --> | |||
| | | | ||
<!-- Android: Fennec, GeckoView --> | |||
<!-- Android: Fennec, | |||
| | | | ||
| ?? | |||
<!-- iOS --> | <!-- iOS --> | ||
| style="background: green; color: white"|✓ | | style="background: green; color: white"|✓ | ||
|- | |- | ||
!XP_UNIX | !XP_UNIX | ||
<!-- Windows: Desktop | <!-- Windows: Desktop --> | ||
| | | | ||
<!-- OS X: Desktop --> | |||
<!-- OS X: Desktop | |||
| style="background: green; color: white"|✓ | | style="background: green; color: white"|✓ | ||
<!-- Linux-gtk: Desktop --> | |||
| style="background: green; color: white"|✓ | | style="background: green; color: white"|✓ | ||
<!-- Android: Fennec, GeckoView --> | |||
| style="background: green; color: white"|✓ | | style="background: green; color: white"|✓ | ||
| ?? | |||
| | |||
<!-- iOS --> | <!-- iOS --> | ||
| style="background: green; color: white"|✓ | | style="background: green; color: white"|✓ | ||
|- | |- | ||
!XP_LINUX | !XP_LINUX | ||
<!-- Windows: Desktop | <!-- Windows: Desktop --> | ||
| | | | ||
<!-- OS X: Desktop --> | |||
| | | | ||
<!-- Linux-gtk: Desktop --> | |||
<!-- Linux-gtk: Desktop | |||
| style="background: green; color: white"|✓ | | style="background: green; color: white"|✓ | ||
<!-- Android: Fennec, GeckoView --> | |||
| style="background: green; color: white"|✓ | | style="background: green; color: white"|✓ | ||
| ?? | |||
<!-- iOS --> | <!-- iOS --> | ||
| | | | ||
|- | |- | ||
!ANDROID | !ANDROID | ||
<!-- Windows: Desktop | <!-- Windows: Desktop --> | ||
| | | | ||
<!-- OS X: Desktop --> | |||
| | | | ||
<!-- Linux-gtk: Desktop --> | |||
| | | | ||
<!-- Android: Fennec, GeckoView --> | |||
<!-- Android: Fennec, | |||
| style="background: green; color: white"|✓ | | style="background: green; color: white"|✓ | ||
| ?? | |||
<!-- iOS --> | <!-- iOS --> | ||
| | | | ||
|- | |- | ||
!MOZ_WIDGET_GTK | !MOZ_WIDGET_GTK | ||
<!-- Windows: Desktop | <!-- Windows: Desktop --> | ||
| | | | ||
<!-- OS X: Desktop --> | |||
| | | | ||
<!-- Linux-gtk: Desktop --> | |||
<!-- Linux-gtk: Desktop | |||
| style="background: green; color: white"|✓ | | style="background: green; color: white"|✓ | ||
<!-- Android: Fennec, GeckoView --> | |||
<!-- Android: Fennec, | |||
| | | | ||
| ?? | |||
<!-- iOS --> | <!-- iOS --> | ||
| | | | ||
|- | |- | ||
!MOZ_WIDGET_ANDROID | !MOZ_WIDGET_ANDROID | ||
<!-- Windows: Desktop | <!-- Windows: Desktop --> | ||
| | | | ||
<!-- OS X: Desktop --> | |||
| | | | ||
<!-- Linux-gtk: Desktop --> | |||
| | | | ||
<!-- Android: Fennec, GeckoView --> | |||
<!-- Android: Fennec, | |||
| style="background: green; color: white"|✓ | | style="background: green; color: white"|✓ | ||
| | | ?? | ||
<!-- iOS --> | <!-- iOS --> | ||
| | | | ||
|- | |- | ||
!MOZ_WIDGET_UIKIT | !MOZ_WIDGET_UIKIT | ||
<!-- Windows: Desktop | <!-- Windows: Desktop --> | ||
| | | | ||
<!-- OS X: Desktop --> | |||
| | | | ||
<!-- Linux-gtk: Desktop --> | |||
| | | | ||
<!-- Android: Fennec, GeckoView --> | |||
<!-- Android: Fennec, | |||
| | | | ||
| ?? | |||
<!-- iOS --> | <!-- iOS --> | ||
| style="background: green; color: white"|✓ | | style="background: green; color: white"|✓ | ||
|} | |} | ||
| Line 302: | Line 214: | ||
{|border="1" style="text-align: center; width: 100%" | {|border="1" style="text-align: center; width: 100%" | ||
!OS | !OS | ||
!colspan=" | !colspan="1"|Windows | ||
!colspan=" | !colspan="1"|OS X | ||
!colspan=" | !colspan="1"|Linux-gtk | ||
!colspan="2"|Android | !colspan="2"|Android | ||
!iOS | !iOS | ||
| Line 310: | Line 222: | ||
!Product | !Product | ||
!Desktop | !Desktop | ||
!Desktop | !Desktop | ||
!Desktop | !Desktop | ||
!Fennec | !Fennec | ||
! | !GeckoView | ||
!iOS | !iOS | ||
|- | |- | ||
!Android | !Android | ||
<!-- Windows: Desktop | <!-- Windows: Desktop --> | ||
| | | | ||
<!-- OS X: Desktop --> | |||
| | | | ||
<!-- | <!-- Linux-gtk: Desktop --> | ||
| | | | ||
<!-- Android: Fennec, GeckoView --> | |||
<!-- Android: Fennec, | |||
| style="background: green; color: white"|✓ | | style="background: green; color: white"|✓ | ||
| | | ?? | ||
<!-- iOS --> | <!-- iOS --> | ||
| | | | ||
|- | |- | ||
!cocoaWidget | !cocoaWidget | ||
<!-- Windows: Desktop | <!-- Windows: Desktop --> | ||
| | | | ||
<!-- OS X: Desktop --> | |||
<!-- OS X: Desktop | |||
| style="background: green; color: white"|✓ | | style="background: green; color: white"|✓ | ||
<!-- Linux-gtk: Desktop --> | |||
<!-- Linux-gtk: Desktop | |||
| | | | ||
<!-- Android: Fennec, GeckoView --> | |||
| | | | ||
| ?? | |||
<!-- iOS --> | <!-- iOS --> | ||
| | | | ||
|- | |- | ||
!gtkWidget | !gtkWidget | ||
<!-- Windows: Desktop | <!-- Windows: Desktop --> | ||
| | | | ||
<!-- OS X: Desktop --> | |||
| | | | ||
<!-- Linux-gtk: Desktop --> | |||
<!-- Linux-gtk: Desktop | |||
| style="background: green; color: white"|✓ | | style="background: green; color: white"|✓ | ||
<!-- Android: Fennec, GeckoView --> | |||
<!-- Android: Fennec, | |||
| | | | ||
| ?? | |||
<!-- iOS --> | <!-- iOS --> | ||
| | | | ||
|- | |- | ||
!qtWidget | !qtWidget | ||
<!-- Windows: Desktop | <!-- Windows: Desktop --> | ||
| | | | ||
<!-- OS X: Desktop --> | |||
| | | | ||
<!-- Linux-gtk: Desktop --> | |||
<!-- Linux-gtk: Desktop | |||
| | | | ||
<!-- Android: Fennec, GeckoView --> | |||
| | | | ||
| ?? | |||
<!-- iOS --> | <!-- iOS --> | ||
| | | | ||
|- | |- | ||
!winWidget | !winWidget | ||
<!-- Windows: Desktop | <!-- Windows: Desktop --> | ||
| style="background: green; color: white"|✓ | | style="background: green; color: white"|✓ | ||
<!-- OS X: Desktop --> | |||
<!-- OS X: Desktop | |||
| | | | ||
<!-- Linux-gtk: Desktop --> | |||
| | | | ||
<!-- Android: Fennec, GeckoView --> | |||
<!-- Android: Fennec, | |||
| | | | ||
| ?? | |||
<!-- iOS --> | <!-- iOS --> | ||
| | | | ||
| Line 458: | Line 300: | ||
{|border="1" style="text-align: center; width: 100%" | {|border="1" style="text-align: center; width: 100%" | ||
!OS | !OS | ||
!colspan=" | !colspan="1"|Windows | ||
!colspan=" | !colspan="1"|OS X | ||
!colspan=" | !colspan="1"|Linux-gtk | ||
!colspan="2"|Android | !colspan="2"|Android | ||
!iOS | !iOS | ||
| Line 466: | Line 308: | ||
!Product | !Product | ||
!Desktop | !Desktop | ||
!Desktop | !Desktop | ||
!Desktop | !Desktop | ||
!Fennec | !Fennec | ||
! | !GeckoView | ||
!iOS | !iOS | ||
|- | |- | ||
!os | !os | ||
<!-- Windows: Desktop | <!-- Windows: Desktop --> | ||
| win | | win | ||
<!-- OS X: Desktop --> | |||
<!-- OS X: Desktop | |||
| mac | | mac | ||
<!-- Linux-gtk: Desktop --> | |||
<!-- Linux-gtk: Desktop | |||
| linux | | linux | ||
<!-- Android: Fennec, GeckoView --> | |||
<!-- Android: Fennec, | |||
| android | | android | ||
| | | ? | ||
<!-- iOS --> | <!-- iOS --> | ||
| ?? | | ?? | ||
|- | |- | ||
!toolkit | !toolkit | ||
<!-- Windows: Desktop | <!-- Windows: Desktop --> | ||
| windows | | windows | ||
<!-- OS X: Desktop --> | |||
<!-- OS X: Desktop | |||
| cocoa | | cocoa | ||
<!-- Linux-gtk: Desktop --> | |||
<!-- Linux-gtk: Desktop | |||
| gtk2 or gtk3 | | gtk2 or gtk3 | ||
<!-- Android: Fennec, GeckoView --> | |||
| android | |||
| ?? | | ?? | ||
<!-- iOS --> | <!-- iOS --> | ||
| ?? | | ?? | ||
|- | |- | ||
!buildapp | !buildapp | ||
<!-- Windows: Desktop | <!-- Windows: Desktop --> | ||
| ?? | | ?? | ||
<!-- OS X: Desktop --> | |||
| ?? | | ?? | ||
<!-- Linux-gtk: Desktop --> | |||
<!-- Linux-gtk: Desktop | |||
| ?? | | ?? | ||
<!-- Android: Fennec, GeckoView --> | |||
| ?? | | ?? | ||
| ?? | | ?? | ||
<!-- iOS --> | <!-- 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 12:05, 10 October 2018
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 | Desktop | Desktop | Fennec | GeckoView | iOS |
| XP_WIN | ✓ | ?? | ||||
| XP_DARWIN | ✓ | ?? | ✓ | |||
| XP_MACOSX | ✓ | ?? | ||||
| XP_IOS | ?? | ✓ | ||||
| XP_UNIX | ✓ | ✓ | ✓ | ?? | ✓ | |
| XP_LINUX | ✓ | ✓ | ?? | |||
| ANDROID | ✓ | ?? | ||||
| MOZ_WIDGET_GTK | ✓ | ?? | ||||
| MOZ_WIDGET_ANDROID | ✓ | ?? | ||||
| 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 | Desktop | Desktop | Fennec | GeckoView | iOS |
| all.js | ✓ | ✓ | ✓ | ✓ | ?? | ✓ |
| firefox.js | ✓ | ✓ | ✓ | ?? | ||
| mobile.js | ✓ | ?? | ||||
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 | Desktop | Desktop | Fennec | GeckoView | iOS |
| Android | ✓ | ?? | ||||
| cocoaWidget | ✓ | ?? | ||||
| gtkWidget | ✓ | ?? | ||||
| qtWidget | ?? | |||||
| winWidget | ✓ | ?? | ||||
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 | Desktop | Desktop | Fennec | GeckoView | iOS |
| os | win | mac | linux | android | ? | ?? |
| toolkit | windows | cocoa | gtk2 or gtk3 | android | ?? | ?? |
| buildapp | ?? | ?? | ?? | ?? | ?? | ?? |
You may also be interested in Platform/Channel-specific_build_defines