[PATCH] D126951: [Fortran] Don't add -Werror=date-time for flang

Diana Picus via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 3 02:07:08 PDT 2022


rovka created this revision.
rovka added a reviewer: awarzynski.
rovka added a project: Flang.
Herald added subscribers: jdoerfert, mgorny.
Herald added a reviewer: sscalpone.
Herald added a project: All.
rovka requested review of this revision.

At the moment, flang doesn't support `-Werror=date-time`, so we
can't run the llvm-test-suite with it. This patch skips adding the flag
if the Fortran compiler is set to flang. It shouldn't affect any other 
compiler (and especially not C/C++ ones).


Repository:
  rT test-suite

https://reviews.llvm.org/D126951

Files:
  CMakeLists.txt


Index: CMakeLists.txt
===================================================================
--- CMakeLists.txt
+++ CMakeLists.txt
@@ -53,7 +53,10 @@
 endif()
 
 # We want reproducible builds, so using __DATE__ and __TIME__ is bad
-add_definitions(-Werror=date-time)
+# FIXME: Add this unconditionally when flang starts supporting it.
+if(NOT CMAKE_Fortran_COMPILER_ID STREQUAL "LLVMFlang")
+  add_definitions(-Werror=date-time)
+endif()
 
 # Add path for custom modules
 set(CMAKE_MODULE_PATH


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D126951.433985.patch
Type: text/x-patch
Size: 491 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220603/0aa0ad89/attachment.bin>


More information about the llvm-commits mailing list