tor-browser

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

moz.build (3572B)


      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 FINAL_LIBRARY = "mozglue"
      8 
      9 EXPORTS.mozilla += [
     10     "AutoProfilerLabel.h",
     11     "AwakeTimeStamp.h",
     12     "decimal/Decimal.h",
     13     "decimal/DoubleConversion.h",
     14     "IntegerPrintfMacros.h",
     15     "LoggingCore.h",
     16     "MmapFaultHandler.h",
     17     "Now.h",
     18     "PlatformConditionVariable.h",
     19     "PlatformMutex.h",
     20     "PlatformRWLock.h",
     21     "Printf.h",
     22     "SIMD.h",
     23     "Sprintf.h",
     24     "SSE.h",
     25     "StackWalk.h",
     26     "TimeStamp.h",
     27     "Uptime.h",
     28 ]
     29 
     30 EXPORTS.mozilla.glue += [
     31     "Debug.h",
     32     "WinUtils.h",
     33 ]
     34 
     35 if CONFIG["OS_ARCH"] == "WINNT":
     36     EXPORTS.mozilla += [
     37         "GetKnownFolderPath.h",
     38         "PreXULSkeletonUI.h",
     39         "StackWalk_windows.h",
     40         "StackWalkThread.h",
     41         "WindowsDpiAwareness.h",
     42     ]
     43 
     44 SOURCES += [
     45     "AutoProfilerLabel.cpp",
     46     "AwakeTimeStamp.cpp",
     47     "Debug.cpp",
     48     "LoggingCore.cpp",
     49     "MmapFaultHandler.cpp",
     50     "Printf.cpp",
     51     "SIMD.cpp",
     52     "StackWalk.cpp",
     53 ]
     54 
     55 if CONFIG["TARGET_CPU"].startswith("x86"):
     56     SOURCES += [
     57         "SIMD_avx2.cpp",
     58         "SSE.cpp",
     59     ]
     60     SOURCES["SIMD_avx2.cpp"].flags += ["-mavx2"]
     61 
     62 if not CONFIG["JS_STANDALONE"]:
     63     EXPORTS.mozilla += [
     64         "ProcessType.h",
     65         "RuntimeExceptionModule.h",
     66     ]
     67 
     68     SOURCES += [
     69         "ProcessType.cpp",
     70         "RuntimeExceptionModule.cpp",
     71     ]
     72 
     73 OS_LIBS += CONFIG["REALTIME_LIBS"]
     74 
     75 if CONFIG["OS_ARCH"] == "WINNT":
     76     EXPORTS.mozilla += [
     77         "DynamicallyLinkedFunctionPtr.h",
     78         "ImportDir.h",
     79         "NativeNt.h",
     80         "WindowsDiagnostics.h",
     81         "WindowsDpiInitialization.h",
     82         "WindowsEnumProcessModules.h",
     83         "WindowsMapRemoteView.h",
     84         "WindowsProcessMitigations.h",
     85         "WindowsStackCookie.h",
     86         "WindowsUnwindInfo.h",
     87     ]
     88     EXPORTS.mozilla.glue += [
     89         "WindowsUnicode.h",
     90     ]
     91     SOURCES += [
     92         "GetKnownFolderPath.cpp",
     93         "WindowsDiagnostics.cpp",
     94         "WindowsDllMain.cpp",
     95         "WindowsDpiInitialization.cpp",
     96         "WindowsMapRemoteView.cpp",
     97         "WindowsProcessMitigations.cpp",
     98         "WindowsUnicode.cpp",
     99     ]
    100 
    101     OS_LIBS += ["dbghelp", "oleaut32", "ole32", "mincore"]
    102 
    103     if not CONFIG["JS_STANDALONE"]:
    104         SOURCES += [
    105             "/ipc/mscom/COMWrappers.cpp",
    106             "/ipc/mscom/ProcessRuntime.cpp",
    107             "PreXULSkeletonUI.cpp",
    108         ]
    109 
    110 if CONFIG["OS_ARCH"] == "WINNT":
    111     SOURCES += [
    112         "ConditionVariable_windows.cpp",
    113         "Mutex_windows.cpp",
    114         "RWLock_windows.cpp",
    115     ]
    116 # WASI hasn't supported cond vars and mutexes yet so noop implementation is used.
    117 elif CONFIG["OS_ARCH"] == "WASI":
    118     SOURCES += [
    119         "ConditionVariable_noop.cpp",
    120         "Mutex_noop.cpp",
    121     ]
    122 else:
    123     SOURCES += [
    124         "ConditionVariable_posix.cpp",
    125         "Mutex_posix.cpp",
    126         "RWLock_posix.cpp",
    127     ]
    128 
    129 if CONFIG["MOZ_LINKER"] and CONFIG["MOZ_WIDGET_TOOLKIT"] == "android":
    130     LOCAL_INCLUDES += [
    131         "/mozglue/linker",
    132     ]
    133 
    134 SOURCES += [
    135     "decimal/Decimal.cpp",
    136 ]
    137 
    138 if CONFIG["CC_TYPE"] in ("clang", "clang-cl"):
    139     # Suppress warnings from third-party V8 Decimal code.
    140     SOURCES["decimal/Decimal.cpp"].flags += ["-Wno-implicit-fallthrough"]
    141 
    142 for var in ("MOZ_APP_BASENAME", "MOZ_APP_VENDOR"):
    143     DEFINES[var] = '"%s"' % CONFIG[var]
    144 
    145 include("/mozglue/misc/timestamp.mozbuild")