diff --git a/media/ffvpx/ffvpxcommon.mozbuild b/media/ffvpx/ffvpxcommon.mozbuild index 3a83f781d3f3..5c99418bcab5 100644 --- a/media/ffvpx/ffvpxcommon.mozbuild +++ b/media/ffvpx/ffvpxcommon.mozbuild @@ -87,3 +87,18 @@ if CONFIG['MOZ_DEBUG']: elif not CONFIG['RELEASE_OR_BETA']: # Enable fast assertions in opt builds of Nightly and Aurora. DEFINES['ASSERT_LEVEL'] = 1 + +# clang-cl's doesn't work the same as MSVC's. For details, see: +# +# http://lists.llvm.org/pipermail/cfe-dev/2016-September/050943.html +# +# As a temporary workaround while upstream decides how to address this, +# we enable modules to make more MSVC-compatible. +if CONFIG['CLANG_CL']: + CFLAGS += [ + '-Xclang', + '-fmodules', + '-Xclang', + '-fmodules-cache-path=' + TOPOBJDIR + '/media/ffpvx', + '-fbuiltin-module-map', + ]