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

Mehdi Amini via llvm-commits llvm-commits at lists.llvm.org
Sat Nov 4 23:42:59 PDT 2023


================
@@ -0,0 +1,16 @@
+/*===------- llvm/Config/llvm-config-enable-curl.h.cmake ----------*- 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 */
+#cmakedefine LLVM_ENABLE_CURL ${LLVM_ENABLE_CURL}
----------------
joker-eph wrote:

At the moment we keep including everything through the llvm-config.h ; but you're right this is a major hurdle.

I'm already going one by one through all the options and converting them to cmakedefine01.
I am also making the LLVM codebase `-Wundef` clean: this is the only way to catch this in a principle way (I think we should enable -Wundef by default actually). 

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


More information about the llvm-commits mailing list