[Openmp-commits] [openmp] fe287bf - [openmp] Only try to add the -mrtm flag on i386/x86_64
Martin Storsjö via Openmp-commits
openmp-commits at lists.llvm.org
Thu Nov 17 22:52:43 PST 2022
Author: Martin Storsjö
Date: 2022-11-18T08:50:26+02:00
New Revision: fe287bf096c6b5fdf46b2d34590311099852abd4
URL: https://github.com/llvm/llvm-project/commit/fe287bf096c6b5fdf46b2d34590311099852abd4
DIFF: https://github.com/llvm/llvm-project/commit/fe287bf096c6b5fdf46b2d34590311099852abd4.diff
LOG: [openmp] Only try to add the -mrtm flag on i386/x86_64
Clang does accept the flag for any architecture, but prints a
warning:
clang-16: warning: argument unused during compilation: '-mrtm' [-Wunused-command-line-argument]
This flag is documented as an x86 specific flag, so don't try to
add it for other architectures, to silence this warning.
Differential Revision: https://reviews.llvm.org/D137744
Added:
Modified:
openmp/runtime/cmake/LibompHandleFlags.cmake
Removed:
################################################################################
diff --git a/openmp/runtime/cmake/LibompHandleFlags.cmake b/openmp/runtime/cmake/LibompHandleFlags.cmake
index 33847b5545fb..2eb9ee640834 100644
--- a/openmp/runtime/cmake/LibompHandleFlags.cmake
+++ b/openmp/runtime/cmake/LibompHandleFlags.cmake
@@ -42,7 +42,9 @@ function(libomp_get_cxxflags cxxflags)
libomp_append(flags_local /GS LIBOMP_HAVE_GS_FLAG)
libomp_append(flags_local /EHsc LIBOMP_HAVE_EHSC_FLAG)
libomp_append(flags_local /Oy- LIBOMP_HAVE_OY__FLAG)
- libomp_append(flags_local -mrtm LIBOMP_HAVE_MRTM_FLAG)
+ if(${IA32} OR ${INTEL64})
+ libomp_append(flags_local -mrtm LIBOMP_HAVE_MRTM_FLAG)
+ endif()
# Intel(R) C Compiler flags
libomp_append(flags_local /Qsafeseh LIBOMP_HAVE_QSAFESEH_FLAG)
libomp_append(flags_local -Qoption,cpp,--extended_float_types LIBOMP_HAVE_EXTENDED_FLOAT_TYPES_FLAG)
More information about the Openmp-commits
mailing list