aboutsummaryrefslogtreecommitdiff
path: root/flags
diff options
context:
space:
mode:
authorMatthew Maurer <mmaurer@google.com>2024-03-19 17:53:21 +0000
committerMatthew Maurer <mmaurer@google.com>2024-03-19 18:22:13 +0000
commit15cbbff88df7a8191d88c7aebefc7b508bd4de69 (patch)
treea559c2c5f783d4cbd605578eee27269d1e3c533b /flags
parent6bdb9aa5e8afca684f73b8b30a162f3064e183a6 (diff)
parent07a056908617acbdad914acda674b6da88ed1add (diff)
downloadcxx-master.tar.gz
Update cxx to latest masterHEADmastermain
* Update build to match upstream's use of edition 2021 Test: mmm Change-Id: Iad58f8bb416050de4fb3f3087c051d680a2180e7
Diffstat (limited to 'flags')
-rw-r--r--flags/Cargo.toml5
-rw-r--r--flags/src/impl.rs13
-rw-r--r--flags/src/lib.rs2
3 files changed, 9 insertions, 11 deletions
diff --git a/flags/Cargo.toml b/flags/Cargo.toml
index 0baafb17..9cb88a04 100644
--- a/flags/Cargo.toml
+++ b/flags/Cargo.toml
@@ -1,10 +1,10 @@
[package]
name = "cxxbridge-flags"
-version = "1.0.93"
+version = "1.0.119"
authors = ["David Tolnay <dtolnay@gmail.com>"]
categories = ["development-tools::ffi", "compilers"]
description = "Compiler configuration of the `cxx` crate (implementation detail)"
-edition = "2018"
+edition = "2021"
license = "MIT OR Apache-2.0"
repository = "https://github.com/dtolnay/cxx"
rust-version = "1.60"
@@ -17,3 +17,4 @@ default = [] # c++11
[package.metadata.docs.rs]
targets = ["x86_64-unknown-linux-gnu"]
+rustdoc-args = ["--generate-link-to-definition"]
diff --git a/flags/src/impl.rs b/flags/src/impl.rs
index 4f7b8fb4..4cf0713e 100644
--- a/flags/src/impl.rs
+++ b/flags/src/impl.rs
@@ -1,20 +1,15 @@
#[allow(unused_assignments, unused_mut, unused_variables)]
pub const STD: &str = {
- let mut flags = ["-std=c++11", "/std:c++11"];
+ let mut flag = "c++11";
#[cfg(feature = "c++14")]
- (flags = ["-std=c++14", "/std:c++14"]);
+ (flag = "c++14");
#[cfg(feature = "c++17")]
- (flags = ["-std=c++17", "/std:c++17"]);
+ (flag = "c++17");
#[cfg(feature = "c++20")]
- (flags = ["-std=c++20", "/std:c++20"]);
-
- let [mut flag, msvc_flag] = flags;
-
- #[cfg(target_env = "msvc")]
- (flag = msvc_flag);
+ (flag = "c++20");
flag
};
diff --git a/flags/src/lib.rs b/flags/src/lib.rs
index 55172b21..899facd4 100644
--- a/flags/src/lib.rs
+++ b/flags/src/lib.rs
@@ -1,6 +1,8 @@
//! This crate is an implementation detail of the `cxx` and `cxx-build` crates,
//! and does not expose any public API.
+#![allow(clippy::let_and_return)]
+
mod r#impl;
#[doc(hidden)]