зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1868980 - Avoid base include flags spreading to the cc crate. r=firefox-build-system-reviewers,ahochheiden
The cc crate was upgraded in bug 1866934, and one of the changes it
contains is to notify cargo to trigger rebuilds when environment
variables change[1].
As we invoke cargo from different directories, and as we pass the
computed compiler flags through CFLAGS_* variables in rust.mk, and
as those computed compiler flags contain -I flags for includes in
the current directory, each cargo invocation ends up with different
values of the CFLAGS_* variable, which, while it doesn't have a
consequence on the build itself, does now trigger a rebuild of crates
using cc, causing longer build times when building gtest.
Those -I flags, however, are not necessary for Rust, so we eliminate
them, working around the problem. The solution is fragile, but is the
simplest we can do short of doing much more intrusive changes.
1. 962af5387b
Differential Revision: https://phabricator.services.mozilla.com/D196138
This commit is contained in:
Родитель
7900dfd208
Коммит
fa98d8f6d9
|
@ -37,3 +37,6 @@ elif CONFIG["OS_ARCH"] == "WINNT":
|
|||
"userenv",
|
||||
"ws2_32",
|
||||
]
|
||||
|
||||
COMPILE_FLAGS["BASE_INCLUDES"] = []
|
||||
HOST_COMPILE_FLAGS["BASE_INCLUDES"] = []
|
||||
|
|
|
@ -25,3 +25,6 @@ SPHINX_TREES["/testing/geckodriver"] = "doc"
|
|||
|
||||
with Files("doc/**"):
|
||||
SCHEDULES.exclusive = ["docs"]
|
||||
|
||||
COMPILE_FLAGS["BASE_INCLUDES"] = []
|
||||
HOST_COMPILE_FLAGS["BASE_INCLUDES"] = []
|
||||
|
|
|
@ -14,3 +14,6 @@ RustLibrary(
|
|||
gkrust_features,
|
||||
output_category=None if CONFIG["LINK_GTEST_DURING_COMPILE"] else "gtest",
|
||||
)
|
||||
|
||||
COMPILE_FLAGS["BASE_INCLUDES"] = []
|
||||
HOST_COMPILE_FLAGS["BASE_INCLUDES"] = []
|
||||
|
|
|
@ -56,3 +56,6 @@ if CONFIG["MOZ_BITS_DOWNLOAD"]:
|
|||
EXPORTS += [
|
||||
"/third_party/rust/rure/include/rure.h",
|
||||
]
|
||||
|
||||
COMPILE_FLAGS["BASE_INCLUDES"] = []
|
||||
HOST_COMPILE_FLAGS["BASE_INCLUDES"] = []
|
||||
|
|
Загрузка…
Ссылка в новой задаче