[Openmp-commits] [PATCH] D97413: [OpenMP] Fix clang-cl build error regarding TSX intrinsics
Hans Wennborg via Phabricator via Openmp-commits
openmp-commits at lists.llvm.org
Mon Mar 1 04:39:16 PST 2021
hans accepted this revision.
hans added a comment.
This revision is now accepted and ready to land.
In D97413#2588041 <https://reviews.llvm.org/D97413#2588041>, @jlpeyton wrote:
> In D97413#2587137 <https://reviews.llvm.org/D97413#2587137>, @hans wrote:
>
>> Oh, and I just realized: just because my machine supports RTM doesn't necessarily mean we want to use it, since these builds will then be used on all kinds of machines. This might be a bigger problem with the runtime's build config though.
>
> I think only the build compiler needs to support the instructions, not your machine.
> This shouldn't cause a problem since the RTM instrinsics are only used inside a specific lock kind which the user must select using an environment variable.
I see. Thanks for clarifying!
================
Comment at: openmp/runtime/cmake/config-ix.cmake:179
+ if (LIBOMP_HAVE_MRTM_FLAG)
+ set(CMAKE_REQUIRED_FLAGS -mrtm)
+ endif()
----------------
I looked for how CMAKE_REQUIRED_FLAGS is used in other places, and this pattern seems common:
```
set(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} -std=c++11")
```
Maybe that is safer, in case CMAKE_REQUIRED_FLAGS already holds some flag that is important for the build.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D97413/new/
https://reviews.llvm.org/D97413
More information about the Openmp-commits
mailing list