Skip to content

Commit

Permalink
Fix rust-invoked build of c/cpp sources under FreeBSD
Browse files Browse the repository at this point in the history
Due to an upstream issue with cc-rs [0], the rust-generated C++ interface would
fail to compile. A PR has been opened to patch the issue upstream [1], but in
the meantime `Cargo.toml` has been patched to use a fork of cc-rs with the
relevant fixes.

[0]: rust-lang/cc-rs#463
[1]: rust-lang/cc-rs#785
  • Loading branch information
mqudsi committed Feb 2, 2023
1 parent 88ebaeb commit 4460d75
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 21 deletions.
41 changes: 20 additions & 21 deletions fish-rust/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions fish-rust/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,19 @@ default = ["fish-ffi-tests"]
fish-ffi-tests = ["inventory"]

[patch.crates-io]
cc = { git = "https://github.com/mqudsi/cc-rs", branch = "fish" }
cxx = { git = "https://github.com/ridiculousfish/cxx", branch = "fish" }
cxx-gen = { git = "https://github.com/ridiculousfish/cxx", branch = "fish" }
autocxx = { git = "https://github.com/ridiculousfish/autocxx", branch = "fish" }
autocxx-build = { git = "https://github.com/ridiculousfish/autocxx", branch = "fish" }
autocxx-bindgen = { git = "https://github.com/ridiculousfish/autocxx-bindgen", branch = "fish" }

[patch.'https://github.com/ridiculousfish/cxx']
cc = { git = "https://github.com/mqudsi/cc-rs", branch = "fish" }

[patch.'https://github.com/ridiculousfish/autocxx']
cc = { git = "https://github.com/mqudsi/cc-rs", branch = "fish" }

#cxx = { path = "../../cxx" }
#cxx-gen = { path="../../cxx/gen/lib" }
#autocxx = { path = "../../autocxx" }
Expand Down

0 comments on commit 4460d75

Please sign in to comment.