Skip to content

Commit

Permalink
Bug 1240134 - Incorporate the interfaces.xpt from downloaded artifact…
Browse files Browse the repository at this point in the history
…s instead of building XPIDL during an artifact build. r=glandium

MozReview-Commit-ID: 8oEyS1xLOwV
  • Loading branch information
chmanchester committed Aug 17, 2016
1 parent 337f05f commit b0b84a1
Show file tree
Hide file tree
Showing 11 changed files with 54 additions and 4 deletions.
10 changes: 10 additions & 0 deletions browser/installer/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,12 @@ else
DEFINES += -DMOZ_MULET
endif

# When packaging an artifact build not all xpt files expected by the
# packager will be present.
ifdef MOZ_ARTIFACT_BUILDS
MOZ_PKG_FATAL_WARNINGS =
endif

DEFINES += -DMOZ_APP_NAME=$(MOZ_APP_NAME) -DPREF_DIR=$(PREF_DIR)

ifdef MOZ_DEBUG
Expand All @@ -43,6 +49,10 @@ ifdef NSS_DISABLE_DBM
DEFINES += -DNSS_DISABLE_DBM=1
endif

ifdef MOZ_ARTIFACT_BUILDS
DEFINES += -DMOZ_ARTIFACT_BUILDS=1
endif

DEFINES += -DJAREXT=

ifdef MOZ_ANGLE_RENDERER
Expand Down
6 changes: 6 additions & 0 deletions browser/installer/package-manifest.in
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,12 @@
#endif

; [Components]
#ifdef MOZ_ARTIFACT_BUILDS
@RESPATH@/components/prebuilt-interfaces.manifest
@RESPATH@/components/interfaces.xpt
@RESPATH@/browser/components/prebuilt-interfaces.manifest
@RESPATH@/browser/components/interfaces.xpt
#endif
@RESPATH@/browser/components/components.manifest
@RESPATH@/components/alerts.xpt
#ifdef ACCESSIBILITY
Expand Down
7 changes: 7 additions & 0 deletions browser/moz.build
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,10 @@ TEST_DIRS += [

DIST_SUBDIR = 'browser'
export('DIST_SUBDIR')

if CONFIG['MOZ_ARTIFACT_BUILDS']:
# Ensure a pre-built interfaces.xpt installed to the objdir by the artifact
# code is included by the top-level chrome.manifest.
EXTRA_COMPONENTS += [
'../build/prebuilt-interfaces.manifest',
]
7 changes: 7 additions & 0 deletions build/moz.build
Original file line number Diff line number Diff line change
Expand Up @@ -101,3 +101,10 @@ if CONFIG['MOZ_VALGRIND']:
'valgrind/i386-redhat-linux-gnu.sup',
'valgrind/x86_64-redhat-linux-gnu.sup',
]

if CONFIG['MOZ_ARTIFACT_BUILDS']:
# Ensure a pre-built interfaces.xpt installed to the objdir by the artifact
# code is included by the top-level chrome.manifest.
EXTRA_COMPONENTS += [
'prebuilt-interfaces.manifest',
]
1 change: 1 addition & 0 deletions build/prebuilt-interfaces.manifest
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
interfaces interfaces.xpt
2 changes: 2 additions & 0 deletions config/makefiles/xpidl/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,9 @@ depends_files := $(foreach root,$(xpidl_modules),$(idl_deps_dir)/$(root).pp)

GARBAGE += $(xpt_files) $(depends_files)

ifdef COMPILE_ENVIRONMENT
xpidl:: $(xpt_files) $(chrome_manifests) $(interfaces_manifests)
endif

$(xpt_files): $(process_py) $(call mkdir_deps,$(idl_deps_dir) $(dist_include_dir))

Expand Down
6 changes: 5 additions & 1 deletion js/xpconnect/tests/moz.build
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,17 @@
# file, You can obtain one at http://mozilla.org/MPL/2.0/.

TEST_DIRS += [
'idl',
'mochitest',
'chrome',
'browser',
'components/native',
]

if CONFIG['COMPILE_ENVIRONMENT']:
TEST_DIRS += [
'idl',
]

XPCSHELL_TESTS_MANIFESTS += [
'unit/xpcshell.ini',
]
Expand Down
4 changes: 4 additions & 0 deletions mobile/android/installer/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,10 @@ ifdef MOZ_ANDROID_GCM
DEFINES += -DMOZ_ANDROID_GCM=1
endif

ifdef MOZ_ARTIFACT_BUILDS
DEFINES += -DMOZ_ARTIFACT_BUILDS=1
endif

MOZ_PACKAGER_MINIFY=1

include $(topsrcdir)/toolkit/mozapps/installer/packager.mk
Expand Down
4 changes: 4 additions & 0 deletions mobile/android/installer/package-manifest.in
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,10 @@
@BINPATH@/blocklist.xml

; [Components]
#ifdef MOZ_ARTIFACT_BUILDS
@BINPATH@/components/interfaces.xpt
@BINPATH@/components/prebuilt-interfaces.manifest
#endif
@BINPATH@/components/components.manifest
@BINPATH@/components/alerts.xpt
#ifdef ACCESSIBILITY
Expand Down
4 changes: 4 additions & 0 deletions python/mozbuild/mozbuild/artifacts.py
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,7 @@ class AndroidArtifactJob(ArtifactJob):
'application.ini',
'platform.ini',
'**/*.so',
'**/interfaces.xpt',
}

def process_artifact(self, filename, processed_filename):
Expand Down Expand Up @@ -228,6 +229,7 @@ class LinuxArtifactJob(ArtifactJob):
'firefox/plugin-container',
'firefox/updater',
'firefox/**/*.so',
'firefox/**/interfaces.xpt',
}

def process_package_artifact(self, filename, processed_filename):
Expand Down Expand Up @@ -318,6 +320,7 @@ def process_package_artifact(self, filename, processed_filename):
'gmp-clearkey/0.1/libclearkey.dylib',
# 'gmp-fake/1.0/libfake.dylib',
# 'gmp-fakeopenh264/1.0/libfakeopenh264.dylib',
'**/interfaces.xpt',
])

with JarWriter(file=processed_filename, optimize=False, compress_level=5) as writer:
Expand Down Expand Up @@ -358,6 +361,7 @@ class WinArtifactJob(ArtifactJob):
'firefox/application.ini',
'firefox/**/*.dll',
'firefox/*.exe',
'firefox/**/interfaces.xpt',
}
# These are a subset of TEST_HARNESS_BINS in testing/mochitest/Makefile.in.
test_artifact_patterns = {
Expand Down
7 changes: 4 additions & 3 deletions xpcom/tests/moz.build
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,10 @@ if CONFIG['MOZ_DEBUG'] and CONFIG['OS_ARCH'] not in ('WINNT'):
'TestDeadlockDetectorScalability',
])

TEST_HARNESS_FILES.xpcshell.xpcom.tests.unit += [
'!/dist/bin/components/xpcomtest.xpt',
]
if CONFIG['COMPILE_ENVIRONMENT']:
TEST_HARNESS_FILES.xpcshell.xpcom.tests.unit += [
'!/dist/bin/components/xpcomtest.xpt',
]

XPIDL_MODULE = 'xpcomtest'
XPIDL_SOURCES += [
Expand Down

0 comments on commit b0b84a1

Please sign in to comment.