Platform/Platform-specific build defines: Difference between revisions

From MozillaWiki
Jump to navigation Jump to search
(Add a very incomplete mochitest condition table)
(Adding MOZ_B2GDROID and b2gdroid to the platform table)
Line 6: Line 6:
!colspan="2"|OS X
!colspan="2"|OS X
!colspan="3"|Linux-gtk
!colspan="3"|Linux-gtk
!colspan="2"|Android
!colspan="3"|Android
!iOS
!iOS
|-
|-
Line 19: Line 19:
!Fennec
!Fennec
!B2G
!B2G
!B2GDROID
!iOS
!iOS
|-
|-
Line 26: Line 27:
| || 
| || 
| || || 
| || || 
| || 
| || || 
| 
| 
|-
|-
Line 34: Line 35:
|style="background: green; color: white"|✓
|style="background: green; color: white"|✓
| || || 
| || || 
| || 
| || || 
|style="background: green; color: white"|✓
|style="background: green; color: white"|✓
|-
|-
Line 42: Line 43:
|style="background: green; color: white"|✓
|style="background: green; color: white"|✓
| || || 
| || || 
| || 
| || || 
| 
| 
|-
|-
Line 49: Line 50:
| || 
| || 
| || || 
| || || 
| || 
| || || 
|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"|✓
Line 66: Line 68:
| || 
| || 
| || 
| || 
|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"|✓
Line 77: Line 80:
| || 
| || 
| || || 
| || || 
|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"|✓
Line 90: Line 94:
|style="background: green; color: white"|✓
|style="background: green; color: white"|✓
| 
| 
|style="background: green; color: white"|✓
|style="background: green; color: white"|✓
| 
|-
!MOZ_B2GDROID
| || 
| || 
| || 
| 
| || 
|style="background: green; color: white"|✓
|style="background: green; color: white"|✓
| 
| 
Line 98: Line 112:
| || 
| || 
|style="background: green; color: white"|✓
|style="background: green; color: white"|✓
| || 
| || || 
| 
| 
|-
|-
Line 107: Line 121:
|style="background: green; color: white"|✓
|style="background: green; color: white"|✓
|style="background: green; color: white"|✓
|style="background: green; color: white"|✓
| || 
| || || 
| 
| 
|-
|-
Line 116: Line 130:
|style="background: green; color: white"|✓
|style="background: green; color: white"|✓
| 
| 
|style="background: green; color: white"|✓
| 
| 
|-
|-
Line 124: Line 139:
| 
| 
|style="background: green; color: white"|✓
|style="background: green; color: white"|✓
| 
| 
| 
|-
|-
Line 130: Line 146:
| || 
| || 
| || || 
| || || 
| || 
| || || 
|style="background: green; color: white"|✓
|style="background: green; color: white"|✓
|}
|}

Revision as of 22:59, 2 September 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 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 Desktop B2G Desktop B2G Mulet Fennec B2G iOS
all.js
firefox.js            
mobile.js                  
b2g.js          
mulet.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