Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compile CXX FFI with C++14 #2694

Merged
merged 1 commit into from
Mar 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I completely forgot that we specify the version here! Please add cross-comments here and in Makefile so we don't forget the next time we bump the flag.

Copy link
Member Author

@dennisschagt dennisschagt Mar 9, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good idea, done

// 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
Loading