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["MOZ_WIDGET_TOOLKIT"] != "android" and CONFIG["LLVM_SYMBOLIZER"]:
56 FINAL_TARGET_FILES += ["/" + CONFIG["LLVM_SYMBOLIZER"]]
58 if CONFIG["MOZ_APP_BASENAME"]:
60 "TOPOBJDIR": TOPOBJDIR,
70 "MOZ_APP_REMOTINGNAME",
71 "MOZ_CRASHREPORTER_URL",
73 appini_defines[var] = CONFIG[var]
75 if CONFIG["MOZ_APP_DISPLAYNAME"] != CONFIG["MOZ_APP_BASENAME"]:
76 appini_defines["MOZ_APP_DISPLAYNAME"] = CONFIG["MOZ_APP_DISPLAYNAME"]
78 if CONFIG["MOZ_BUILD_APP"] == "browser":
79 appini_defines["MOZ_BUILD_APP_IS_BROWSER"] = True
81 if CONFIG["MOZ_APP_PROFILE"]:
82 appini_defines["MOZ_APP_PROFILE"] = CONFIG["MOZ_APP_PROFILE"]
84 for var in ("MOZ_CRASHREPORTER", "MOZ_PROFILE_MIGRATOR", "MOZ_UPDATER"):
86 appini_defines[var] = True
88 appini_defines["MOZ_APPUPDATE_HOST"] = "aus5.mozilla.org"
89 if CONFIG["MOZ_APPUPDATE_HOST"]:
90 appini_defines["MOZ_APPUPDATE_HOST"] = CONFIG["MOZ_APPUPDATE_HOST"]
94 script="../python/mozbuild/mozbuild/action/preprocessor.py",
95 entry_point="generate",
96 inputs=["application.ini.in"],
98 "-D%s=%s" % (k, "1" if v is True else v)
99 for k, v in sorted(appini_defines.items(), key=lambda t: t[0])
103 FINAL_TARGET_FILES += ["!application.ini"]
104 if CONFIG["MOZ_WIDGET_TOOLKIT"] != "android" and CONFIG["MOZ_UPDATER"]:
105 FINAL_TARGET_PP_FILES += ["update-settings.ini"]
108 "application.ini.h", script="appini_header.py", inputs=["!application.ini"]
112 # Put a .lldbinit in the bin directory and the objdir, to be picked up
113 # automatically by LLDB when we debug executables using either of those two
114 # directories as the current working directory. The .lldbinit file will
115 # load $(topsrcdir)/.lldbinit, which is where the actual debugging commands are.
116 DEFINES["topsrcdir"] = TOPSRCDIR
117 DEFINES["topobjdir"] = TOPOBJDIR
118 FINAL_TARGET_PP_FILES += [".lldbinit.in"]
119 OBJDIR_FILES += ["!/dist/bin/.lldbinit"]
121 # Put the .ycm_extra_conf.py file at the root of the objdir. It is used by
122 # the vim plugin YouCompleteMe.
123 OBJDIR_FILES += ["/.ycm_extra_conf.py"]
125 if CONFIG["MOZ_VALGRIND"]:
126 OBJDIR_FILES._valgrind += [
127 "valgrind/cross-architecture.sup",
128 "valgrind/i386-pc-linux-gnu.sup",
129 "valgrind/x86_64-pc-linux-gnu.sup",