Skip to content

Commit

Permalink
Merge pull request #2694 from dennisschagt/compile-ffi-with-c++14
Browse files Browse the repository at this point in the history
Compile CXX FFI with C++14
  • Loading branch information
dennisschagt committed Mar 9, 2024
2 parents bf5743c + cb4946f commit 8784c2e
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 9 deletions.
16 changes: 8 additions & 8 deletions Cargo.lock

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

1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ DEFINES=-DLOCALEDIR='"$(localedir)"'

WARNFLAGS=-Werror -Wall -Wextra -Wunreachable-code
INCLUDES=-Iinclude -Istfl -Ifilter -I. -Irss -I$(CARGO_TARGET_DIR)/cxxbridge/
# Keep in sync with c++ version specified in FFI build.rs
BARE_CXXFLAGS=-std=c++14 -O2 -ggdb $(INCLUDES)
LDFLAGS+=-L.

Expand Down
3 changes: 2 additions & 1 deletion rust/libnewsboat-ffi/build.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
fn add_cxxbridge(module: &str) {
cxx_build::bridge(format!("src/{module}.rs"))
.flag("-std=c++11")
// Keep in sync with c++ version specified in Makefile
.std("c++14")
// Disable warnings in generated code, since we can't affect them directly. We have to do
// this because these warnings are turned into errors when we pass `-D warnings` to Cargo
// on CI.
Expand Down

0 comments on commit 8784c2e

Please sign in to comment.