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/.
8 BUG_COMPONENT = ("Firefox", "General")
10 with Files("firefox.exe.manifest"):
11 BUG_COMPONENT = ("Core", "Widget: Win32")
12 with Files("module.ver"):
13 BUG_COMPONENT = ("Core", "Widget: Win32")
14 with Files("splash.rc"):
15 BUG_COMPONENT = ("Core", "Widget: Win32")
17 with Files("macversion.py"):
18 BUG_COMPONENT = ("Core", "Widget: Cocoa")
19 with Files("macbuild/**"):
20 BUG_COMPONENT = ("Core", "Widget: Cocoa")
22 with Files("moz.build"):
23 BUG_COMPONENT = ("Firefox Build System", "General")
24 with Files("Makefile.in"):
25 BUG_COMPONENT = ("Firefox Build System", "General")
27 with Files("profile/channel-prefs.js"):
28 BUG_COMPONENT = ("Firefox", "Installer")
29 with Files("profile/firefox.js"):
30 BUG_COMPONENT = ("Firefox", "General")
32 if CONFIG["MOZ_MACBUNDLE_NAME"]:
33 DIRS += ["macbuild/Contents"]
35 if CONFIG["MOZ_NO_PIE_COMPAT"]:
36 GeckoProgram(CONFIG["MOZ_APP_NAME"] + "-bin")
40 GeckoProgram(CONFIG["MOZ_APP_NAME"])
46 # Neither channel-prefs.js nor firefox.exe want to end up in dist/bin/browser.
56 if CONFIG["LIBFUZZER"]:
57 USE_LIBS += ["fuzzer"]
59 "/tools/fuzzing/libfuzzer",
62 if CONFIG["MOZ_GECKODRIVER"]:
63 DEFINES["MOZ_GECKODRIVER"] = True
65 if CONFIG["CC_TYPE"] == "clang-cl":
66 # Always enter a Windows program through wmain, whether or not we're
67 # a console application.
68 WIN32_EXE_LDFLAGS += ["-ENTRY:wmainCRTStartup"]
70 if CONFIG["OS_ARCH"] == "WINNT":
71 RCINCLUDE = "splash.rc"
79 "/browser/app/winlauncher",
88 if CONFIG["CC_TYPE"] == "clang-cl":
89 libpath_flag = "-LIBPATH:"
93 WIN32_EXE_LDFLAGS += [
94 libpath_flag + OBJDIR + "/winlauncher/freestanding",
97 # Don't build firefox.exe with CETCOMPAT, because we need to be able to
98 # only enable it for processes that are not using JIT in xul.dll.
99 LINK_FLAGS["CETCOMPAT"] = []
101 if CONFIG["MOZ_SANDBOX"] and CONFIG["OS_ARCH"] == "Darwin":
106 if CONFIG["MOZ_SANDBOX"] and CONFIG["OS_ARCH"] == "WINNT":
107 # For sandbox includes and the include dependencies those have
109 "/security/sandbox/chromium",
110 "/security/sandbox/chromium-shim",
122 # Control the default heap size.
123 # This is the heap returned by GetProcessHeap().
124 # As we use the CRT heap, the default size is too large and wastes VM.
126 # The default heap size is 1MB on Win32.
127 # The heap will grow if need be.
129 # Set it to 256k. See bug 127069.
130 if CONFIG["OS_ARCH"] == "WINNT" and CONFIG["CC_TYPE"] not in ("clang", "gcc"):
131 LDFLAGS += ["/HEAP:0x40000"]
135 if CONFIG["HAVE_CLOCK_MONOTONIC"]:
136 OS_LIBS += CONFIG["REALTIME_LIBS"]
138 if CONFIG["MOZ_LINUX_32_SSE2_STARTUP_ERROR"]:
139 DEFINES["MOZ_LINUX_32_SSE2_STARTUP_ERROR"] = True
140 COMPILE_FLAGS["OS_CXXFLAGS"] = [
142 for f in COMPILE_FLAGS.get("OS_CXXFLAGS", [])
143 if not f.startswith("-march=") and f not in ("-msse", "-msse2", "-mfpmath=sse")
150 for icon in ("firefox", "document", "newwindow", "newtab", "pbmode"):
151 DEFINES[icon.upper() + "_ICO"] = '"%s/%s/%s.ico"' % (
153 CONFIG["MOZ_BRANDING_DIRECTORY"],