diff --git a/mozglue/build/moz.build b/mozglue/build/moz.build
--- a/mozglue/build/moz.build
+++ b/mozglue/build/moz.build
@@ -123,8 +123,23 @@ if CONFIG['OS_TARGET'] == 'Darwin':
     # because somehow clang doesn't want to accept the __thread keyword
     # for TLS.
     LDFLAGS += ['-Wl,-bind_at_load']
 
 if CONFIG['MOZ_LINKER'] and CONFIG['TARGET_CPU'] == 'arm':
     LDFLAGS += ['-Wl,-version-script,%s/arm-eabi-filter' % SRCDIR]
 
 DIST_INSTALL = True
+
+EXPORTS.mozilla += [
+    'parallel_invoke.h',
+]
+
+SOURCES += [
+    'parallel_invoke.cpp',
+]
+
+if CONFIG['_MSC_VER']:
+    if '-DTT_MEMUTIL' in CONFIG['MOZ_OPTIMIZE_FLAGS']:
+        SOURCES['parallel_invoke.cpp'].flags += [
+            '-GL-',
+            '-openmp',
+        ]
