tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

moz.build (3302B)


      1 # -*- Mode: python; 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 
      7 GeckoSharedLibrary("IA2Marshal", linkage=None)
      8 DEFINES["REGISTER_PROXY_DLL"] = True
      9 # {F9A6CC32-B0EF-490B-B102-179DDEEB08ED}
     10 DEFINES["PROXY_CLSID_IS"] = (
     11     "{0xF9A6CC32,0xB0EF,0x490B,{0xB1,0x02,0x17,0x9D,0xDE,0xEB,0x08,0xED}}"
     12 )
     13 DEFFILE = "IA2Marshal.def"
     14 OS_LIBS += [
     15     "uuid",
     16     "kernel32",
     17     "rpcrt4",
     18     "ole32",
     19     "oleaut32",
     20 ]
     21 
     22 midl_enums = [
     23     "AccessibleEventId",
     24     "AccessibleRole",
     25     "AccessibleStates",
     26     "IA2CommonTypes",
     27 ]
     28 
     29 midl_interfaces = [
     30     "Accessible2",
     31     "Accessible2_2",
     32     "AccessibleAction",
     33     "AccessibleApplication",
     34     "AccessibleComponent",
     35     "AccessibleDocument",
     36     "AccessibleEditableText",
     37     "AccessibleHyperlink",
     38     "AccessibleHypertext",
     39     "AccessibleHypertext2",
     40     "AccessibleImage",
     41     "AccessibleRelation",
     42     "AccessibleTable",
     43     "AccessibleTable2",
     44     "AccessibleTableCell",
     45     "AccessibleText",
     46     "AccessibleText2",
     47     "AccessibleTextSelectionContainer",
     48     "AccessibleValue",
     49 ]
     50 
     51 for enum in midl_enums:
     52     GeneratedFile(
     53         enum + ".h",
     54         inputs=["/other-licenses/ia2/" + enum + ".idl"],
     55         script="/build/midl.py",
     56         entry_point="midl",
     57         flags=["-app_config", "-I", TOPSRCDIR + "/other-licenses/ia2"],
     58     )
     59 
     60     EXPORTS += ["!" + enum + ".h"]
     61 
     62 for iface in midl_interfaces:
     63     GeneratedFile(
     64         iface + ".h",
     65         iface + "_p.c",
     66         iface + "_i.c",
     67         iface + "_dlldata.c",
     68         inputs=["/other-licenses/ia2/" + iface + ".idl"],
     69         script="/build/midl.py",
     70         entry_point="midl",
     71         flags=[
     72             "-app_config",
     73             "-I",
     74             TOPSRCDIR + "/other-licenses/ia2",
     75             "-dlldata",
     76             OBJDIR + "/" + iface + "_dlldata.c",
     77         ],
     78     )
     79 
     80     EXPORTS += ["!" + iface + ".h", "!" + iface + "_i.c"]
     81 
     82     for p in [iface + "_p.c", iface + "_i.c"]:
     83         SOURCES += ["!%s" % p]
     84 
     85         # Give some symbols a unique name in each translation unit, to avoid
     86         # collisions caused by https://llvm.org/pr41817.
     87         if CONFIG["CC_TYPE"] == "clang-cl":
     88             SOURCES["!%s" % p].flags += [
     89                 "-DObject_StubDesc=Object_StubDesc__%s" % p[:-2]
     90             ]
     91             SOURCES["!%s" % p].flags += [
     92                 "-DUserMarshalRoutines=UserMarshalRoutines__%s" % p[:-2]
     93             ]
     94 
     95 GeneratedFile(
     96     "IA2Typelib.h",
     97     "IA2Typelib_i.c",
     98     "IA2Typelib.tlb",
     99     inputs=["IA2Typelib.idl"],
    100     script="/build/midl.py",
    101     entry_point="midl",
    102     flags=[
    103         "-app_config",
    104         "-I",
    105         TOPSRCDIR + "/other-licenses/ia2",
    106     ],
    107 )
    108 
    109 GeneratedFile(
    110     "dlldata.c",
    111     inputs=["!" + iface + "_dlldata.c" for iface in midl_interfaces],
    112     script="/build/midl.py",
    113     entry_point="merge_dlldata",
    114 )
    115 SOURCES += ["!dlldata.c"]
    116 
    117 # Suppress warnings from the MIDL generated code.
    118 if CONFIG["CC_TYPE"] == "clang-cl":
    119     CFLAGS += [
    120         "-Wno-extern-initializer",
    121         "-Wno-incompatible-pointer-types",
    122         "-Wno-missing-braces",
    123         "-Wno-unused-const-variable",
    124     ]