Commit c1963988 authored by Dzmitry Malyshau's avatar Dzmitry Malyshau
Browse files

Bug 1726628 - Switch cargo resolver to 2 r=glandium

parent 6c538e2f
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -43,6 +43,9 @@ exclude = [
  "tools/fuzzing/rust",
]

# Use the new dependency resolver to reduce some of the platform-specific dependencies.
resolver = "2"

# Explicitly specify what our profiles use.  The opt-level setting here is
# a total fiction; see the setup of MOZ_RUST_DEFAULT_FLAGS for what the
# opt-level setting will be as a result of various other configure flags.
+1 −1
Original line number Diff line number Diff line
@@ -444,7 +444,7 @@ rust_test_flag := --no-fail-fast
force-cargo-test-run:
	$(call RUN_CARGO,test $(cargo_target_flag) $(rust_test_flag) $(rust_test_options) $(rust_test_features_flag))

endif
endif # RUST_TESTS

ifdef HOST_RUST_LIBRARY_FILE

+1 −1
Original line number Diff line number Diff line
@@ -83,7 +83,7 @@ gecko-profiler = { path = "../../../tools/profiler/rust-api" }

[build-dependencies]
lazy_static = "1"
log = "0.4"
log = { version = "0.4", features = ["std"] }
bindgen = {version = "0.56", optional = true, default-features = false}
regex = {version = "1.0", optional = true, default-features = false, features = ["perf", "std"]}
walkdir = "2.1.4"
+1 −1
Original line number Diff line number Diff line
@@ -8,7 +8,7 @@ edition = "2018"
libc = "0.2.0"
mozilla-central-workspace-hack = { path = "../../../build/workspace-hack" }
rust-ini = "0.10"
serde = "1.0"
serde = { version = "1.0", features = ["derive"] }
serde_json = { version = "1.0" }
uuid = { version = "0.8.1", features = ["v4"] }
winapi = "0.3"
+10 −7
Original line number Diff line number Diff line
@@ -8,6 +8,13 @@ include("gkrust-features.mozbuild")

RustLibrary("gkrust", gkrust_features, is_gkrust=True)

for feature in gkrust_features:
    # We don't want to enable refcount logging during rusttests, since the
    # relevant FFI symbols wouldn't be found.
    # Nor do we want Glean to assume there are Gecko symbols.
    if feature not in ("gecko_refcount_logging", "glean_with_gecko"):
        RUST_TEST_FEATURES.append(feature)

# Target directory doesn't matter a lot here, since we can't share panic=abort
# compilation artifacts with gkrust.
RUST_TESTS = [
@@ -15,6 +22,9 @@ RUST_TESTS = [
    "servo_arc",
    "stylo_tests",
    "qcms",
    # this does nothing, but is needed so that `gkrust_features` are recognized
    # also see: https://github.com/rust-lang/cargo/issues/9856
    "gkrust",
]

if not CONFIG["MOZ_CODE_COVERAGE"]:
@@ -22,13 +32,6 @@ if not CONFIG["MOZ_CODE_COVERAGE"]:
    # and those builds are compiled with '-Cpanic=abort -Zpanic_abort_tests'
    RUST_TESTS += ["fog"]

for feature in gkrust_features:
    # We don't want to enable refcount logging during rusttests, since the
    # relevant FFI symbols wouldn't be found.
    # Nor do we want Glean to assume there are Gecko symbols.
    if feature not in ("gecko_refcount_logging", "glean_with_gecko"):
        RUST_TEST_FEATURES.append(feature)

if CONFIG["CPU_ARCH"] != "x86":
    # malloc_size_of_derive is a build dependency, so if we are doing
    # cross-compile for x86, this may not run correctly.