-
Notifications
You must be signed in to change notification settings - Fork 198
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build-sys: Switch to committing cxx.rs generated code
Closes: #3252 This avoids creating a magical, manual error prone step in the release process, at the cost of dealing with generated code in git.
- Loading branch information
Showing
15 changed files
with
9,822 additions
and
36 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
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,2 @@ | ||
rpmostree-cxxrs.{h,cxx} linguist-generated=true | ||
rust/cxx.h linguist-generated=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
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
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,7 @@ | ||
#!/usr/bin/bash | ||
# We use https://cxx.rs to generate C++ and Rust bridge code. If you change | ||
# rust/src/lib.rs, you will need to install the tool. | ||
set -xeuo pipefail | ||
CXX_VER=$(cargo metadata --format-version 1 | jq -r '.packages[]|select(.name == "cxx").version') | ||
mkdir -p target | ||
time cargo install --root=target/cxxbridge cxxbridge-cmd --version "${CXX_VER}" |
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,13 @@ | ||
#!/usr/bin/bash | ||
# Install developer build dependencies | ||
|
||
# This installs tools used by local development only. | ||
|
||
set -xeuo pipefail | ||
|
||
# cxx.rs (cxxbridge) isn't packaged in Fedora today. It generates | ||
# source code, which we vendor along with our dependent crates into release | ||
# tarballs. | ||
CXX_VER=$(cargo metadata --format-version 1 | jq -r '.packages[]|select(.name == "cxx").version') | ||
mkdir -p target | ||
time cargo install --root=target/cxxbridge cxxbridge-cmd --version "${CXX_VER}" |
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,11 @@ | ||
#!/usr/bin/bash | ||
# Verify that the cxx-generated C++ code is in sync | ||
set -xeuo pipefail | ||
dn=$(dirname $0) | ||
$dn/install-cxx.sh | ||
make -f Makefile.bindings bindings | ||
if ! git diff; then | ||
echo "Found diff in cxx-generated code; please run: make -f Makefile.bindings bindings" 1>&2 | ||
exit 1 | ||
fi | ||
echo "ok: cxx generated code matches" |
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
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
Oops, something went wrong.