[compiler-rt] [Fuzzer] Update build.sh to fix build errors (PR #65496)

Arseny Kapoulkine via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 6 09:05:38 PDT 2023


https://github.com/zeux created https://github.com/llvm/llvm-project/pull/65496:

Switch from C++11 to C++14 as fuzzer requires std::chrono and stdlibc++ doesn't provide chrono literals when using -std=c++11.

Also remove 'u' from ar command to fix this warning: ar: `u' modifier ignored since `D' is the default (see `U')

>From 7827435fdd8a252a5f149b04299f730d6e611ab8 Mon Sep 17 00:00:00 2001
From: Arseny Kapoulkine <arseny.kapoulkine at gmail.com>
Date: Mon, 4 Sep 2023 20:00:37 -0700
Subject: [PATCH] [Fuzzer] Update build.sh to fix build errors

Switch from C++11 to C++14 as fuzzer requires std::chrono and stdlibc++
doesn't provide chrono literals when using -std=c++11.

Also remove 'u' from ar command to fix this warning:
ar: `u' modifier ignored since `D' is the default (see `U')
---
 compiler-rt/lib/fuzzer/build.sh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/compiler-rt/lib/fuzzer/build.sh b/compiler-rt/lib/fuzzer/build.sh
index 504e54e3a819ee8..f7f329c0d19c765 100755
--- a/compiler-rt/lib/fuzzer/build.sh
+++ b/compiler-rt/lib/fuzzer/build.sh
@@ -2,10 +2,10 @@
 LIBFUZZER_SRC_DIR=$(dirname $0)
 CXX="${CXX:-clang}"
 for f in $LIBFUZZER_SRC_DIR/*.cpp; do
-  $CXX -g -O2 -fno-omit-frame-pointer -std=c++11 $f -c &
+  $CXX -g -O2 -fno-omit-frame-pointer -std=c++14 $f -c &
 done
 wait
 rm -f libFuzzer.a
-ar ru libFuzzer.a Fuzzer*.o
+ar r libFuzzer.a Fuzzer*.o
 rm -f Fuzzer*.o
 



More information about the llvm-commits mailing list