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 Build System", "General")
10 # This cannot be named "build" because of bug 922191.
11 SPHINX_TREES["buildsystem"] = "docs"
13 with Files("docs/**"):
14 SCHEDULES.exclusive = ["docs"]
16 if CONFIG["OS_ARCH"] == "WINNT":
21 CRAMTEST_MANIFESTS += [
22 "tests/cram/cram.ini",
25 DEFINES["ACCEPTED_MAR_CHANNEL_IDS"] = CONFIG["ACCEPTED_MAR_CHANNEL_IDS"]
27 if CONFIG["MOZ_BUILD_APP"] == "browser":
28 PYTHON_UNITTEST_MANIFESTS += [
29 "compare-mozconfig/python.ini",
32 if CONFIG["ENABLE_TESTS"] or CONFIG["MOZ_DMD"]:
33 FINAL_TARGET_FILES += ["/tools/rb/fix_stacks.py"]
36 FINAL_TARGET_FILES += ["/memory/replace/dmd/dmd.py"]
38 # Put a useful .gdbinit and .gdbinit.py in $objdir/build, to be picked up
39 # automatically by GDB via either libxul.so-gdb.py or js-gdb.py.
40 OBJDIR_PP_FILES.build += [".gdbinit.py.in"]
41 OBJDIR_FILES.build += [".gdbinit.loader"]
42 OBJDIR_FILES.build += [".gdbinit"]
44 # Install the clang-cl runtime library for ASAN next to the binaries we produce.
45 if CONFIG["MOZ_ASAN"] and CONFIG["CC_TYPE"] == "clang-cl":
46 FINAL_TARGET_FILES += ["%" + CONFIG["MOZ_CLANG_RT_ASAN_LIB_PATH"]]
47 FINAL_TARGET_FILES += [
48 "%" + CONFIG["MOZ_CLANG_RT_ASAN_LIB_PATH"].replace(".dll", ".pdb")
51 # Install the clang runtime library for ASAN next to the binaries we produce.
52 if CONFIG["MOZ_WIDGET_TOOLKIT"] == "android" and CONFIG["MOZ_ASAN"]:
53 FINAL_TARGET_FILES += ["%" + CONFIG["MOZ_CLANG_RT_ASAN_LIB_PATH"]]
55 if CONFIG["LLVM_SYMBOLIZER"]:
56 FINAL_TARGET_FILES += ["/" + CONFIG["LLVM_SYMBOLIZER"]]
58 if CONFIG["MOZ_APP_BASENAME"]:
60 "TOPOBJDIR": TOPOBJDIR,
70 "MOZ_APP_REMOTINGNAME",
72 appini_defines[var] = CONFIG[var]
74 if CONFIG["MOZ_APP_DISPLAYNAME"] != CONFIG["MOZ_APP_BASENAME"]:
75 appini_defines["MOZ_APP_DISPLAYNAME"] = CONFIG["MOZ_APP_DISPLAYNAME"]
77 if CONFIG["MOZ_BUILD_APP"] == "browser":
78 appini_defines["MOZ_BUILD_APP_IS_BROWSER"] = True
80 if CONFIG["MOZ_APP_PROFILE"]:
81 appini_defines["MOZ_APP_PROFILE"] = CONFIG["MOZ_APP_PROFILE"]
83 for var in ("MOZ_CRASHREPORTER", "MOZ_PROFILE_MIGRATOR", "MOZ_UPDATER"):
85 appini_defines[var] = True
87 appini_defines["MOZ_APPUPDATE_HOST"] = "aus5.mozilla.org"
88 if CONFIG["MOZ_APPUPDATE_HOST"]:
89 appini_defines["MOZ_APPUPDATE_HOST"] = CONFIG["MOZ_APPUPDATE_HOST"]
93 script="../python/mozbuild/mozbuild/action/preprocessor.py",
94 entry_point="generate",
95 inputs=["application.ini.in"],
97 "-D%s=%s" % (k, "1" if v is True else v)
98 for k, v in sorted(appini_defines.items(), key=lambda t: t[0])
102 FINAL_TARGET_FILES += ["!application.ini"]
103 if CONFIG["MOZ_WIDGET_TOOLKIT"] != "android" and CONFIG["MOZ_UPDATER"]:
104 FINAL_TARGET_PP_FILES += ["update-settings.ini"]
107 "application.ini.h", script="appini_header.py", inputs=["!application.ini"]
111 # Put a .lldbinit in the bin directory and the objdir, to be picked up
112 # automatically by LLDB when we debug executables using either of those two
113 # directories as the current working directory. The .lldbinit file will
114 # load $(topsrcdir)/.lldbinit, which is where the actual debugging commands are.
115 DEFINES["topsrcdir"] = TOPSRCDIR
116 DEFINES["topobjdir"] = TOPOBJDIR
117 FINAL_TARGET_PP_FILES += [".lldbinit.in"]
118 OBJDIR_FILES += ["!/dist/bin/.lldbinit"]
120 # Put the .ycm_extra_conf.py file at the root of the objdir. It is used by
121 # the vim plugin YouCompleteMe.
122 OBJDIR_FILES += ["/.ycm_extra_conf.py"]
124 if CONFIG["MOZ_VALGRIND"]:
125 OBJDIR_FILES._valgrind += [
126 "valgrind/cross-architecture.sup",
127 "valgrind/i386-pc-linux-gnu.sup",
128 "valgrind/x86_64-pc-linux-gnu.sup",