Bug 1317674 - Use the correct path to the binary for comm builds in the XPCOM glue check + exceptions for Calendar and Instantbird. r=glandium
☠☠ backed out by 3fa59ec4e1ad ☠ ☠
authoraleth <aleth@instantbird.org>
Wed, 16 Nov 2016 02:01:04 +0100
changeset 322663 5cd867e3258be1a56c712f6dfa9f8b8532f7a8ff
parent 322662 68d6f69e0837db5a8790c18d6f0040e9de3abe88
child 322664 3fa59ec4e1addd2f5e02748cc487e51c3fc41d5b
push id83947
push useraleth@instantbird.org
push dateWed, 16 Nov 2016 01:01:58 +0000
treeherdermozilla-inbound@5cd867e3258b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersglandium
bugs1317674
milestone53.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 1317674 - Use the correct path to the binary for comm builds in the XPCOM glue check + exceptions for Calendar and Instantbird. r=glandium
python/mozbuild/mozbuild/frontend/emitter.py
--- a/python/mozbuild/mozbuild/frontend/emitter.py
+++ b/python/mozbuild/mozbuild/frontend/emitter.py
@@ -138,16 +138,18 @@ ALLOWED_XPCOM_GLUE = {
     ('testcrasher', 'toolkit/crashreporter/test'),
     ('jsep_session_unittest', 'media/webrtc/signaling/test'),
     ('jsep_track_unittest', 'media/webrtc/signaling/test'),
     ('mediaconduit_unittests', 'media/webrtc/signaling/test'),
     ('mediapipeline_unittest', 'media/webrtc/signaling/test'),
     ('sdp_file_parser', 'media/webrtc/signaling/fuzztest'),
     ('signaling_unittests', 'media/webrtc/signaling/test'),
     ('TestMailCookie', 'mailnews/base/test'),
+    ('calbasecomps', 'calendar/base/backend/libical/build'),
+    ('purplexpcom', 'extensions/purple/purplexpcom/src'),
 }
 
 
 class TreeMetadataEmitter(LoggingMixin):
     """Converts the executed mozbuild files into data structures.
 
     This is a bridge between reader.py and data.py. It takes what was read by
     reader.BuildReader and converts it into the classes defined in the data
@@ -411,19 +413,23 @@ class TreeMetadataEmitter(LoggingMixin):
             obj.link_library(candidates[0])
 
         # Link system libraries from OS_LIBS/HOST_OS_LIBS.
         for lib in context.get(variable.replace('USE', 'OS'), []):
             obj.link_system_library(lib)
 
         key = (obj.name, obj.relativedir)
         substs = context.config.substs
+        moz_build_app = substs.get('MOZ_BUILD_APP')
+        if moz_build_app.startswith('../'):
+            # For comm-central builds, where topsrcdir is not the root source dir
+            moz_build_app = moz_build_app[3:]
         extra_allowed = [
-            (substs.get('MOZ_APP_NAME'), '%s/app' % substs.get('MOZ_BUILD_APP')),
-            ('%s-bin' % substs.get('MOZ_APP_NAME'), '%s/app' % substs.get('MOZ_BUILD_APP')),
+            (substs.get('MOZ_APP_NAME'), '%s/app' % moz_build_app),
+            ('%s-bin' % substs.get('MOZ_APP_NAME'), '%s/app' % moz_build_app),
         ]
         if substs.get('MOZ_WIDGET_TOOLKIT') != 'android':
             extra_allowed.append((substs.get('MOZ_CHILD_PROCESS_NAME'), 'ipc/app'))
 
         if key in ALLOWED_XPCOM_GLUE or key in extra_allowed:
             if not use_xpcom:
                 raise SandboxValidationError(
                     "%s is in the exception list for XPCOM glue dependency but "