aboutsummaryrefslogtreecommitdiff
path: root/openmp/cmake/HandleOpenMPOptions.cmake
diff options
context:
space:
mode:
authorJoseph Huber <huberjn@outlook.com>2023-11-27 14:39:58 -0600
committerJoseph Huber <huberjn@outlook.com>2023-11-27 14:51:48 -0600
commit4b7beab4187ab0766c3d7b272511d5751431a8da (patch)
treee9041e3575a29ed2fcad4ca6037791d38a717ee7 /openmp/cmake/HandleOpenMPOptions.cmake
parent3d87b9d5f0ebc0df2b258817ff6a25a40e1fbc37 (diff)
downloadllvm-4b7beab4187ab0766c3d7b272511d5751431a8da.zip
llvm-4b7beab4187ab0766c3d7b272511d5751431a8da.tar.gz
llvm-4b7beab4187ab0766c3d7b272511d5751431a8da.tar.bz2
[OpenMP] Add back implicit flags manually
Summary: We used to inherit these flags from the LLVM options in a runtimes build. This patch adds them back in manually as they are helpful for diagnostics and optimizing the created binary.
Diffstat (limited to 'openmp/cmake/HandleOpenMPOptions.cmake')
-rw-r--r--openmp/cmake/HandleOpenMPOptions.cmake6
1 files changed, 6 insertions, 0 deletions
diff --git a/openmp/cmake/HandleOpenMPOptions.cmake b/openmp/cmake/HandleOpenMPOptions.cmake
index a79b04e..b0fd0b7 100644
--- a/openmp/cmake/HandleOpenMPOptions.cmake
+++ b/openmp/cmake/HandleOpenMPOptions.cmake
@@ -18,6 +18,8 @@ if (OPENMP_ENABLE_WERROR)
append_if(OPENMP_HAVE_WERROR_FLAG "-Werror" CMAKE_C_FLAGS CMAKE_CXX_FLAGS)
endif()
+append_if(OPENMP_HAVE_COLOR_DIAGNOSTICS "-fcolor-diagnostics" CMAKE_C_FLAGS CMAKE_CXX_FLAGS)
+
# Additional warnings that are not enabled by -Wall.
append_if(OPENMP_HAVE_WCAST_QUAL_FLAG "-Wcast-qual" CMAKE_C_FLAGS CMAKE_CXX_FLAGS)
append_if(OPENMP_HAVE_WFORMAT_PEDANTIC_FLAG "-Wformat-pedantic" CMAKE_C_FLAGS CMAKE_CXX_FLAGS)
@@ -35,3 +37,7 @@ append_if(OPENMP_HAVE_WENUM_CONSTEXPR_CONVERSION_FLAG "-Wno-enum-constexpr-conve
append_if(OPENMP_HAVE_WEXTRA_FLAG "-Wno-extra" CMAKE_C_FLAGS CMAKE_CXX_FLAGS)
append_if(OPENMP_HAVE_WPEDANTIC_FLAG "-Wno-pedantic" CMAKE_C_FLAGS CMAKE_CXX_FLAGS)
append_if(OPENMP_HAVE_WMAYBE_UNINITIALIZED_FLAG "-Wno-maybe-uninitialized" CMAKE_C_FLAGS CMAKE_CXX_FLAGS)
+
+append_if(OPENMP_HAVE_NO_SEMANTIC_INTERPOSITION "-fno-semantic-interposition" CMAKE_C_FLAGS CMAKE_CXX_FLAGS)
+append_if(OPENMP_HAVE_FUNCTION_SECTIONS "-ffunction-section" CMAKE_C_FLAGS CMAKE_CXX_FLAGS)
+append_if(OPENMP_HAVE_DATA_SECTIONS "-fdata-sections" CMAKE_C_FLAGS CMAKE_CXX_FLAGS)