[PATCH] D119058: Fix lld standalone build

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 7 09:17:45 PST 2022


MaskRay updated this revision to Diff 406494.
MaskRay added a comment.

Move LLVM_ENABLE_ZLIB


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D119058/new/

https://reviews.llvm.org/D119058

Files:
  lld/ELF/OutputSections.cpp
  llvm/include/llvm/Config/config.h.cmake
  llvm/include/llvm/Config/llvm-config.h.cmake


Index: llvm/include/llvm/Config/llvm-config.h.cmake
===================================================================
--- llvm/include/llvm/Config/llvm-config.h.cmake
+++ llvm/include/llvm/Config/llvm-config.h.cmake
@@ -88,6 +88,9 @@
 /* Define if we have curl and want to use it */
 #cmakedefine LLVM_ENABLE_CURL ${LLVM_ENABLE_CURL}
 
+/* Define if zlib compression is available */
+#cmakedefine01 LLVM_ENABLE_ZLIB
+
 /* Define if LLVM was built with a dependency to the libtensorflow dynamic library */
 #cmakedefine LLVM_HAVE_TF_API
 
Index: llvm/include/llvm/Config/config.h.cmake
===================================================================
--- llvm/include/llvm/Config/config.h.cmake
+++ llvm/include/llvm/Config/config.h.cmake
@@ -300,9 +300,6 @@
 /* Doesn't use `cmakedefine` because it is allowed to be empty. */
 #define LLVM_DEFAULT_TARGET_TRIPLE "${LLVM_DEFAULT_TARGET_TRIPLE}"
 
-/* Define if zlib compression is available */
-#cmakedefine01 LLVM_ENABLE_ZLIB
-
 /* Define if overriding target triple is enabled */
 #cmakedefine LLVM_TARGET_TRIPLE_ENV "${LLVM_TARGET_TRIPLE_ENV}"
 
Index: lld/ELF/OutputSections.cpp
===================================================================
--- lld/ELF/OutputSections.cpp
+++ lld/ELF/OutputSections.cpp
@@ -16,7 +16,7 @@
 #include "lld/Common/Memory.h"
 #include "lld/Common/Strings.h"
 #include "llvm/BinaryFormat/Dwarf.h"
-#include "llvm/Config/config.h" // LLVM_ENABLE_ZLIB
+#include "llvm/Config/llvm-config.h" // LLVM_ENABLE_ZLIB
 #include "llvm/Support/MD5.h"
 #include "llvm/Support/MathExtras.h"
 #include "llvm/Support/Parallel.h"


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D119058.406494.patch
Type: text/x-patch
Size: 1604 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220207/13083b5f/attachment.bin>


More information about the llvm-commits mailing list