Bug 1298418 - use clang modules with ffvpx's libavutil and clang-cl; r=mshal

clang-cl's <intrin.h> is not completely compatible with MSVC's
<intrin.h> by default, as clang-cl's version does not include all the
Intel intrinsic headers by default.  clang-cl does this to make
<intrin.h> as small as possible, as this was shown to have significant
wins for compile time.  Compiling with modules, however, includes all
the Intel intrinsic headers by default, so while upstream decides on a
general solution, we need to compile with modules locally.

MozReview-Commit-ID: BC1uureeQrx

--HG--
extra : rebase_source : f1127e909d0f9d3de99959933bcbc54af21fc6e2
This commit is contained in:
Nathan Froyd 2016-11-30 16:01:55 -05:00
parent eab6639cc7
commit 6c5fe582cc

View File

@ -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 <intrin.h> 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 <intrin.h> more MSVC-compatible.
if CONFIG['CLANG_CL']:
CFLAGS += [
'-Xclang',
'-fmodules',
'-Xclang',
'-fmodules-cache-path=' + TOPOBJDIR + '/media/ffpvx',
'-fbuiltin-module-map',
]