This method introduces new CMake variable PPC_LINUX_DEFAULT_IEEELONGDOUBLE (false by default) to enable fp128 as default long double format.
We need to make some tests explicitly set long double type, otherwise they fail in either config.
Paths
| Differential D118110
[CMake] [Clang] Add CMake build option to specify long double format on PowerPC ClosedPublic Authored by qiucf on Jan 25 2022, 1:22 AM.
Details
Summary This method introduces new CMake variable PPC_LINUX_DEFAULT_IEEELONGDOUBLE (false by default) to enable fp128 as default long double format. We need to make some tests explicitly set long double type, otherwise they fail in either config.
Diff Detail
Event TimelineHerald added subscribers: steven.zhang, kbarton, mgorny. · View Herald TranscriptJan 25 2022, 1:22 AM Comment Actions It is probably not worth the effort since there won't be that many test cases that test the front end's IR generation for long double, but there should be a way to set up lit to know the default through its configuration files.
Comment Actions
Yes, that is not a must for now, but we should try to do it .
Let us apply it to ppc64le only for now.
qiucf marked 3 inline comments as done. Comment Actions
Yes, lit doesn't know about it. But lit can't do things in IR test like #ifdef in C nor change default semantics of clang, so it seems not able to help in such cases. This revision is now accepted and ready to land.Jan 26 2022, 5:28 AM This revision was landed with ongoing or failed builds.Jan 26 2022, 8:53 AM Closed by commit rGb797d5e6b21b: [CMake] [Clang] Add option to specify PowerPC long double format (authored by qiucf). · Explain Why This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 403294 clang/CMakeLists.txt
clang/include/clang/Config/config.h.cmake
clang/include/clang/Driver/ToolChain.h
clang/lib/Driver/ToolChain.cpp
clang/lib/Driver/ToolChains/Clang.cpp
clang/test/Analysis/builtin_signbit.cpp
clang/test/Driver/ppc-abi.c
|
Do we need any error checking here? What happens if someone erroneously sets this on an AIX build (or big endian Linux, FreeBSD, etc.)?