Bug 1335525 - Add --enable-webrender configure option and hook it up build webrender. r=gps
authorKartikaya Gupta <kgupta@mozilla.com>
Mon, 06 Feb 2017 11:42:53 -0500
changeset 340982 bfb91220ceb50677cc072e1c75b2342d5ba22b12
parent 340981 d300c689f52e788542909647d3ab05719a46bb85
child 340983 b58c302e77b45f9861271e97d63a18113abe1dec
push id86615
push userkwierso@gmail.com
push dateTue, 07 Feb 2017 01:52:08 +0000
treeherdermozilla-inbound@f0453084d86e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgps
bugs1335525
milestone54.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1335525 - Add --enable-webrender configure option and hook it up build webrender. r=gps MozReview-Commit-ID: BWLoSnV2yEN
toolkit/library/gtest/rust/moz.build
toolkit/library/moz.build
toolkit/library/rust/moz.build
toolkit/moz.configure
--- a/toolkit/library/gtest/rust/moz.build
+++ b/toolkit/library/gtest/rust/moz.build
@@ -6,9 +6,12 @@
 
 features = []
 if CONFIG['MOZ_STYLO']:
     features += ['servo']
 
     if CONFIG['MOZ_STYLO_BINDGEN']:
         features += ['bindgen']
 
+if CONFIG['MOZ_ENABLE_WEBRENDER']:
+    features += ['quantum_render']
+
 RustLibrary('gkrust-gtest', features)
--- a/toolkit/library/moz.build
+++ b/toolkit/library/moz.build
@@ -380,16 +380,27 @@ if CONFIG['COMPILE_ENVIRONMENT']:
         )
     GENERATED_FILES += ['dependentlibs.list']
     GENERATED_FILES['dependentlibs.list'].script = 'dependentlibs.py:gen_list'
     GENERATED_FILES['dependentlibs.list'].inputs = [
         '!%s' % full_libname,
     ]
     FINAL_TARGET_FILES += ['!dependentlibs.list']
 
+# WebRender dependencies
+if CONFIG['MOZ_ENABLE_WEBRENDER']:
+    if CONFIG['OS_ARCH'] == 'Linux':
+        OS_LIBS += [
+            'GL',
+        ]
+    elif CONFIG['OS_ARCH'] == 'WINNT':
+        OS_LIBS += [
+            'opengl32',
+        ]
+
 # This library needs to be last to make XPCOM module registration work.
 USE_LIBS += ['StaticXULComponentsEnd']
 
 # The above library needs to be last for C++ purposes.  This library,
 # however, is entirely composed of Rust code, and needs to come after
 # all the C++ code so any possible C++ -> Rust calls can be resolved.
 if CONFIG['MOZ_RUST']:
     USE_LIBS += ['gkrust']
--- a/toolkit/library/rust/moz.build
+++ b/toolkit/library/rust/moz.build
@@ -6,9 +6,12 @@
 
 features = []
 if CONFIG['MOZ_STYLO']:
     features += ['servo']
 
     if CONFIG['MOZ_STYLO_BINDGEN']:
         features += ['bindgen']
 
+if CONFIG['MOZ_ENABLE_WEBRENDER']:
+    features += ['quantum_render']
+
 RustLibrary('gkrust', features)
--- a/toolkit/moz.configure
+++ b/toolkit/moz.configure
@@ -685,16 +685,24 @@ option('--with-servo', env='SERVO_TARGET
             'be found. This is generally servo_src_dir/target/release.')
 
 @depends_if('--with-servo')
 def servo_target_dir(value):
     return value[0]
 
 set_config('SERVO_TARGET_DIR', servo_target_dir)
 
+# WebRender integration
+option('--enable-webrender', help='Include WebRender')
+
+set_config('MOZ_ENABLE_WEBRENDER',
+           depends_if('--enable-webrender')(lambda _: True))
+set_define('MOZ_ENABLE_WEBRENDER',
+           depends_if('--enable-webrender')(lambda _: True))
+
 # Gecko integrated IPC fuzzer
 # ==============================================================
 option('--enable-ipc-fuzzer', env='MOZ_FAULTY',
        help='Enable IPC fuzzer')
 
 @depends('--enable-ipc-fuzzer', target)
 def ipc_fuzzer(value, target):
     if value: