aboutsummaryrefslogtreecommitdiff
path: root/lldb/source/Plugins/ScriptInterpreter/Python/PythonReadline.cpp
diff options
context:
space:
mode:
authorVlad Serebrennikov <serebrennikov.vladislav@gmail.com>2025-01-16 13:12:28 +0400
committerGitHub <noreply@github.com>2025-01-16 13:12:28 +0400
commitec9aa4ac2f5a1b8e91938b47081eadc1a9d3bf85 (patch)
treeb25add6299eb04b7639e0d5ccaad30c7fef9e7f1 /lldb/source/Plugins/ScriptInterpreter/Python/PythonReadline.cpp
parentd89751240206dafcbc138829d9d7aad137aa2e04 (diff)
downloadllvm-ec9aa4ac2f5a1b8e91938b47081eadc1a9d3bf85.zip
llvm-ec9aa4ac2f5a1b8e91938b47081eadc1a9d3bf85.tar.gz
llvm-ec9aa4ac2f5a1b8e91938b47081eadc1a9d3bf85.tar.bz2
[cmake] Hardcode some `check_include_file` checks (#104706)
This patch removes 11 `check_include_file` invocations from configuration phase of LLVM subproject on most of the platforms, hardcoding the results. Fallback is left for platforms that we don't document as supported or that are not detectable via `CMAKE_SYSTEM_NAME`, e.g. z/OS. This patch reduces configuration time on Linux by 10%, going from 44.7 seconds down to 40.6 seconds on my Debian machine (ramdisk, `cmake -DLLVM_ENABLE_PROJECTS="clang;lldb;clang-tools-extra" -DLLVM_ENABLE_RUNTIMES="libunwind;libcxx;libcxxabi" -DCMAKE_BUILD_TYPE=RelWithDebInfo -DLLVM_OPTIMIZED_TABLEGEN=ON -DLLVM_TARGETS_TO_BUILD="X86" -DLLVM_ENABLE_DOXYGEN=ON -DLLVM_ENABLE_LIBCXX=ON -DBUILD_SHARED_LIBS=ON -DLLDB_ENABLE_PYTHON=ON ~/endill/llvm-project/llvm`). In order to determine the values to hardcode, I prepared the following header: ```cpp #include <dlfcn.h> #include <errno.h> #include <fcntl.h> #include <fenv.h> #include <mach/mach.h> #include <malloc/malloc.h> #include <pthread.h> #include <signal.h> #include <sys/ioctl.h> #include <sys/mman.h> #include <sys/param.h> #include <sys/resource.h> #include <sys/stat.h> #include <sys/time.h> #include <sys/types.h> #include <sysexits.h> #include <termios.h> #include <unistd.h> int main() {} ``` and tried to compile it on the oldest versions of platforms that are still supported (which was problematic to determine sometimes): macOS 12, Cygwin, DragonFly BSD 6.4.0, FreeBSD 13.3, Haiku R1 beta 4, RHEL 8.10 as a glibc-based Linux, Alpine 3.17 as musl-based Linux, NetBSD 9, OpenBSD 7.4, Solaris 11.4, Windows SDK 10.0.17763.0, which corresponds to Windows 10 1809 and is the oldest Windows 10 SDK in Visual Studio Installer. For platforms I don't have access to, which are AIX 7.2 TL5 and z/OS 2.4.0, I had to rely on the official documentation. I suspect that AIX offers a better set of headers than what this PR claims, so I'm open to input from people who have access to a live system to test it. Similarly to AIX, I have values for z/OS compiled from the official documentation that are not included in this patch, because apparently upstream CMake doesn't even support z/OS, so I don't even know how to make a place to hold those values. I see `if (ZOS)` in several places across our CMake files, but it's a mystery to me where this variable comes from. Input from people who have access to live z/OS instance is welcome.
Diffstat (limited to 'lldb/source/Plugins/ScriptInterpreter/Python/PythonReadline.cpp')
0 files changed, 0 insertions, 0 deletions