aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2024-05-31 12:09:11 +0200
committerDmitry Vyukov <dvyukov@google.com>2024-06-03 09:42:24 +0000
commitdd924e4ecae5264ef24e87d4b43e38b51a4540fb (patch)
tree811788b6fbde0e550eb4fd43e3860616ec13a421
parente20819a0cec1dca7761ed251e6df7bb7c1300da1 (diff)
sys/targets: switch to C++17
Let's see if we can get away with C++17 for all our toolchains. The later standard we can use, the better. C++17 has a number of nice features, e.g. std::optional.
-rw-r--r--Makefile1
-rw-r--r--sys/targets/targets.go2
2 files changed, 2 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 5a1d3d010..e2eee1c9d 100644
--- a/Makefile
+++ b/Makefile
@@ -287,6 +287,7 @@ tidy: descriptions
-extra-arg=-DGOOS_$(TARGETOS)=1 -extra-arg=-DGOARCH_$(TARGETARCH)=1 \
-extra-arg=-DHOSTGOOS_$(HOSTOS)=1 -extra-arg=-DGIT_REVISION=\"$(REV)\" \
--extra-arg=-I. --extra-arg=-Iexecutor/_include \
+ --extra-arg=-std=c++17 \
executor/*.cc
ifdef CI
diff --git a/sys/targets/targets.go b/sys/targets/targets.go
index d444f55aa..afc21d545 100644
--- a/sys/targets/targets.go
+++ b/sys/targets/targets.go
@@ -620,7 +620,7 @@ var (
// These are used only when building executor.
// For C repros and syz-extract, we build C source files.
commonCxxFlags = []string{
- "-std=c++14",
+ "-std=c++17",
"-I.",
"-Iexecutor/_include",
}