tor-browser

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

moz.build (2520B)


      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 if CONFIG["MOZ_WIDGET_TOOLKIT"] == "android":
      8     Program(CONFIG["MOZ_CHILD_PROCESS_NAME"])
      9     SOURCES += [
     10         "MozillaRuntimeMainAndroid.cpp",
     11     ]
     12 else:
     13     GeckoProgram(CONFIG["MOZ_CHILD_PROCESS_NAME"], linkage="dependent")
     14 
     15     SOURCES += [
     16         "MozillaRuntimeMain.cpp",
     17     ]
     18 
     19 include("/ipc/chromium/chromium-config.mozbuild")
     20 
     21 LOCAL_INCLUDES += [
     22     "/toolkit/xre",
     23     "/xpcom/base",
     24 ]
     25 
     26 # DELAYLOAD_DLLS in this block ensures that the DLL blocklist is functional
     27 if CONFIG["OS_ARCH"] == "WINNT":
     28     DELAYLOAD_DLLS += [
     29         "nss3.dll",
     30     ]
     31 
     32     if CONFIG["MOZ_SANDBOX"]:
     33         # For sandbox includes and the include dependencies those have
     34         LOCAL_INCLUDES += [
     35             "/security/sandbox/chromium",
     36             "/security/sandbox/chromium-shim",
     37         ]
     38 
     39         OS_LIBS += [
     40             "advapi32",
     41             "user32",
     42             "version",
     43             "winmm",
     44         ]
     45 
     46         USE_LIBS += [
     47             "sandbox_s",
     48         ]
     49 
     50         DELAYLOAD_DLLS += [
     51             "winmm.dll",
     52             "user32.dll",
     53             "userenv.dll",
     54         ]
     55 
     56     OS_LIBS += [
     57         "ntdll",
     58     ]
     59 
     60     DELAYLOAD_DLLS += [
     61         "xul.dll",
     62     ]
     63 
     64     # Don't build plugin-container.exe with CETCOMPAT for the moment, so that
     65     # we can enable it using a pref during testing.
     66     LINK_FLAGS["CETCOMPAT"] = []
     67 
     68 if CONFIG["OS_ARCH"] == "Darwin":
     69     LDFLAGS += ["-Wl,-rpath,@executable_path/../../../"]
     70 
     71 if CONFIG["CC_TYPE"] == "clang-cl":
     72     # Always enter a Windows program through wmain, whether or not we're
     73     # a console application.
     74     WIN32_EXE_LDFLAGS += ["-ENTRY:wmainCRTStartup"]
     75 
     76 # Control the default heap size.
     77 # This is the heap returned by GetProcessHeap().
     78 # As we use the CRT heap, the default size is too large and wastes VM.
     79 #
     80 # The default heap size is 1MB on Win32.
     81 # The heap will grow if need be.
     82 #
     83 # Set it to 256k.  See bug 127069.
     84 if CONFIG["OS_ARCH"] == "WINNT" and CONFIG["CC_TYPE"] not in ("clang", "gcc"):
     85     LDFLAGS += ["/HEAP:0x40000"]
     86 
     87 if CONFIG["CC_TYPE"] in ("clang", "gcc"):
     88     CXXFLAGS += ["-Wshadow"]
     89 
     90 if CONFIG["MOZ_DEBUG"]:
     91     WINCONSOLE = True
     92 else:
     93     WINCONSOLE = False
     94 
     95 
     96 with Files("**"):
     97     BUG_COMPONENT = ("Core", "DOM: Content Processes")