Platform/Platform-specific build defines: Difference between revisions

From MozillaWiki
Jump to navigation Jump to search
(→‎Reftest conditions: add geckoview reftest condition)
(Added XP_SOLARIS)
 
(One intermediate revision by one other user not shown)
Line 7: Line 7:
!colspan="1"|Linux-gtk
!colspan="1"|Linux-gtk
!colspan="2"|Android
!colspan="2"|Android
!colspan="1"|*BSD
!colspan="1"|Solaris
!iOS
!iOS
|-
|-
Line 15: Line 17:
!Fennec
!Fennec
!GeckoView
!GeckoView
!Desktop
!Desktop
!iOS
!iOS
|-
|-
Line 27: Line 31:
|   
|   
|   
|   
  <!-- BSD, Solaris -->
| &nbsp;
| &nbsp;
   <!-- iOS -->
   <!-- iOS -->
|  &nbsp;
|  &nbsp;
Line 40: Line 47:
|  &nbsp;
|  &nbsp;
|  &nbsp;
|  &nbsp;
  <!-- BSD, Solaris -->
| &nbsp;
| &nbsp;
   <!-- iOS -->
   <!-- iOS -->
|  style="background: green; color: white"|✓
|  style="background: green; color: white"|✓
Line 53: Line 63:
|  &nbsp;
|  &nbsp;
|  &nbsp;
|  &nbsp;
  <!-- BSD, Solaris -->
| &nbsp;
| &nbsp;
   <!-- iOS -->
   <!-- iOS -->
|  &nbsp;
|  &nbsp;
Line 66: Line 79:
|  &nbsp;
|  &nbsp;
|  &nbsp;
|  &nbsp;
  <!-- BSD, Solaris -->
| &nbsp;
| &nbsp;
   <!-- iOS -->
   <!-- iOS -->
|  style="background: green; color: white"|✓
|  style="background: green; color: white"|✓
Line 79: Line 95:
|  style="background: green; color: white"|✓
|  style="background: green; color: white"|✓
|  style="background: green; color: white"|✓
|  style="background: green; color: white"|✓
  <!-- BSD, Solaris -->
| style="background: green; color: white"|✓
| style="background: green; color: white"|✓
   <!-- iOS -->
   <!-- iOS -->
|  style="background: green; color: white"|✓
|  style="background: green; color: white"|✓
Line 92: Line 111:
|  style="background: green; color: white"|✓
|  style="background: green; color: white"|✓
|  style="background: green; color: white"|✓
|  style="background: green; color: white"|✓
  <!-- BSD, Solaris -->
| &nbsp;
| &nbsp;
  <!-- iOS -->
|  &nbsp;
|-
!XP_SOLARIS
  <!-- Windows: Desktop -->
|  &nbsp;
  <!-- OS X: Desktop -->
|  &nbsp;
  <!-- Linux-gtk: Desktop -->
|  &nbsp;
  <!-- Android: Fennec, GeckoView -->
|  &nbsp;
|  &nbsp;
  <!-- BSD, Solaris -->
|  &nbsp;
| style="background: green; color: white"|✓
   <!-- iOS -->
   <!-- iOS -->
|  &nbsp;
|  &nbsp;
Line 105: Line 143:
|  style="background: green; color: white"|✓
|  style="background: green; color: white"|✓
|  style="background: green; color: white"|✓
|  style="background: green; color: white"|✓
  <!-- BSD, Solaris -->
| &nbsp;
| &nbsp;
   <!-- iOS -->
   <!-- iOS -->
|  &nbsp;
|  &nbsp;
Line 118: Line 159:
|  &nbsp;
|  &nbsp;
|  &nbsp;
|  &nbsp;
  <!-- BSD, Solaris -->
| style="background: green; color: white"|✓
| style="background: green; color: white"|✓
   <!-- iOS -->
   <!-- iOS -->
|  &nbsp;
|  &nbsp;
Line 131: Line 175:
|  style="background: green; color: white"|✓
|  style="background: green; color: white"|✓
|  style="background: green; color: white"|✓
|  style="background: green; color: white"|✓
   <!-- iOS -->
   <!-- BSD, Solaris -->
| &nbsp;
| &nbsp;
  <!-- iOS -->
|  &nbsp;
|  &nbsp;
|-
|-
Line 144: Line 191:
|  &nbsp;
|  &nbsp;
|  &nbsp;
|  &nbsp;
  <!-- BSD, Solaris -->
| &nbsp;
| &nbsp;
   <!-- iOS -->
   <!-- iOS -->
|  style="background: green; color: white"|✓
|  style="background: green; color: white"|✓

Latest revision as of 10:51, 15 July 2019

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 *BSD Solaris iOS
Product Desktop Desktop Desktop Fennec GeckoView Desktop Desktop iOS
XP_WIN              
XP_DARWIN            
XP_MACOSX              
XP_IOS              
XP_UNIX  
XP_LINUX          
XP_SOLARIS              
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       ??  
geckoview-prefs.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        
geckoview          
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 android ??
toolkit windows cocoa gtk2 or gtk3 android android ??
buildapp ?? ?? ?? mobile/android ?? ??

You may also be interested in Platform/Channel-specific_build_defines