Merge pull request #26220 from wdirons:fix_hwloc_build_for_non_x86_platforms

PiperOrigin-RevId: 236378802
This commit is contained in:
TensorFlower Gardener 2019-03-01 14:55:42 -08:00
commit fc5a98c8e4
2 changed files with 18 additions and 7 deletions

View File

@ -227,7 +227,6 @@ cc_library(
"hwloc/topology-linux.c",
"hwloc/topology-noos.c",
"hwloc/topology-synthetic.c",
"hwloc/topology-x86.c",
"hwloc/topology-xml.c",
"hwloc/topology-xml-nolibxml.c",
"hwloc/traversal.c",
@ -236,13 +235,18 @@ cc_library(
"include/hwloc/shmem.h",
"include/private/autogen/config.h",
"include/private/components.h",
"include/private/cpuid-x86.h",
"include/private/debug.h",
"include/private/internal-components.h",
"include/private/misc.h",
"include/private/private.h",
"include/private/xml.h",
],
] + select({
"@org_tensorflow//tensorflow:linux_x86_64": [
"hwloc/topology-x86.c",
"include/private/cpuid-x86.h",
],
"//conditions:default": [],
}),
hdrs = [
"include/hwloc.h",
"include/hwloc/autogen/config.h",

View File

@ -18,9 +18,16 @@ limitations under the License.
#include <private/internal-components.h>
static const struct hwloc_component* hwloc_static_components[] = {
&hwloc_noos_component, &hwloc_xml_component,
&hwloc_synthetic_component, &hwloc_xml_nolibxml_component,
&hwloc_linux_component, &hwloc_linuxio_component,
&hwloc_x86_component, NULL};
&hwloc_noos_component,
&hwloc_xml_component,
&hwloc_synthetic_component,
&hwloc_xml_nolibxml_component,
&hwloc_linux_component,
&hwloc_linuxio_component,
#if defined(__x86_64__) || defined(__amd64__) || defined(_M_IX86) || \
defined(_M_X64)
&hwloc_x86_component,
#endif
NULL};
#endif // THIRD_PARTY_HWLOC_STATIC_COMPONENTS_H_