[PATCH] D107123: [Bazel] Unconditionally define STDC LIMIT/CONSTANT/FORMAT

Geoffrey Martin-Noble via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 29 18:12:10 PDT 2021


This revision was automatically updated to reflect the committed changes.
Closed by commit rGf3a8a7b91e54: [Bazel] Unconditionally define STDC LIMIT/CONSTANT/FORMAT (authored by GMNGeoffrey).

Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D107123

Files:
  utils/bazel/llvm-project-overlay/llvm/config.bzl


Index: utils/bazel/llvm-project-overlay/llvm/config.bzl
===================================================================
--- utils/bazel/llvm-project-overlay/llvm/config.bzl
+++ utils/bazel/llvm-project-overlay/llvm/config.bzl
@@ -75,4 +75,13 @@
     "@bazel_tools//src/conditions:darwin": native_arch_defines("X86", "x86_64-unknown-darwin"),
     "@bazel_tools//src/conditions:linux_aarch64": native_arch_defines("AArch64", "aarch64-unknown-linux-gnu"),
     "//conditions:default": native_arch_defines("X86", "x86_64-unknown-linux-gnu"),
-})
+}) + [
+    # These shouldn't be needed by the C++11 standard, but are for some
+    # platforms (e.g. glibc < 2.18. See
+    # https://sourceware.org/bugzilla/show_bug.cgi?id=15366). These are also
+    # included unconditionally in the CMake build:
+    # https://github.com/llvm/llvm-project/blob/cd0dd8ece8e/llvm/cmake/modules/HandleLLVMOptions.cmake#L907-L909
+    "__STDC_LIMIT_MACROS",
+    "__STDC_CONSTANT_MACROS",
+    "__STDC_FORMAT_MACROS",
+]


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D107123.362940.patch
Type: text/x-patch
Size: 1004 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210730/b889b5ef/attachment.bin>


More information about the llvm-commits mailing list