[llvm] Shard the public llvm-config.h in three files (NFC) (PR #71273)

via llvm-commits llvm-commits at lists.llvm.org
Sat Nov 4 16:35:41 PDT 2023


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-backend-risc-v

@llvm/pr-subscribers-backend-directx

Author: Mehdi Amini (joker-eph)

<details>
<summary>Changes</summary>

This will allow for more granular include and improve incremental rebuild and caching when switching targets or other options independently.

A single change of a target, default triple, or any option is triggering a monolithic rebuild of any user of a single of these options. We should make it as granular as possible.

There are also option in llvm-config.h that seems to belong to config.h instead (that is it's not clear why they are part of the public LLVM distribution). For example the aspects relative to the "native" targets have to with the build machine and in a cross-compiler environment shouldn't be in the install package.
Other candidates includes LLVM_ENABLE_DIA_SDK, HAVE_SYSEXITS_H, LLVM_ON_UNIX, ...
This will the subject of a follow-up pull-request, probably after some Discourse discussion.

Another follow-up should be to look into the private config.h and start updating its users
to be more selective.


---

Patch is 66.73 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/71273.diff


52 Files Affected:

- (modified) llvm/CMakeLists.txt (+10-1) 
- (added) llvm/include/llvm/Config/llvm-config-build-llvm-dylib.h (+16) 
- (added) llvm/include/llvm/Config/llvm-config-build-shared-libs.h (+16) 
- (added) llvm/include/llvm/Config/llvm-config-enable-curl.h (+16) 
- (added) llvm/include/llvm/Config/llvm-config-enable-dia-sdk.h (+16) 
- (added) llvm/include/llvm/Config/llvm-config-enable-dump.h (+16) 
- (added) llvm/include/llvm/Config/llvm-config-enable-httplib.h (+16) 
- (added) llvm/include/llvm/Config/llvm-config-enable-plugins.h (+16) 
- (added) llvm/include/llvm/Config/llvm-config-enable-threads.h (+16) 
- (added) llvm/include/llvm/Config/llvm-config-enable-zlib.h (+16) 
- (added) llvm/include/llvm/Config/llvm-config-enable-zstd.h (+16) 
- (added) llvm/include/llvm/Config/llvm-config-force-enable-stats.h (+18) 
- (added) llvm/include/llvm/Config/llvm-config-force-use-old-toolchain.h (+16) 
- (added) llvm/include/llvm/Config/llvm-config-force-with-z3.h (+16) 
- (added) llvm/include/llvm/Config/llvm-config-has-atomics.h (+16) 
- (added) llvm/include/llvm/Config/llvm-config-have-sysexits.h (+16) 
- (added) llvm/include/llvm/Config/llvm-config-have-tflite.h (+16) 
- (added) llvm/include/llvm/Config/llvm-config-on-unix.cmake.h (+16) 
- (added) llvm/include/llvm/Config/llvm-config-target-AArch64.h.cmake (+16) 
- (added) llvm/include/llvm/Config/llvm-config-target-AMDGPU.h.cmake (+16) 
- (added) llvm/include/llvm/Config/llvm-config-target-ARC.h.cmake (+16) 
- (added) llvm/include/llvm/Config/llvm-config-target-ARM.h.cmake (+16) 
- (added) llvm/include/llvm/Config/llvm-config-target-AVR.h.cmake (+16) 
- (added) llvm/include/llvm/Config/llvm-config-target-BPF.h.cmake (+16) 
- (added) llvm/include/llvm/Config/llvm-config-target-CSKY.h.cmake (+16) 
- (added) llvm/include/llvm/Config/llvm-config-target-DirectX.h.cmake (+16) 
- (added) llvm/include/llvm/Config/llvm-config-target-Hexagon.h.cmake (+16) 
- (added) llvm/include/llvm/Config/llvm-config-target-Lanai.h.cmake (+16) 
- (added) llvm/include/llvm/Config/llvm-config-target-LoongArch.h.cmake (+16) 
- (added) llvm/include/llvm/Config/llvm-config-target-M68k.h.cmake (+16) 
- (added) llvm/include/llvm/Config/llvm-config-target-MSP430.h.cmake (+16) 
- (added) llvm/include/llvm/Config/llvm-config-target-Mips.h.cmake (+16) 
- (added) llvm/include/llvm/Config/llvm-config-target-NVPTX.h.cmake (+16) 
- (added) llvm/include/llvm/Config/llvm-config-target-PowerPC.h.cmake (+16) 
- (added) llvm/include/llvm/Config/llvm-config-target-RISCV.h.cmake (+16) 
- (added) llvm/include/llvm/Config/llvm-config-target-SPIRV.h.cmake (+16) 
- (added) llvm/include/llvm/Config/llvm-config-target-Sparc.h.cmake (+16) 
- (added) llvm/include/llvm/Config/llvm-config-target-SystemZ.h.cmake (+16) 
- (added) llvm/include/llvm/Config/llvm-config-target-VE.h.cmake (+16) 
- (added) llvm/include/llvm/Config/llvm-config-target-WebAssembly.h.cmake (+16) 
- (added) llvm/include/llvm/Config/llvm-config-target-X86.h.cmake (+16) 
- (added) llvm/include/llvm/Config/llvm-config-target-XCore.h.cmake (+16) 
- (added) llvm/include/llvm/Config/llvm-config-target-Xtensa.h.cmake (+16) 
- (added) llvm/include/llvm/Config/llvm-config-target-native.h.cmake (+39) 
- (added) llvm/include/llvm/Config/llvm-config-target-triple.h.cmake (+22) 
- (added) llvm/include/llvm/Config/llvm-config-unreachable-optimize.h (+17) 
- (added) llvm/include/llvm/Config/llvm-config-use-intel-jit-events.h (+16) 
- (added) llvm/include/llvm/Config/llvm-config-use-oprofile.h (+16) 
- (added) llvm/include/llvm/Config/llvm-config-use-perf.h (+16) 
- (added) llvm/include/llvm/Config/llvm-config-version.h.cmake (+27) 
- (added) llvm/include/llvm/Config/llvm-config-with-z3.h (+16) 
- (modified) llvm/include/llvm/Config/llvm-config.h.cmake (+28-183) 


``````````diff
diff --git a/llvm/CMakeLists.txt b/llvm/CMakeLists.txt
index 7ff3acd48304de7..22da1e9d28af481 100644
--- a/llvm/CMakeLists.txt
+++ b/llvm/CMakeLists.txt
@@ -1063,13 +1063,22 @@ if (NOT TENSORFLOW_AOT_PATH STREQUAL "")
 
 endif()
 
-# Configure the three LLVM configuration header files.
+# Configure the LLVM configurations header files.
 configure_file(
   ${LLVM_MAIN_INCLUDE_DIR}/llvm/Config/config.h.cmake
   ${LLVM_INCLUDE_DIR}/llvm/Config/config.h)
 configure_file(
   ${LLVM_MAIN_INCLUDE_DIR}/llvm/Config/llvm-config.h.cmake
   ${LLVM_INCLUDE_DIR}/llvm/Config/llvm-config.h)
+configure_file(
+  ${LLVM_MAIN_INCLUDE_DIR}/llvm/Config/llvm-config-options.h.cmake
+  ${LLVM_INCLUDE_DIR}/llvm/Config/llvm-config-options.h)
+configure_file(
+  ${LLVM_MAIN_INCLUDE_DIR}/llvm/Config/llvm-config-targets.h.cmake
+  ${LLVM_INCLUDE_DIR}/llvm/Config/llvm-config-targets.h)
+configure_file(
+  ${LLVM_MAIN_INCLUDE_DIR}/llvm/Config/llvm-config-version.h.cmake
+  ${LLVM_INCLUDE_DIR}/llvm/Config/llvm-config-version.h)
 configure_file(
   ${LLVM_MAIN_INCLUDE_DIR}/llvm/Config/abi-breaking.h.cmake
   ${LLVM_INCLUDE_DIR}/llvm/Config/abi-breaking.h)
diff --git a/llvm/include/llvm/Config/llvm-config-build-llvm-dylib.h b/llvm/include/llvm/Config/llvm-config-build-llvm-dylib.h
new file mode 100644
index 000000000000000..89db92d7aee8cb0
--- /dev/null
+++ b/llvm/include/llvm/Config/llvm-config-build-llvm-dylib.h
@@ -0,0 +1,16 @@
+/*===------- llvm/Config/llvm-config-build-llvm-dylib.h -----------*- C -*-===*/
+/*                                                                            */
+/* Part of the LLVM Project, under the Apache License v2.0 with LLVM          */
+/* Exceptions.                                                                */
+/* See https://llvm.org/LICENSE.txt for license information.                  */
+/* SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception                    */
+/*                                                                            */
+/*===----------------------------------------------------------------------===*/
+
+#ifndef LLVM_CONFIG_BUILD_LLVM_DYLIB_H
+#define LLVM_CONFIG_BUILD_LLVM_DYLIB_H
+
+/* Define if building libLLVM shared library */
+#cmakedefine01 LLVM_BUILD_LLVM_DYLIB
+
+#endif // LLVM_CONFIG_BUILD_LLVM_DYLIB_H
diff --git a/llvm/include/llvm/Config/llvm-config-build-shared-libs.h b/llvm/include/llvm/Config/llvm-config-build-shared-libs.h
new file mode 100644
index 000000000000000..8d66e29f2052ac9
--- /dev/null
+++ b/llvm/include/llvm/Config/llvm-config-build-shared-libs.h
@@ -0,0 +1,16 @@
+/*===------- llvm/Config/llvm-config-build-shared-libs.h ----------*- C -*-===*/
+/*                                                                            */
+/* Part of the LLVM Project, under the Apache License v2.0 with LLVM          */
+/* Exceptions.                                                                */
+/* See https://llvm.org/LICENSE.txt for license information.                  */
+/* SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception                    */
+/*                                                                            */
+/*===----------------------------------------------------------------------===*/
+
+#ifndef LLVM_CONFIG_BUILD_SHARED_LIBS_H
+#define LLVM_CONFIG_BUILD_SHARED_LIBS_H
+
+/* Define if building LLVM with BUILD_SHARED_LIBS */
+#cmakedefine01 LLVM_BUILD_SHARED_LIBS
+
+#endif // LLVM_CONFIG_BUILD_SHARED_LIBS_H
diff --git a/llvm/include/llvm/Config/llvm-config-enable-curl.h b/llvm/include/llvm/Config/llvm-config-enable-curl.h
new file mode 100644
index 000000000000000..8a0ac685449a5aa
--- /dev/null
+++ b/llvm/include/llvm/Config/llvm-config-enable-curl.h
@@ -0,0 +1,16 @@
+/*===------- llvm/Config/llvm-config-enable-curl.h ----------------*- C -*-===*/
+/*                                                                            */
+/* Part of the LLVM Project, under the Apache License v2.0 with LLVM          */
+/* Exceptions.                                                                */
+/* See https://llvm.org/LICENSE.txt for license information.                  */
+/* SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception                    */
+/*                                                                            */
+/*===----------------------------------------------------------------------===*/
+
+#ifndef LLVM_CONFIG_ENABLE_CURL_H
+#define LLVM_CONFIG_ENABLE_CURL_H
+
+/* Define if we have curl and want to use it */
+#cmakedefine01 LLVM_ENABLE_CURL
+
+#endif // LLVM_CONFIG_ENABLE_CURL_H
diff --git a/llvm/include/llvm/Config/llvm-config-enable-dia-sdk.h b/llvm/include/llvm/Config/llvm-config-enable-dia-sdk.h
new file mode 100644
index 000000000000000..f793e0c9a8c3f54
--- /dev/null
+++ b/llvm/include/llvm/Config/llvm-config-enable-dia-sdk.h
@@ -0,0 +1,16 @@
+/*===------- llvm/Config/llvm-config-enable-dia-sdk.h -------------*- C -*-===*/
+/*                                                                            */
+/* Part of the LLVM Project, under the Apache License v2.0 with LLVM          */
+/* Exceptions.                                                                */
+/* See https://llvm.org/LICENSE.txt for license information.                  */
+/* SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception                    */
+/*                                                                            */
+/*===----------------------------------------------------------------------===*/
+
+#ifndef LLVM_CONFIG_ENABLE_DIA_SDK_H
+#define LLVM_CONFIG_ENABLE_DIA_SDK_H
+
+/* Define to 1 if you have the DIA SDK installed, and to 0 if you don't. */
+#cmakedefine01 LLVM_ENABLE_DIA_SDK
+
+#endif // LLVM_CONFIG_ENABLE_DIA_SDK_H
diff --git a/llvm/include/llvm/Config/llvm-config-enable-dump.h b/llvm/include/llvm/Config/llvm-config-enable-dump.h
new file mode 100644
index 000000000000000..fc1a3e1b07804c2
--- /dev/null
+++ b/llvm/include/llvm/Config/llvm-config-enable-dump.h
@@ -0,0 +1,16 @@
+/*===------- llvm/Config/llvm-config-enable-dump.h ----------------*- C -*-===*/
+/*                                                                            */
+/* Part of the LLVM Project, under the Apache License v2.0 with LLVM          */
+/* Exceptions.                                                                */
+/* See https://llvm.org/LICENSE.txt for license information.                  */
+/* SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception                    */
+/*                                                                            */
+/*===----------------------------------------------------------------------===*/
+
+#ifndef LLVM_CONFIG_ENABLE_DUMP_H
+#define LLVM_CONFIG_ENABLE_DUMP_H
+
+/* Define if LLVM_ENABLE_DUMP is enabled */
+#cmakedefine01 LLVM_ENABLE_DUMP
+
+#endif // LLVM_CONFIG_ENABLE_DUMP_H
diff --git a/llvm/include/llvm/Config/llvm-config-enable-httplib.h b/llvm/include/llvm/Config/llvm-config-enable-httplib.h
new file mode 100644
index 000000000000000..af9dbbc6604519c
--- /dev/null
+++ b/llvm/include/llvm/Config/llvm-config-enable-httplib.h
@@ -0,0 +1,16 @@
+/*===------- llvm/Config/llvm-config-httplib.h --------------------*- C -*-===*/
+/*                                                                            */
+/* Part of the LLVM Project, under the Apache License v2.0 with LLVM          */
+/* Exceptions.                                                                */
+/* See https://llvm.org/LICENSE.txt for license information.                  */
+/* SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception                    */
+/*                                                                            */
+/*===----------------------------------------------------------------------===*/
+
+#ifndef LLVM_CONFIG_ENABLE_HTTPLIB_H
+#define LLVM_CONFIG_ENABLE_HTTPLIB_H
+
+/* Define if we have cpp-httplib and want to use it */
+#cmakedefine01 LLVM_ENABLE_HTTPLIB
+
+#endif // LLVM_CONFIG_ENABLE_HTTPLIB_H
diff --git a/llvm/include/llvm/Config/llvm-config-enable-plugins.h b/llvm/include/llvm/Config/llvm-config-enable-plugins.h
new file mode 100644
index 000000000000000..730458175687835
--- /dev/null
+++ b/llvm/include/llvm/Config/llvm-config-enable-plugins.h
@@ -0,0 +1,16 @@
+/*===------- llvm/Config/llvm-config-enable-plugins.h -------------*- C -*-===*/
+/*                                                                            */
+/* Part of the LLVM Project, under the Apache License v2.0 with LLVM          */
+/* Exceptions.                                                                */
+/* See https://llvm.org/LICENSE.txt for license information.                  */
+/* SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception                    */
+/*                                                                            */
+/*===----------------------------------------------------------------------===*/
+
+#ifndef LLVM_CONFIG_ENABLE_PLUGINS_H
+#define LLVM_CONFIG_ENABLE_PLUGINS_H
+
+/* Define if plugins enabled */
+#cmakedefine01 LLVM_ENABLE_PLUGINS
+
+#endif // LLVM_CONFIG_ENABLE_PLUGINS_H
diff --git a/llvm/include/llvm/Config/llvm-config-enable-threads.h b/llvm/include/llvm/Config/llvm-config-enable-threads.h
new file mode 100644
index 000000000000000..56926fbcc477756
--- /dev/null
+++ b/llvm/include/llvm/Config/llvm-config-enable-threads.h
@@ -0,0 +1,16 @@
+/*===------- llvm/Config/llvm-config-threads.h --------------------*- C -*-===*/
+/*                                                                            */
+/* Part of the LLVM Project, under the Apache License v2.0 with LLVM          */
+/* Exceptions.                                                                */
+/* See https://llvm.org/LICENSE.txt for license information.                  */
+/* SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception                    */
+/*                                                                            */
+/*===----------------------------------------------------------------------===*/
+
+#ifndef LLVM_CONFIG_ENABLE_THREADS_H
+#define LLVM_CONFIG_ENABLE_THREADS_H
+
+/* Define if threads enabled */
+#cmakedefine01 LLVM_ENABLE_THREADS
+
+#endif // LLVM_CONFIG_ENABLE_THREADS_H
diff --git a/llvm/include/llvm/Config/llvm-config-enable-zlib.h b/llvm/include/llvm/Config/llvm-config-enable-zlib.h
new file mode 100644
index 000000000000000..ab4c4c471a105c1
--- /dev/null
+++ b/llvm/include/llvm/Config/llvm-config-enable-zlib.h
@@ -0,0 +1,16 @@
+/*===------- llvm/Config/llvm-config-enable-zlib.h ----------------*- C -*-===*/
+/*                                                                            */
+/* Part of the LLVM Project, under the Apache License v2.0 with LLVM          */
+/* Exceptions.                                                                */
+/* See https://llvm.org/LICENSE.txt for license information.                  */
+/* SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception                    */
+/*                                                                            */
+/*===----------------------------------------------------------------------===*/
+
+#ifndef LLVM_CONFIG_ENABLE_ZLIB_H
+#define LLVM_CONFIG_ENABLE_ZLIB_H
+
+/* Define if zlib compression is available */
+#cmakedefine01 LLVM_ENABLE_ZLIB
+
+#endif // LLVM_CONFIG_ENABLE_ZLIB_H
diff --git a/llvm/include/llvm/Config/llvm-config-enable-zstd.h b/llvm/include/llvm/Config/llvm-config-enable-zstd.h
new file mode 100644
index 000000000000000..feadf37f064a8d7
--- /dev/null
+++ b/llvm/include/llvm/Config/llvm-config-enable-zstd.h
@@ -0,0 +1,16 @@
+/*===------- llvm/Config/llvm-config-enable-zstd.h ----------------*- C -*-===*/
+/*                                                                            */
+/* Part of the LLVM Project, under the Apache License v2.0 with LLVM          */
+/* Exceptions.                                                                */
+/* See https://llvm.org/LICENSE.txt for license information.                  */
+/* SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception                    */
+/*                                                                            */
+/*===----------------------------------------------------------------------===*/
+
+#ifndef LLVM_CONFIG_ENABLE_ZSTD_H
+#define LLVM_CONFIG_ENABLE_ZSTD_H
+
+/* Define if zstd compression is available */
+#cmakedefine01 LLVM_ENABLE_ZSTD
+
+#endif // LLVM_CONFIG_ENABLE_ZSTD_H
diff --git a/llvm/include/llvm/Config/llvm-config-force-enable-stats.h b/llvm/include/llvm/Config/llvm-config-force-enable-stats.h
new file mode 100644
index 000000000000000..de37f26ec350aef
--- /dev/null
+++ b/llvm/include/llvm/Config/llvm-config-force-enable-stats.h
@@ -0,0 +1,18 @@
+/*===------- llvm/Config/llvm-config-force-enable-stats.h ---------*- C -*-===*/
+/*                                                                            */
+/* Part of the LLVM Project, under the Apache License v2.0 with LLVM          */
+/* Exceptions.                                                                */
+/* See https://llvm.org/LICENSE.txt for license information.                  */
+/* SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception                    */
+/*                                                                            */
+/*===----------------------------------------------------------------------===*/
+
+#ifndef LLVM_CONFIG_FORCE_ENABLE_STATS_H
+#define LLVM_CONFIG_FORCE_ENABLE_STATS_H
+
+/* Whether LLVM records statistics for use with GetStatistics(),
+ * PrintStatistics() or PrintStatisticsJSON()
+ */
+#cmakedefine01 LLVM_FORCE_ENABLE_STATS
+
+#endif // LLVM_CONFIG_FORCE_ENABLE_STATS_H
diff --git a/llvm/include/llvm/Config/llvm-config-force-use-old-toolchain.h b/llvm/include/llvm/Config/llvm-config-force-use-old-toolchain.h
new file mode 100644
index 000000000000000..c1b5b4894b572b3
--- /dev/null
+++ b/llvm/include/llvm/Config/llvm-config-force-use-old-toolchain.h
@@ -0,0 +1,16 @@
+/*===------- llvm/Config/llvm-config-force-use-old-toolchain.h ----*- C -*-===*/
+/*                                                                            */
+/* Part of the LLVM Project, under the Apache License v2.0 with LLVM          */
+/* Exceptions.                                                                */
+/* See https://llvm.org/LICENSE.txt for license information.                  */
+/* SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception                    */
+/*                                                                            */
+/*===----------------------------------------------------------------------===*/
+
+#ifndef LLVM_CONFIG_FORCE_USE_OLD_TOOLCHAIN_H
+#define LLVM_CONFIG_FORCE_USE_OLD_TOOLCHAIN_H
+
+/* Define if building LLVM with LLVM_FORCE_USE_OLD_TOOLCHAIN_LIBS */
+#cmakedefine01 LLVM_FORCE_USE_OLD_TOOLCHAIN
+
+#endif // LLVM_CONFIG_FORCE_USE_OLD_TOOLCHAIN_H
diff --git a/llvm/include/llvm/Config/llvm-config-force-with-z3.h b/llvm/include/llvm/Config/llvm-config-force-with-z3.h
new file mode 100644
index 000000000000000..440856c2a973c73
--- /dev/null
+++ b/llvm/include/llvm/Config/llvm-config-force-with-z3.h
@@ -0,0 +1,16 @@
+/*===------- llvm/Config/llvm-config-force-with-z3.h --------------*- C -*-===*/
+/*                                                                            */
+/* Part of the LLVM Project, under the Apache License v2.0 with LLVM          */
+/* Exceptions.                                                                */
+/* See https://llvm.org/LICENSE.txt for license information.                  */
+/* SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception                    */
+/*                                                                            */
+/*===----------------------------------------------------------------------===*/
+
+#ifndef LLVM_CONFIG_FORCE_WITH_Z3_H
+#define LLVM_CONFIG_FORCE_WITH_Z3_H
+
+/* Define if we have z3 and want to build it */
+#cmakedefine01 LLVM_FORCE_WITH_Z3
+
+#endif // LLVM_CONFIG_FORCE_WITH_Z3_H
diff --git a/llvm/include/llvm/Config/llvm-config-has-atomics.h b/llvm/include/llvm/Config/llvm-config-has-atomics.h
new file mode 100644
index 000000000000000..9b257d726f8ba6d
--- /dev/null
+++ b/llvm/include/llvm/Config/llvm-config-has-atomics.h
@@ -0,0 +1,16 @@
+/*===------- llvm/Config/llvm-config-has-atomics.h ----------------*- C -*-===*/
+/*                                                                            */
+/* Part of the LLVM Project, under the Apache License v2.0 with LLVM          */
+/* Exceptions.                                                                */
+/* See https://llvm.org/LICENSE.txt for license information.                  */
+/* SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception                    */
+/*                                                                            */
+/*===----------------------------------------------------------------------===*/
+
+#ifndef LLVM_CONFIG_HAS_ATOMICS_H
+#define LLVM_CONFIG_HAS_ATOMICS_H
+
+/* Has gcc/MSVC atomic intrinsics */
+#cmakedefine01 LLVM_HAS_ATOMICS
+
+#endif // LLVM_CONFIG_HAS_ATOMICS_H
diff --git a/llvm/include/llvm/Config/llvm-config-have-sysexits.h b/llvm/include/llvm/Config/llvm-config-have-sysexits.h
new file mode 100644
index 000000000000000..a467bc1159a2edd
--- /dev/null
+++ b/llvm/include/llvm/Config/llvm-config-have-sysexits.h
@@ -0,0 +1,16 @@
+/*===------- llvm/Config/llvm-config-have-sysexits.h --------------*- C -*-===*/
+/*                                                                            */
+/* Part of the LLVM Project, under the Apache License v2.0 with LLVM          */
+/* Exceptions.                                                                */
+/* See https://llvm.org/LICENSE.txt for license information.                  */
+/* SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception                    */
+/*                                                                            */
+/*===----------------------------------------------------------------------===*/
+
+#ifndef LLVM_CONFIG_HAVE_SYSEXITS_H_H
+#define LLVM_CONFIG_HAVE_SYSEXITS_H_H
+
+/* Define to 1 if you have the <sysexits.h> header file. */
+#cmakedefine01 LLVM_HAVE_SYSEXITS_H
+
+#endif // LLVM_CONFIG_HAVE_SYSEXITS_H_H
diff --git a/llvm/include/llvm/Config/llvm-config-have-tflite.h b/llvm/include/llvm/Config/llvm-config-have-tflite.h
new file mode 100644
index 000000000000000..3a61ccec627bcdf
--- /dev/null
+++ b/llvm/include/llvm/Config/llvm-config-have-tflite.h
@@ -0,0 +1,16 @@
+/*===------- llvm/Config/llvm-config-have-tflite.h ----------------*- C -*-===*/
+/*                                                                            */
+/* Part of the LLVM Project, under the Apache License v2.0 with LLVM          */
+/* Exceptions.                                                                */
+/* See https://llvm.org/LICENSE.txt for license information.                  */
+/* SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception                    */
+/*                                                                            */
+/*===----------------------------------------------------------------------===*/
+
+#ifndef LLVM_CONFIG_HAVE_TFLITE_H
+#define LLVM_CONFIG_HAVE_TFLITE_H
+
+/* Define if LLVM is using tflite */
+#cmakedefine01 LLVM_HAVE_TFLITE
+
+#endif // LLVM_CONFIG_HAVE_TFLITE_H
diff --git a/llvm/include/llvm/Config/llvm-config-on-unix.cmake.h b/llvm/include/llvm/Config/llvm-config-on-unix.cmake.h
new file mode 100644
index 000000000000000..da6712c07895035
--- /dev/null
+++ b/llvm/include/llvm/Config/llvm-config-on-unix.cmake.h
@@ -0,0 +1,16 @@
+/*===------- llvm/Config/llvm-config-on-unix.cmake.h --------------*- C -*-===*/
+/*                                                                            */
+/* Part of the LLVM Project, under the Apache License v2.0 with LLVM          */
+/* Exceptions.                                                                */
+/* See https://llvm.org/LICENSE.txt for license information.                  */
+/* SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception                    */
+/*                                                                            */
+/*===----------------------------------------------------------------------===*/
+
+#ifndef LLVM_CONFIG_ON_UNIX_H
+#define LLVM_CONFIG_ON_UNIX_H
+
+/* Define if this is Unixish platform */
+#cmakedefine01 LLVM_ON_UNIX
+
+#endif ...
[truncated]

``````````

</details>


https://github.com/llvm/llvm-project/pull/71273


More information about the llvm-commits mailing list