Bug 1755956 - Really fix rusttests on windows, by using utf-8 to read Cargo.toml in RunCbindgen.py so it doesn't choke on my name.

(And revert the previous commit).

MANUAL PUSH: Silly windows-only encoding fix CLOSED TREE
This commit is contained in:
Emilio Cobos Álvarez 2022-02-18 16:23:55 +01:00
parent fa92589bc2
commit c9f9939aa6
2 changed files with 2 additions and 2 deletions

View File

@ -14,7 +14,7 @@ import pytoml
# Try to read the package name or otherwise assume same name as the crate path.
def _get_crate_name(crate_path):
try:
with open(mozpath.join(crate_path, "Cargo.toml")) as f:
with open(mozpath.join(crate_path, "Cargo.toml"), encoding='utf-8') as f:
return pytoml.load(f)["package"]["name"]
except Exception:
return mozpath.basename(crate_path)

View File

@ -14,7 +14,7 @@ if CONFIG["COMPILE_ENVIRONMENT"]:
CbindgenHeader(
"origin_trials_ffi_generated.h",
inputs=["/dom/origin-trials/ffi"],
inputs=["ffi"],
)
EXPORTS.mozilla += [