accessible/ipc/win/handler/moz.build
author Ted Mielczarek <ted@mielczarek.org>
Tue, 18 Sep 2018 15:50:19 -0400
changeset 492892 5b8dd6f38524a27b81bc39ed5f3224eebe3684ce
parent 485348 997fd8419a4b28cdaaf3263e88dcad585ccfb101
child 517774 dd188d3b0907198c15d2ec517d3c53ffc4f69450
permissions -rw-r--r--
Bug 1399870 - make DEFFILE a Path instead of a string; r=gps All but one of the current uses of DEFFILE use `SRCDIR + '/file.def'` to get a srcdir-relative path anyway, and the other one wants an objdir-relative path, so using Path makes everything clearer. This makes it more straightforward to translate the paths for the WSL build.

# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
# vim: set filetype=python:
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.

SharedLibrary('AccessibleHandler')

EXPORTS.mozilla.a11y += [
    'AccessibleHandler.h',
    'HandlerDataCleanup.h',
]

LOCAL_INCLUDES += [
    '/accessible/interfaces/ia2',
    '/ipc/mscom/oop',
]

SOURCES += [
    '!dlldata.c',
    '!HandlerData_c.c',
    '!HandlerData_i.c',
    '!HandlerData_p.c',
    'AccessibleHandler.cpp',
    'AccessibleHandlerControl.cpp',
    'HandlerChildEnumerator.cpp',
    'HandlerRelation.cpp',
    'HandlerTextLeaf.cpp',
]

GENERATED_FILES += [
    'dlldata.c',
    'HandlerData.h',
    'HandlerData.tlb',
    'HandlerData_c.c',
    'HandlerData_i.c',
    'HandlerData_p.c',
]

DEFFILE = 'AccessibleHandler.def'

USE_LIBS += [
    'mscom_oop',
]

OS_LIBS += [
    'rpcrt4',
]

RCINCLUDE = 'AccessibleHandler.rc'

# Suppress warnings from the MIDL generated code.
if CONFIG['CC_TYPE'] == 'clang-cl':
    CFLAGS += [
        '-Wno-extern-initializer',
        '-Wno-incompatible-pointer-types',
        '-Wno-missing-braces',
        '-Wno-unused-const-variable',
    ]

# Since we are defining our own COM entry points (DllRegisterServer et al),
# but we still want to be able to delegate some work to the generated code,
# we add the prefix "Proxy" to all of the generated counterparts.
DEFINES['ENTRY_PREFIX'] = 'Proxy'
DEFINES['REGISTER_PROXY_DLL'] = True
LIBRARY_DEFINES['MOZ_MSCOM_REMARSHAL_NO_HANDLER'] = True

# We want to generate distinct UUIDs on a per-channel basis, so we need
# finer granularity than the standard preprocessor definitions offer.
# These defines allow us to separate local builds from automated builds,
# as well as separate beta from release.
if CONFIG['MOZ_UPDATE_CHANNEL'] == 'default':
  DEFINES['USE_LOCAL_UUID'] = True
elif CONFIG['MOZ_UPDATE_CHANNEL'] == 'beta':
  DEFINES['USE_BETA_UUID'] = True

# This DLL may be loaded into other processes, so we need static libs for
# Windows 7 and Windows 8.
USE_STATIC_LIBS = True

LIBRARY_DEFINES['UNICODE'] = True
LIBRARY_DEFINES['_UNICODE'] = True
LIBRARY_DEFINES['MOZ_NO_MOZALLOC'] = True
DisableStlWrapping()

if CONFIG['CC_TYPE'] == 'clang-cl':
    AllowCompilerWarnings()  # workaround for bug 1090497