[all-commits] [llvm/llvm-project] 5fbcd6: [CMake] Prune dead and unnecessary try_compiles fr...

Reid Kleckner via All-commits all-commits at lists.llvm.org
Tue Sep 15 10:52:42 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 5fbcd6e37671e5c6d950494a6bb434e27d28f840
      https://github.com/llvm/llvm-project/commit/5fbcd6e37671e5c6d950494a6bb434e27d28f840
  Author: Reid Kleckner <rkleckner at nvidia.com>
  Date:   2026-09-15 (Tue, 15 Sep 2026)

  Changed paths:
    M llvm/cmake/config-ix.cmake
    M llvm/include/llvm/Config/config.h.cmake
    M llvm/lib/Analysis/ConstantFolding.cpp
    M llvm/lib/Support/PrettyStackTrace.cpp
    M llvm/lib/Support/Unix/Path.inc
    M llvm/lib/Support/Valgrind.cpp
    M llvm/utils/gn/secondary/llvm/include/llvm/Config/BUILD.gn
    M utils/bazel/llvm-project-overlay/llvm/config.bzl
    M utils/bazel/llvm-project-overlay/llvm/include/llvm/Config/config.h
    M utils/bazel/llvm_configs/config.h.cmake

  Log Message:
  -----------
  [CMake] Prune dead and unnecessary try_compiles from config.h (#223765)

This relands the change directly on `main` after #223600 was
accidentally
merged into its stacked base branch. This reuses the approvals from
@aengelke and @MaskRay on #223600.

Several config-ix checks either have no consumer or can be performed
directly by the source that needs the feature. Remove six compiler
invocations from a typical Linux configure:

* HAVE_PTHREAD_MUTEX_LOCK has been unused since LLVM switched its mutex
implementation to std::recursive_mutex in 2019.
* The Linux magic-header results have never been propagated to config.h,
so CMake builds already use Path.inc's fallback constants.
* FE_ALL_EXCEPT and FE_INEXACT can be tested directly after including
cfenv.
* The Valgrind and CrashReporter headers can be detected with
__has_include in their only consuming translation units.

Also remove the obsolete definitions from the GN and Bazel
configurations.

In a fresh minimal LLVM configure, CMake profiling attributed 2067.1 ms
to 45 config-ix probes before this change and 1846.9 ms to 39 probes
after it.

Assisted-by: Codex



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list