зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1233732 - disable MacroAssembler.h macro magic for clang-cl; r=nbp
clang-cl attempts to emulate MSVC's handling of __VA_ARGS__, but doesn't quite get it right: https://llvm.org/bugs/show_bug.cgi?id=25875 As a result of this, compiling files that #include MacroAssembler.h with clang-cl result in fallbacks to MSVC. Since falling back to MSVC is non-ideal (and also causes problems around things like linking function template instantiations), let's disable MacroAssembler.h's macro magic for the time being. Ideally, the problem will get fixed upstream soon (even though it looks somewhat complicated); in the meantime, fixing this issue lets forward progress be made when compiling Gecko with clang-cl.
This commit is contained in:
Родитель
759854ca44
Коммит
caaca24b03
|
@ -169,8 +169,15 @@
|
|||
DEFINED_ON_EXPAND_ARCH_RESULTS( \
|
||||
(MOZ_FOR_EACH(DEFINED_ON_FWDARCH, (), ArchList)))
|
||||
|
||||
// clang-cl doesn't exactly follow MSVC's custom rules for handling
|
||||
// __VA_ARGS__ in macros (see LLVM PR 25875), so avoid using this macro
|
||||
// there.
|
||||
#if defined(_MSC_VER) && defined(__clang__)
|
||||
# define DEFINED_ON(...) /* nothing */
|
||||
#else
|
||||
# define DEFINED_ON(...) \
|
||||
DEFINED_ON_MAP_ON_ARCHS((none, __VA_ARGS__))
|
||||
#endif
|
||||
|
||||
# define PER_ARCH DEFINED_ON(ALL_ARCH)
|
||||
# define PER_SHARED_ARCH DEFINED_ON(ALL_SHARED_ARCH)
|
||||
|
|
Загрузка…
Ссылка в новой задаче