-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
As part of doing this, we blacklist the max_align_t type. This was causing a generated test failure. See: rust-lang/rust-bindgen#550
- Loading branch information
1 parent
a22ce17
commit 59a97b6
Showing
3 changed files
with
49 additions
and
57 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#! /usr/bin/env python3 | ||
|
||
# This script generates sys.rs, which is checked in. | ||
|
||
from pathlib import Path | ||
from subprocess import run | ||
|
||
root = Path(__file__).parent / ".." | ||
ref_header = root / "BLAKE2/ref/blake2.h" | ||
sse_header = root / "BLAKE2/sse/blake2.h" | ||
|
||
# Make sure that the two headers are identical, since we're using the same | ||
# generated file in both modes. | ||
assert ref_header.open().read() == sse_header.open().read() | ||
|
||
command = ["bindgen", str(ref_header)] | ||
command += ["--constified-enum-module", "blake2b_constant"] | ||
command += ["--constified-enum-module", "blake2s_constant"] | ||
# If we don't blacklist this symbol we get a test failure: | ||
# https://github.com/rust-lang-nursery/rust-bindgen/issues/550. | ||
command += ["--blacklist-type", "max_align_t"] | ||
with (root / "src/sys.rs").open("w") as output: | ||
run(command, stdout=output, check=True) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters