1# -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
2# vim: set filetype=python:
3# This Source Code Form is subject to the terms of the Mozilla Public
4# License, v. 2.0. If a copy of the MPL was not distributed with this
5# file, You can obtain one at http://mozilla.org/MPL/2.0/.
6
7if CONFIG["COMPILE_ENVIRONMENT"] and CONFIG["ACCESSIBILITY"]:
8    DIRS += [
9        "handler",
10        "typelib",
11    ]
12
13if CONFIG["ACCESSIBILITY"]:
14    IPDL_SOURCES += ["PDocAccessible.ipdl"]
15
16    EXPORTS.mozilla.a11y += [
17        "COMPtrTypes.h",
18        "DocAccessibleChild.h",
19        "HandlerProvider.h",
20        "PlatformChild.h",
21        "RemoteAccessible.h",
22    ]
23
24    SOURCES += [
25        "!./handler/HandlerData_c.c",
26        "COMPtrTypes.cpp",
27        "DocAccessibleChild.cpp",
28        "HandlerProvider.cpp",
29        "PlatformChild.cpp",
30        "RemoteAccessible.cpp",
31    ]
32
33    # Give some symbols a unique name in each translation unit, to avoid
34    # collisions caused by https://llvm.org/pr41817.
35    if CONFIG["CC_TYPE"] == "clang-cl":
36        SOURCES["!./handler/HandlerData_c.c"].flags += [
37            "-DUserMarshalRoutines=UserMarshalRoutines__HandlerData_c"
38        ]
39
40    LOCAL_INCLUDES += [
41        "/accessible/base",
42        "/accessible/generic",
43        "/accessible/windows/ia2",
44        "/accessible/windows/msaa",
45        "/accessible/xpcom",
46    ]
47
48    # Suppress warnings from the MIDL generated code.
49    if CONFIG["CC_TYPE"] == "clang-cl":
50        CFLAGS += [
51            "-Wno-extern-initializer",
52            "-Wno-incompatible-pointer-types",
53            "-Wno-missing-braces",
54            "-Wno-unused-const-variable",
55        ]
56
57        CXXFLAGS += [
58            "-Wno-missing-braces",
59        ]
60
61include("/ipc/chromium/chromium-config.mozbuild")
62
63FINAL_LIBRARY = "xul"
64