Skip to content

Commit

Permalink
[openmp] Only try to add the -mrtm flag on i386/x86_64
Browse files Browse the repository at this point in the history
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
  • Loading branch information
mstorsjo committed Nov 18, 2022
1 parent 7e6dbfc commit fe287bf
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion openmp/runtime/cmake/LibompHandleFlags.cmake
Expand Up @@ -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)
Expand Down

0 comments on commit fe287bf

Please sign in to comment.