Platform/Platform-specific build defines: Difference between revisions

From MozillaWiki
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="3"|Windows
!colspan="1"|Windows
!colspan="3"|OS X
!colspan="1"|OS X
!colspan="3"|Linux-gtk
!colspan="1"|Linux-gtk
!colspan="2"|Android
!colspan="2"|Android
!iOS
!iOS
!FxOS TV
|-
|-
!Product
!Product
!Desktop
!Desktop
!B2G
!Mulet
!Desktop
!Desktop
!B2G
!Mulet
!Desktop
!Desktop
!B2G
!Mulet
!Fennec
!Fennec
!B2G
!GeckoView
!iOS
!iOS
!FxOS TV
|-
|-
!XP_WIN
!XP_WIN
   <!-- Windows: Desktop, B2G, Mulet -->
   <!-- Windows: Desktop -->
|  style="background: green; color: white"|✓
|  style="background: green; color: white"|✓
|  style="background: green; color: white"|✓
   <!-- OS X: Desktop -->
|  style="background: green; color: white"|✓
   <!-- OS X: Desktop, B2G, Mulet -->
|  &nbsp;
|  &nbsp;
  <!-- Linux-gtk: Desktop -->
|  &nbsp;
|  &nbsp;
  <!-- Android: Fennec, GeckoView -->
|  &nbsp;
|  &nbsp;
  <!-- Linux-gtk: Desktop, B2G, Mulet -->
??
&nbsp;
|  &nbsp;
|  &nbsp;
  <!-- Android: Fennec, B2G -->
|  &nbsp;
|  &nbsp;
   <!-- iOS -->
   <!-- iOS -->
|  &nbsp;
|  &nbsp;
  <!-- FxOS TV -->
|  ??
|-
|-
!XP_DARWIN
!XP_DARWIN
   <!-- Windows: Desktop, B2G, Mulet -->
   <!-- Windows: Desktop -->
|  &nbsp;
|  &nbsp;
|  &nbsp;
   <!-- OS X: Desktop -->
|  &nbsp;
   <!-- OS X: Desktop, B2G, Mulet -->
|  style="background: green; color: white"|✓
|  style="background: green; color: white"|✓
|  style="background: green; color: white"|✓
   <!-- Linux-gtk: Desktop -->
|  style="background: green; color: white"|✓
   <!-- Linux-gtk: Desktop, B2G, Mulet -->
|  &nbsp;
|  &nbsp;
|  &nbsp;
  <!-- Android: Fennec, B2G -->
|  &nbsp;
|  &nbsp;
  <!-- Android: Fennec, GeckoView -->
|  &nbsp;
|  &nbsp;
|  ??
   <!-- iOS -->
   <!-- iOS -->
|  style="background: green; color: white"|✓
|  style="background: green; color: white"|✓
  <!-- FxOS TV -->
|  ??
|-
|-
!XP_MACOSX
!XP_MACOSX
   <!-- Windows: Desktop, B2G, Mulet -->
   <!-- Windows: Desktop -->
|  &nbsp;
|  &nbsp;
|  &nbsp;
   <!-- OS X: Desktop -->
|  &nbsp;
   <!-- OS X: Desktop, B2G, Mulet -->
|  style="background: green; color: white"|✓
|  style="background: green; color: white"|✓
|  style="background: green; color: white"|✓
   <!-- Linux-gtk: Desktop -->
|  style="background: green; color: white"|✓
   <!-- Linux-gtk: Desktop, B2G, Mulet -->
|  &nbsp;
|  &nbsp;
|  &nbsp;
  <!-- Android: Fennec, B2G -->
|  &nbsp;
|  &nbsp;
  <!-- Android: Fennec, GeckoView -->
|  &nbsp;
|  &nbsp;
|  ??
   <!-- iOS -->
   <!-- iOS -->
|  &nbsp;
|  &nbsp;
  <!-- FxOS TV -->
|  ??
|-
|-
!XP_IOS
!XP_IOS
   <!-- Windows: Desktop, B2G, Mulet -->
   <!-- Windows: Desktop -->
|  &nbsp;
|  &nbsp;
  <!-- OS X: Desktop -->
|  &nbsp;
|  &nbsp;
  <!-- Linux-gtk: Desktop -->
|  &nbsp;
|  &nbsp;
  <!-- OS X: Desktop, B2G, Mulet -->
   <!-- Android: Fennec, GeckoView -->
|  &nbsp;
|  &nbsp;
|  &nbsp;
  <!-- Linux-gtk: Desktop, B2G, Mulet -->
|  &nbsp;
|  &nbsp;
|  &nbsp;
   <!-- Android: Fennec, B2G -->
|  &nbsp;
|  &nbsp;
|  &nbsp;
|  ??
   <!-- iOS -->
   <!-- iOS -->
|  style="background: green; color: white"|✓
|  style="background: green; color: white"|✓
  <!-- FxOS TV -->
|  ??
|-
|-
!XP_UNIX
!XP_UNIX
   <!-- Windows: Desktop, B2G, Mulet -->
   <!-- Windows: Desktop -->
|  &nbsp;
|  &nbsp;
|  &nbsp;
   <!-- OS X: Desktop -->
|  &nbsp;
   <!-- OS X: Desktop, B2G, Mulet -->
|  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"|✓
  <!-- Linux-gtk: Desktop, B2G, Mulet -->
??
style="background: green; color: white"|✓
|  style="background: green; color: white"|✓
|  style="background: green; color: white"|✓
  <!-- Android: Fennec, B2G -->
|  style="background: green; color: white"|✓
|  style="background: green; color: white"|✓
   <!-- iOS -->
   <!-- iOS -->
|  style="background: green; color: white"|✓
|  style="background: green; color: white"|✓
  <!-- FxOS TV -->
|  ??
|-
|-
!XP_LINUX
!XP_LINUX
   <!-- Windows: Desktop, B2G, Mulet -->
   <!-- Windows: Desktop -->
|  &nbsp;
|  &nbsp;
  <!-- OS X: Desktop -->
|  &nbsp;
|  &nbsp;
|  &nbsp;
   <!-- Linux-gtk: Desktop -->
  <!-- OS X: Desktop, B2G, Mulet -->
|  &nbsp;
|  &nbsp;
|  &nbsp;
   <!-- Linux-gtk: Desktop, B2G, Mulet -->
|  style="background: green; color: white"|✓
|  style="background: green; color: white"|✓
|  style="background: green; color: white"|✓
  <!-- Android: Fennec, B2G -->
|  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 -->
|  &nbsp;
|  &nbsp;
  <!-- FxOS TV -->
|  ??
|-
|-
!ANDROID
!ANDROID
   <!-- Windows: Desktop, B2G, Mulet -->
   <!-- Windows: Desktop -->
|  &nbsp;
|  &nbsp;
  <!-- OS X: Desktop -->
|  &nbsp;
|  &nbsp;
  <!-- Linux-gtk: Desktop -->
|  &nbsp;
|  &nbsp;
  <!-- OS X: Desktop, B2G, Mulet -->
   <!-- Android: Fennec, GeckoView -->
|  &nbsp;
|  &nbsp;
|  &nbsp;
  <!-- Linux-gtk: Desktop, B2G, Mulet -->
|  &nbsp;
|  &nbsp;
|  &nbsp;
   <!-- Android: Fennec, B2G -->
|  style="background: green; color: white"|✓
|  style="background: green; color: white"|✓
|  style="background: green; color: white"|✓
|  ??
   <!-- iOS -->
   <!-- iOS -->
|  &nbsp;
|  &nbsp;
  <!-- FxOS TV -->
|  ??
|-
|-
!MOZ_WIDGET_GTK
!MOZ_WIDGET_GTK
   <!-- Windows: Desktop, B2G, Mulet -->
   <!-- Windows: Desktop -->
|  &nbsp;
|  &nbsp;
  <!-- OS X: Desktop -->
|  &nbsp;
|  &nbsp;
|  &nbsp;
   <!-- Linux-gtk: Desktop -->
  <!-- OS X: Desktop, B2G, Mulet -->
|  &nbsp;
|  &nbsp;
|  &nbsp;
   <!-- Linux-gtk: Desktop, B2G, Mulet -->
|  style="background: green; color: white"|✓
|  style="background: green; color: white"|✓
|  style="background: green; color: white"|✓
   <!-- Android: Fennec, GeckoView -->
|  style="background: green; color: white"|✓
   <!-- Android: Fennec, B2G, -->
|  &nbsp;
|  &nbsp;
|  &nbsp;
|  ??
   <!-- iOS -->
   <!-- iOS -->
|  &nbsp;
|  &nbsp;
  <!-- FxOS TV -->
|  ??
|-
|-
!MOZ_WIDGET_ANDROID
!MOZ_WIDGET_ANDROID
   <!-- Windows: Desktop, B2G, Mulet -->
   <!-- Windows: Desktop -->
|  &nbsp;
|  &nbsp;
  <!-- OS X: Desktop -->
|  &nbsp;
|  &nbsp;
  <!-- Linux-gtk: Desktop -->
|  &nbsp;
|  &nbsp;
  <!-- OS X: Desktop, B2G, Mulet -->
   <!-- Android: Fennec, GeckoView -->
|  &nbsp;
|  &nbsp;
|  &nbsp;
  <!-- Linux-gtk: Desktop, B2G, Mulet -->
|  &nbsp;
|  &nbsp;
|  &nbsp;
   <!-- Android: Fennec, B2G -->
|  style="background: green; color: white"|✓
|  style="background: green; color: white"|✓
&nbsp;
??
   <!-- iOS -->
   <!-- iOS -->
|  &nbsp;
|  &nbsp;
  <!-- FxOS TV -->
|  ??
|-
|-
!MOZ_WIDGET_UIKIT
!MOZ_WIDGET_UIKIT
   <!-- Windows: Desktop, B2G, Mulet -->
   <!-- Windows: Desktop -->
|  &nbsp;
|  &nbsp;
  <!-- OS X: Desktop -->
|  &nbsp;
|  &nbsp;
  <!-- Linux-gtk: Desktop -->
|  &nbsp;
|  &nbsp;
  <!-- OS X: Desktop, B2G, Mulet -->
   <!-- Android: Fennec, GeckoView -->
|  &nbsp;
|  &nbsp;
|  &nbsp;
  <!-- Linux-gtk: Desktop, B2G, Mulet -->
|  &nbsp;
|  &nbsp;
|  &nbsp;
   <!-- Android: Fennec, B2G -->
|  &nbsp;
|  &nbsp;
|  &nbsp;
|  ??
   <!-- iOS -->
   <!-- iOS -->
|  style="background: green; color: white"|✓
|  style="background: green; color: white"|✓
  <!-- FxOS TV -->
|  ??
|}
|}


Line 302: Line 214:
{|border="1" style="text-align: center; width: 100%"
{|border="1" style="text-align: center; width: 100%"
!OS
!OS
!colspan="2"|Windows
!colspan="1"|Windows
!colspan="2"|OS X
!colspan="1"|OS X
!colspan="3"|Linux-gtk
!colspan="1"|Linux-gtk
!colspan="2"|Android
!colspan="2"|Android
!iOS
!iOS
Line 310: Line 222:
!Product
!Product
!Desktop
!Desktop
!B2G
!Desktop
!Desktop
!B2G
!Desktop
!Desktop
!B2G
!Mulet
!Fennec
!Fennec
!B2G
!GeckoView
!iOS
!iOS
|-
!B2G
  <!-- Windows: Desktop, B2G -->
|  &nbsp;
|  &nbsp;
|  &nbsp;
|  &nbsp;
|  &nbsp;
|  &nbsp;
|  &nbsp;
|  &nbsp;
|  style="background: green; color: white"|✓
|  &nbsp;
|-
!B2GDT
  <!-- Windows: Desktop, B2G -->
|  &nbsp;
|  style="background: green; color: white"|✓
  <!-- OS X: Desktop, B2G -->
|  &nbsp;
|  style="background: green; color: white"|✓
  <!-- Linux-gtk: Desktop, B2G, Mulet -->
|  &nbsp;
|  style="background: green; color: white"|✓
|  &nbsp;
  <!-- Android: Fennec, B2G -->
|  &nbsp;
|  &nbsp;
  <!-- iOS -->
|  &nbsp;
|-
|-
!Android
!Android
   <!-- Windows: Desktop, B2G -->
   <!-- Windows: Desktop -->
|  &nbsp;
|  &nbsp;
  <!-- OS X: Desktop -->
|  &nbsp;
|  &nbsp;
   <!-- OS X: Desktop, B2G -->
   <!-- Linux-gtk: Desktop -->
|  &nbsp;
|  &nbsp;
|  &nbsp;
   <!-- Android: Fennec, GeckoView -->
  <!-- Linux-gtk: Desktop, B2G, Mulet -->
|  &nbsp;
|  &nbsp;
|  &nbsp;
   <!-- Android: Fennec, B2G -->
|  style="background: green; color: white"|✓
|  style="background: green; color: white"|✓
&nbsp;
??
   <!-- iOS -->
   <!-- iOS -->
|  &nbsp;
|  &nbsp;
|-
|-
!cocoaWidget
!cocoaWidget
   <!-- Windows: Desktop, B2G -->
   <!-- Windows: Desktop -->
|  &nbsp;
|  &nbsp;
|  &nbsp;
   <!-- OS X: Desktop -->
   <!-- OS X: Desktop, B2G -->
|  style="background: green; color: white"|✓
|  style="background: green; color: white"|✓
|  style="background: green; color: white"|✓
   <!-- Linux-gtk: Desktop -->
   <!-- Linux-gtk: Desktop, B2G, Mulet -->
|  &nbsp;
|  &nbsp;
|  &nbsp;
  <!-- Android: Fennec, B2G -->
|  &nbsp;
|  &nbsp;
  <!-- Android: Fennec, GeckoView -->
|  &nbsp;
|  &nbsp;
|  ??
   <!-- iOS -->
   <!-- iOS -->
|  &nbsp;
|  &nbsp;
|-
|-
!gtkWidget
!gtkWidget
   <!-- Windows: Desktop, B2G -->
   <!-- Windows: Desktop -->
|  &nbsp;
|  &nbsp;
  <!-- OS X: Desktop -->
|  &nbsp;
|  &nbsp;
  <!-- OS X: Desktop, B2G -->
   <!-- Linux-gtk: Desktop -->
|  &nbsp;
|  &nbsp;
   <!-- Linux-gtk: Desktop, B2G, Mulet -->
|  style="background: green; color: white"|✓
|  style="background: green; color: white"|✓
|  style="background: green; color: white"|✓
   <!-- Android: Fennec, GeckoView -->
|  style="background: green; color: white"|✓
   <!-- Android: Fennec, B2G -->
|  &nbsp;
|  &nbsp;
|  &nbsp;
|  ??
   <!-- iOS -->
   <!-- iOS -->
|  &nbsp;
|  &nbsp;
|-
|-
!qtWidget
!qtWidget
   <!-- Windows: Desktop, B2G -->
   <!-- Windows: Desktop -->
|  &nbsp;
|  &nbsp;
  <!-- OS X: Desktop -->
|  &nbsp;
|  &nbsp;
  <!-- OS X: Desktop, B2G -->
   <!-- Linux-gtk: Desktop -->
|  &nbsp;
|  &nbsp;
   <!-- Linux-gtk: Desktop, B2G, Mulet -->
|  &nbsp;
|  &nbsp;
|  &nbsp;
  <!-- Android: Fennec, B2G -->
|  &nbsp;
|  &nbsp;
  <!-- Android: Fennec, GeckoView -->
|  &nbsp;
|  &nbsp;
|  ??
   <!-- iOS -->
   <!-- iOS -->
|  &nbsp;
|  &nbsp;
|-
|-
!winWidget
!winWidget
   <!-- Windows: Desktop, B2G -->
   <!-- Windows: Desktop -->
|  style="background: green; color: white"|✓
|  style="background: green; color: white"|✓
|  style="background: green; color: white"|✓
   <!-- OS X: Desktop -->
   <!-- OS X: Desktop, B2G -->
|  &nbsp;
|  &nbsp;
  <!-- Linux-gtk: Desktop -->
|  &nbsp;
|  &nbsp;
  <!-- Linux-gtk: Desktop, B2G, Mulet -->
   <!-- Android: Fennec, GeckoView -->
|  &nbsp;
|  &nbsp;
|  &nbsp;
   <!-- Android: Fennec, B2G -->
|  &nbsp;
|  &nbsp;
  <!-- iOS -->
|  &nbsp;
|-
!Mulet
  <!-- Windows: Desktop, B2G -->
|  &nbsp;
|  &nbsp;
  <!-- OS X: Desktop, B2G -->
|  &nbsp;
|  &nbsp;
  <!-- Linux-gtk: Desktop, B2G, Mulet -->
|  &nbsp;
|  &nbsp;
|  style="background: green; color: white"|✓
|  &nbsp;
|  &nbsp;
|  &nbsp;
|  ??
   <!-- iOS -->
   <!-- iOS -->
|  &nbsp;
|  &nbsp;
Line 458: Line 300:
{|border="1" style="text-align: center; width: 100%"
{|border="1" style="text-align: center; width: 100%"
!OS
!OS
!colspan="2"|Windows
!colspan="1"|Windows
!colspan="2"|OS X
!colspan="1"|OS X
!colspan="3"|Linux-gtk
!colspan="1"|Linux-gtk
!colspan="2"|Android
!colspan="2"|Android
!iOS
!iOS
Line 466: Line 308:
!Product
!Product
!Desktop
!Desktop
!B2G
!Desktop
!Desktop
!B2G
!Desktop
!Desktop
!B2G
!Mulet
!Fennec
!Fennec
!B2G
!GeckoView
!iOS
!iOS
|-
|-
!os
!os
   <!-- Windows: Desktop, B2G -->
   <!-- Windows: Desktop -->
|  win
|  win
|  ??
   <!-- OS X: Desktop -->
   <!-- OS X: Desktop, B2G -->
|  mac
|  mac
|  ??
   <!-- Linux-gtk: Desktop -->
   <!-- Linux-gtk: Desktop, B2G, Mulet -->
|  linux
|  linux
|  ??
   <!-- Android: Fennec, GeckoView -->
|  ??
   <!-- Android: Fennec, B2G -->
|  android
|  android
b2g
?
   <!-- iOS -->
   <!-- iOS -->
|  ??
|  ??
|-
|-
!toolkit
!toolkit
   <!-- Windows: Desktop, B2G -->
   <!-- Windows: Desktop -->
|  windows
|  windows
|  ??
   <!-- OS X: Desktop -->
   <!-- OS X: Desktop, B2G -->
|  cocoa
|  cocoa
|  ??
   <!-- Linux-gtk: Desktop -->
   <!-- Linux-gtk: Desktop, B2G, Mulet -->
|  gtk2 or gtk3
|  gtk2 or gtk3
  <!-- Android: Fennec, GeckoView -->
|  android
|  ??
|  ??
|  ??
  <!-- Android: Fennec, B2G -->
|  android
|  gonk
   <!-- iOS -->
   <!-- iOS -->
|  ??
|  ??
|-
|-
!buildapp
!buildapp
   <!-- Windows: Desktop, B2G -->
   <!-- Windows: Desktop -->
|  ??
|  ??
  <!-- OS X: Desktop -->
|  ??
|  ??
  <!-- OS X: Desktop, B2G -->
   <!-- Linux-gtk: Desktop -->
|  ??
|  ??
   <!-- Linux-gtk: Desktop, B2G, Mulet -->
|  ??
|  ??
  <!-- Android: Fennec, GeckoView -->
|  ??
|  ??
|  mulet
  <!-- Android: Fennec, B2G -->
|  ??
|  ??
|  b2g
   <!-- 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