[libc-commits] [PATCH] D87412: [libc][MPFRWrapper] Provide a way to include MPFR header in downstream repos.

Siva Chandra via Phabricator via libc-commits libc-commits at lists.llvm.org
Wed Sep 9 12:59:32 PDT 2020


This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rGfb542b0b8c20: [libc][MPFRWrapper] Provide a way to include MPFR header in downstream repos. (authored by sivachandra).

Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D87412

Files:
  libc/utils/MPFRWrapper/MPFRUtils.cpp


Index: libc/utils/MPFRWrapper/MPFRUtils.cpp
===================================================================
--- libc/utils/MPFRWrapper/MPFRUtils.cpp
+++ libc/utils/MPFRWrapper/MPFRUtils.cpp
@@ -15,10 +15,20 @@
 #include "llvm/ADT/StringRef.h"
 
 #include <memory>
-#include <mpfr.h>
 #include <stdint.h>
 #include <string>
 
+#ifdef CUSTOM_MPFR_INCLUDER
+// Some downstream repos are monoliths carrying MPFR sources in their third
+// party directory. In such repos, including the MPFR header as
+// `#include <mpfr.h>` is either disallowed or not possible. If that is the
+// case, a file named `CustomMPFRIncluder.h` should be added through which the
+// MPFR header can be included in manner allowed in that repo.
+#include "CustomMPFRIncluder.h"
+#else
+#include <mpfr.h>
+#endif
+
 template <typename T> using FPBits = __llvm_libc::fputil::FPBits<T>;
 
 namespace __llvm_libc {


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D87412.290811.patch
Type: text/x-patch
Size: 887 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libc-commits/attachments/20200909/061075f0/attachment.bin>


More information about the libc-commits mailing list