diff --git a/accessible/ipc/win/handler/AccessibleHandler.h b/accessible/ipc/win/handler/AccessibleHandler.h index a6e03bb572ea..cb94fc79abe4 100644 --- a/accessible/ipc/win/handler/AccessibleHandler.h +++ b/accessible/ipc/win/handler/AccessibleHandler.h @@ -9,11 +9,6 @@ #define NEWEST_IA2_BASENAME Accessible2_3 -#define __QUOTE(idl) #idl -#define __GENIDL(base) __QUOTE(base##.idl) -#define IDLFOR(base) __GENIDL(base) -#define NEWEST_IA2_IDL IDLFOR(NEWEST_IA2_BASENAME) - #define __GENIFACE(base) I##base #define INTERFACEFOR(base) __GENIFACE(base) #define NEWEST_IA2_INTERFACE INTERFACEFOR(NEWEST_IA2_BASENAME) @@ -24,7 +19,7 @@ #if defined(__midl) || defined(__WIDL__) -import NEWEST_IA2_IDL; +import "Accessible2_3.idl"; #else diff --git a/toolkit/moz.configure b/toolkit/moz.configure index e0316cd4d66a..be352da0742f 100644 --- a/toolkit/moz.configure +++ b/toolkit/moz.configure @@ -1163,8 +1163,12 @@ def midl_flags(c_compiler, target, toolchain_search_path): 'aarch64': 'arm64', }[target.cpu] flags = ['-env', env] - # Ideally, we'd use ['-cpp_cmd', c_compiler.compiler], but clang-cl - # currently doesn't work as a preprocessor for midl, so we need to + + if c_compiler.version >= '8': + return flags + ['-cpp_cmd', c_compiler.compiler] + + # clang-cl didn't work as a preprocessor for midl before version 8 + # so we need to find cl if we use an older version. # find cl. https://bugs.llvm.org/show_bug.cgi?id=40140 cl = find_program('cl', paths=toolchain_search_path) if not cl: