Add cpuinfo-without-include-path-stripping target in preparation for depending on ruy depending on it. (Ruy's own third_party/ directory has that already, but due to dependency shadowing, when built as part of TF, it's overridden by the present file).
PiperOrigin-RevId: 314774544
diff --git a/ruy/BUILD b/ruy/BUILD
index 7fd2031..9fdfc10 100644
--- a/ruy/BUILD
+++ b/ruy/BUILD
@@ -340,7 +340,7 @@
] + select({
":ppc": [],
":fuchsia": [],
- "//conditions:default": ["@cpuinfo"],
+ "//conditions:default": ["@cpuinfo//:cpuinfo_with_unstripped_include_path"],
}),
)
diff --git a/ruy/cpuinfo.cc b/ruy/cpuinfo.cc
index 147cb17..db93754 100644
--- a/ruy/cpuinfo.cc
+++ b/ruy/cpuinfo.cc
@@ -11,7 +11,7 @@
#define RUY_HAVE_CPUINFO (!(RUY_PLATFORM_PPC || RUY_PLATFORM_FUCHSIA))
#if RUY_HAVE_CPUINFO
-#include <cpuinfo.h>
+#include "include/cpuinfo.h"
#endif
namespace ruy {
diff --git a/third_party/cpuinfo.BUILD b/third_party/cpuinfo.BUILD
index ad120de..85aa654 100644
--- a/third_party/cpuinfo.BUILD
+++ b/third_party/cpuinfo.BUILD
@@ -161,6 +161,16 @@
],
)
+cc_library(
+ name = "cpuinfo_with_unstripped_include_path",
+ hdrs = [
+ "include/cpuinfo.h",
+ ],
+ deps = [
+ ":cpuinfo_impl",
+ ],
+)
+
############################# Build configurations #############################
config_setting(