[libcxx-commits] [PATCH] D75955: [libcxx] Enable C++17 for the benchmarks

Mark de Wever via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Tue Mar 10 13:39:49 PDT 2020


Mordante updated this revision to Diff 249485.
Mordante added a comment.

Noticed I didn't stage my last hunk. Don't use BENCHMARK_DIALECT_FLAG which no longer is set.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D75955/new/

https://reviews.llvm.org/D75955

Files:
  libcxx/benchmarks/CMakeLists.txt


Index: libcxx/benchmarks/CMakeLists.txt
===================================================================
--- libcxx/benchmarks/CMakeLists.txt
+++ libcxx/benchmarks/CMakeLists.txt
@@ -72,18 +72,8 @@
 set(BENCHMARK_LIBCXX_INSTALL ${CMAKE_CURRENT_BINARY_DIR}/benchmark-libcxx)
 set(BENCHMARK_NATIVE_INSTALL ${CMAKE_CURRENT_BINARY_DIR}/benchmark-native)
 
-check_flag_supported("-std=c++17")
-mangle_name("LIBCXX_SUPPORTS_STD_EQ_c++17_FLAG" BENCHMARK_SUPPORTS_STD_CXX17_FLAG)
-if (${BENCHMARK_SUPPORTS_STD_CXX17_FLAG})
-  set(BENCHMARK_DIALECT_FLAG "-std=c++17")
-else()
-  # If the compiler doesn't support -std=c++17, attempt to fall back to -std=c++1z while still
-  # requiring C++17 language features.
-  set(BENCHMARK_DIALECT_FLAG "-std=c++1z")
-endif()
-
 set(BENCHMARK_TEST_COMPILE_FLAGS
-    ${BENCHMARK_DIALECT_FLAG} -O2
+    -O2
     -fsized-deallocation
     -I${BENCHMARK_LIBCXX_INSTALL}/include
     -I${LIBCXX_SOURCE_DIR}/test/support
@@ -151,6 +141,7 @@
           OUTPUT_NAME "${name}.libcxx.out"
           RUNTIME_OUTPUT_DIRECTORY "${BENCHMARK_OUTPUT_DIR}"
           COMPILE_FLAGS "${BENCHMARK_TEST_LIBCXX_COMPILE_FLAGS}"
+          CXX_STANDARD 17
           LINK_FLAGS "${BENCHMARK_TEST_LIBCXX_LINK_FLAGS}")
   cxx_link_system_libraries(${libcxx_target})
   if (LIBCXX_BENCHMARK_NATIVE_STDLIB)


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D75955.249485.patch
Type: text/x-patch
Size: 1315 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20200310/7055cbaf/attachment.bin>


More information about the libcxx-commits mailing list