1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 03:02:36 +01:00
llvm-mirror/cmake/modules
Gokturk Yuksek c05d814fb9 [CMake] CheckAtomic.cmake: catch false positives in RISC-V
The check for 'HAVE_CXX_ATOMICS_WITHOUT_LIB' may create false
positives in RISC-V. This is reproducible when compiling LLVM natively
using GCC on a rv64gc (rv64imafdgc) host. Due to the 'A' (atomic)
extension, g++ replaces calls to libatomic operations on the
std::atomic<int> type with the native hardware instructions. As a
result, the compilation succeeds and the build system thinks it
doesn't need to pass '-latomic'.

Improve the reliability of the 'HAVE_CXX_ATOMICS_WITHOUT_LIB' test in
two steps:

1. Force a pre-increment on x (++x), which should force a call to a
libatomic function;

2. Because step 1 would resolve the increment to 'amoadd.w.aq' under
the 'A' extension, force the same operation on sub-word types, for
which there is no hardware support.

Reviewers: jfb, hintonda, smeenai, mgorny, JDevlieghere, jyknight
Reviewed By: jfb
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D68964
2020-02-17 18:53:41 +00:00
..
AddLLVM.cmake Fix standalone build interaction with compiler extension 2020-02-15 11:10:51 +01:00
AddLLVMDefinitions.cmake
AddOCaml.cmake [llvm] [ocaml] Support linking against dylib 2019-10-11 14:32:43 +00:00
AddSphinxTarget.cmake [llvm] [cmake] Add install targets for missing distribution components 2019-10-02 16:06:50 +00:00
CheckAtomic.cmake [CMake] CheckAtomic.cmake: catch false positives in RISC-V 2020-02-17 18:53:41 +00:00
CheckCompilerVersion.cmake MSVC Buggy version detection: turn pre-processor error into CMake configuration time check 2020-01-31 00:11:55 +00:00
CheckLinkerFlag.cmake
ChooseMSVCCRT.cmake
CMakeLists.txt
CrossCompile.cmake [cmake] Pass external project source directories to sub-configures 2019-10-17 19:24:58 +00:00
DetermineGCCCompatible.cmake
FindLibpfm.cmake
FindOCaml.cmake
FindSphinx.cmake
FindZ3.cmake
GenerateVersionFromVCS.cmake
GetHostTriple.cmake
HandleLLVMOptions.cmake [windows] Add /Gw to compiler flags 2020-02-14 15:15:00 -05:00
HandleLLVMStdlib.cmake Add support in CMake to statically link the C++ standard library. 2019-08-14 19:55:59 +00:00
LLVM-Config.cmake Remove AllTargetsAsmPrinters 2020-01-17 19:04:06 -05:00
LLVMConfig.cmake.in Make LLVM_APPEND_VC_REV=OFF affect clang, lld, and lldb as well. 2020-01-16 19:04:08 -05:00
LLVMConfigVersion.cmake.in
LLVMDistributionSupport.cmake
LLVMExternalProjectUtils.cmake [CMake] Use LLVM tools external project build where possible 2020-02-07 13:43:30 -08:00
LLVMInstallSymlink.cmake [cmake] install_symlink should obey DESTDIR unconditionally 2019-08-15 15:36:13 +00:00
LLVMProcessSources.cmake
TableGen.cmake [tablegen] Emit string literals instead of char arrays 2020-01-27 18:22:25 +00:00
UseLibtool.cmake
VersionFromVCS.cmake [cmake] Remove SVN support from VersionFromVCS.cmake 2019-11-08 09:59:42 -08:00