tor-browser

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

moz.build (2060B)


      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 GeckoProgram("xpcshell", linkage="dependent")
      8 
      9 SOURCES += [
     10     "xpcshell.cpp",
     11 ]
     12 
     13 if CONFIG["FUZZING_INTERFACES"]:
     14     if CONFIG["LIBFUZZER"]:
     15         USE_LIBS += ["fuzzer"]
     16     else:
     17         USE_LIBS += ["fuzzer-interface"]
     18 
     19 if CONFIG["MOZ_WIDGET_TOOLKIT"] == "cocoa":
     20     SOURCES += [
     21         "xpcshellMacUtils.mm",
     22     ]
     23 
     24 include("/ipc/chromium/chromium-config.mozbuild")
     25 
     26 LOCAL_INCLUDES += [
     27     "/toolkit/xre",
     28 ]
     29 
     30 if CONFIG["CC_TYPE"] == "clang-cl":
     31     # Always enter a Windows program through wmain, whether or not we're
     32     # a console application.
     33     WIN32_EXE_LDFLAGS += ["-ENTRY:wmainCRTStartup"]
     34 
     35 # DELAYLOAD_DLLS in this block ensure that the DLL blocklist initializes
     36 if CONFIG["OS_ARCH"] == "WINNT":
     37     if CONFIG["MOZ_SANDBOX"]:
     38         # For sandbox includes and the include dependencies those have
     39         LOCAL_INCLUDES += [
     40             "/security/sandbox/chromium",
     41             "/security/sandbox/chromium-shim",
     42         ]
     43 
     44         OS_LIBS += [
     45             "advapi32",
     46             "user32",
     47             "version",
     48             "winmm",
     49         ]
     50 
     51         USE_LIBS += [
     52             "sandbox_s",
     53         ]
     54 
     55         DELAYLOAD_DLLS += [
     56             "winmm.dll",
     57             "user32.dll",
     58             "userenv.dll",
     59         ]
     60 
     61     OS_LIBS += [
     62         "ntdll",
     63     ]
     64 
     65     DELAYLOAD_DLLS += [
     66         "xul.dll",
     67     ]
     68 
     69     # Don't build xpcshell.exe with CETCOMPAT, because we need to be able to
     70     # only enable it for processes that are not using JIT in xul.dll.
     71     LINK_FLAGS["CETCOMPAT"] = []
     72 
     73 if CONFIG["OS_TARGET"] == "Darwin":
     74     OS_LIBS += [
     75         "-framework Foundation",
     76     ]
     77 
     78 if CONFIG["MOZ_WIDGET_TOOLKIT"] == "gtk":
     79     CFLAGS += CONFIG["MOZ_GTK3_CFLAGS"]
     80     CXXFLAGS += CONFIG["MOZ_GTK3_CFLAGS"]
     81     OS_LIBS += CONFIG["MOZ_GTK3_LIBS"]