tor-browser

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

moz.build (3953B)


      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 XPIDL_SOURCES += ["nsIParserUtils.idl"]
      8 
      9 XPIDL_MODULE = "html5"
     10 
     11 EXPORTS += [
     12     "jArray.h",
     13     "nsAHtml5TreeBuilderState.h",
     14     "nsAHtml5TreeOpSink.h",
     15     "nsHtml5ArrayCopy.h",
     16     "nsHtml5AtomTable.h",
     17     "nsHtml5AttributeEntry.h",
     18     "nsHtml5AttributeName.h",
     19     "nsHtml5ByteReadable.h",
     20     "nsHtml5ContentCreatorFunction.h",
     21     "nsHtml5DependentUTF16Buffer.h",
     22     "nsHtml5DocumentBuilder.h",
     23     "nsHtml5DocumentMode.h",
     24     "nsHtml5HtmlAttributes.h",
     25     "nsHtml5Macros.h",
     26     "nsHtml5Module.h",
     27     "nsHtml5NamedCharacters.h",
     28     "nsHtml5NamedCharactersAccel.h",
     29     "nsHtml5OplessBuilder.h",
     30     "nsHtml5OwningUTF16Buffer.h",
     31     "nsHtml5Parser.h",
     32     "nsHtml5PlainTextUtils.h",
     33     "nsHtml5Portability.h",
     34     "nsHtml5Speculation.h",
     35     "nsHtml5SpeculativeLoad.h",
     36     "nsHtml5StreamListener.h",
     37     "nsHtml5StreamParser.h",
     38     "nsHtml5StreamParserPtr.h",
     39     "nsHtml5StreamParserReleaser.h",
     40     "nsHtml5String.h",
     41     "nsHtml5StringParser.h",
     42     "nsHtml5SVGLoadDispatcher.h",
     43     "nsHtml5TreeOperation.h",
     44     "nsHtml5TreeOpExecutor.h",
     45     "nsHtml5TreeOpStage.h",
     46     "nsHtml5UTF16Buffer.h",
     47     "nsHtml5UTF16BufferHSupplement.h",
     48     "nsHtml5ViewSourceUtils.h",
     49     "nsIContentHandle.h",
     50     "nsParserUtils.h",
     51 ]
     52 
     53 UNIFIED_SOURCES += [
     54     "nsHtml5AtomTable.cpp",
     55     "nsHtml5AttributeName.cpp",
     56     "nsHtml5DependentUTF16Buffer.cpp",
     57     "nsHtml5DocumentBuilder.cpp",
     58     "nsHtml5ElementName.cpp",
     59     "nsHtml5Highlighter.cpp",
     60     "nsHtml5HtmlAttributes.cpp",
     61     "nsHtml5Module.cpp",
     62     "nsHtml5NamedCharacters.cpp",
     63     "nsHtml5NamedCharactersAccel.cpp",
     64     "nsHtml5OplessBuilder.cpp",
     65     "nsHtml5OwningUTF16Buffer.cpp",
     66     "nsHtml5Parser.cpp",
     67     "nsHtml5PlainTextUtils.cpp",
     68     "nsHtml5Portability.cpp",
     69     "nsHtml5Speculation.cpp",
     70     "nsHtml5SpeculativeLoad.cpp",
     71     "nsHtml5StackNode.cpp",
     72     "nsHtml5StateSnapshot.cpp",
     73     "nsHtml5StreamListener.cpp",
     74     "nsHtml5StreamParser.cpp",
     75     "nsHtml5String.cpp",
     76     "nsHtml5StringParser.cpp",
     77     "nsHtml5SVGLoadDispatcher.cpp",
     78     "nsHtml5Tokenizer.cpp",
     79     "nsHtml5TreeBuilder.cpp",
     80     "nsHtml5TreeOperation.cpp",
     81     "nsHtml5TreeOpExecutor.cpp",
     82     "nsHtml5TreeOpStage.cpp",
     83     "nsHtml5UTF16Buffer.cpp",
     84     "nsHtml5ViewSourceUtils.cpp",
     85     "nsParserUtils.cpp",
     86 ]
     87 
     88 # Each target needs to compile:
     89 # (nsHtml5TokenizerALU.cpp XOR nsHtml5TokenizerALUStubs.cpp)
     90 # AND
     91 # (nsHtml5TokenizerSIMD.cpp XOR nsHtml5TokenizerSIMDStubs.cpp)
     92 # AND
     93 # (nsHtml5TokenizerALU.cpp OR nsHtml5TokenizerSIMD.cpp)
     94 #
     95 # Make sure the result is consistent with mozilla::htmlaccel::htmlaccelEnabled().
     96 #
     97 # Due to https://github.com/llvm/llvm-project/issues/160886, none of the
     98 # code here actually ends up with SIMD instructions, and SIMD stays in
     99 # htmlaccelNotInline.cpp instead. Once the LLVM bug is fixed, the functions
    100 # in htmlaccelNotInline.cpp should becomed always inlined and
    101 # nsHtml5TokenizerSIMD.cpp should be built with HTML_ACCEL_FLAGS.
    102 
    103 if (CONFIG["TARGET_CPU"] == "x86_64") and (
    104     CONFIG["CC_TYPE"] != "gcc" or int(CONFIG["CC_VERSION"].split(".")[0]) >= 12
    105 ):
    106     UNIFIED_SOURCES += [
    107         "nsHtml5TokenizerALU.cpp",
    108         "nsHtml5TokenizerSIMD.cpp",
    109     ]
    110 elif (
    111     CONFIG["TARGET_CPU"] == "aarch64" and CONFIG["TARGET_ENDIANNESS"] == "little"
    112 ) and (CONFIG["CC_TYPE"] != "gcc" or int(CONFIG["CC_VERSION"].split(".")[0]) >= 12):
    113     # aarch64 doesn't need special flags for SIMD.
    114     UNIFIED_SOURCES += [
    115         "nsHtml5TokenizerALUStubs.cpp",
    116         "nsHtml5TokenizerSIMD.cpp",
    117     ]
    118 else:
    119     UNIFIED_SOURCES += [
    120         "nsHtml5TokenizerALU.cpp",
    121         "nsHtml5TokenizerSIMDStubs.cpp",
    122     ]
    123 
    124 FINAL_LIBRARY = "xul"
    125 
    126 LOCAL_INCLUDES += [
    127     "/dom/base",
    128 ]