[PATCH] D118269: [gn build] Make HAVE_MALLINFO2 a gn arg, default to false
Arthur Eubanks via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jan 26 09:45:25 PST 2022
aeubanks created this revision.
aeubanks added reviewers: thakis, peterwaller-arm.
aeubanks requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
D117916 <https://reviews.llvm.org/D117916> broke some people because some distros are still using a glibc
older than 2.33. Add gn arg llvm_have_mallinfo2 and default to false for
now.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D118269
Files:
llvm/utils/gn/secondary/llvm/include/llvm/Config/BUILD.gn
Index: llvm/utils/gn/secondary/llvm/include/llvm/Config/BUILD.gn
===================================================================
--- llvm/utils/gn/secondary/llvm/include/llvm/Config/BUILD.gn
+++ llvm/utils/gn/secondary/llvm/include/llvm/Config/BUILD.gn
@@ -46,6 +46,10 @@
# Iterate unordered llvm containers in reverse.
llvm_enable_reverse_iteration = false
+
+ # glibc is at least 2.33 which has mallinfo2.
+ # TODO: remove this once nobody using the gn build is building against an old glibc.
+ llvm_have_mallinfo2 = false
}
write_cmake_config("abi-breaking") {
@@ -142,7 +146,6 @@
"HAVE_LINK_H=1",
"HAVE_LSEEK64=1",
"HAVE_MALLINFO=1",
- "HAVE_MALLINFO2=1",
"HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC=1",
]
} else {
@@ -151,7 +154,6 @@
"HAVE_LINK_H=",
"HAVE_LSEEK64=",
"HAVE_MALLINFO=",
- "HAVE_MALLINFO2=",
"HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC=",
]
}
@@ -322,6 +324,12 @@
} else {
values += [ "LLVM_ENABLE_LIBXML2=" ]
}
+
+ if (llvm_have_mallinfo2) {
+ values += [ "HAVE_MALLINFO2=1" ]
+ } else {
+ values += [ "HAVE_MALLINFO2=" ]
+ }
}
write_cmake_config("llvm-config") {
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D118269.403320.patch
Type: text/x-patch
Size: 1189 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220126/23cd58cb/attachment.bin>
More information about the llvm-commits
mailing list