1*b6fb3261SAndroid Build Coastguard Worker# hwloc: Portable Hardware Locality Library 2*b6fb3261SAndroid Build Coastguard Worker 3*b6fb3261SAndroid Build Coastguard Workerpackage( 4*b6fb3261SAndroid Build Coastguard Worker default_visibility = ["//visibility:public"], 5*b6fb3261SAndroid Build Coastguard Worker) 6*b6fb3261SAndroid Build Coastguard Worker 7*b6fb3261SAndroid Build Coastguard Workerlicenses(["notice"]) 8*b6fb3261SAndroid Build Coastguard Worker 9*b6fb3261SAndroid Build Coastguard Workerexports_files(["COPYING"]) 10*b6fb3261SAndroid Build Coastguard Worker 11*b6fb3261SAndroid Build Coastguard Workerload("@local_config_cuda//cuda:build_defs.bzl", "if_cuda") 12*b6fb3261SAndroid Build Coastguard Workerload("@org_tensorflow//third_party:common.bzl", "template_rule") 13*b6fb3261SAndroid Build Coastguard Worker 14*b6fb3261SAndroid Build Coastguard WorkerCOMMON_INCLUDE_COPTS = [ 15*b6fb3261SAndroid Build Coastguard Worker "-I.", 16*b6fb3261SAndroid Build Coastguard Worker "-Ihwloc", 17*b6fb3261SAndroid Build Coastguard Worker "-Iinclude", 18*b6fb3261SAndroid Build Coastguard Worker] 19*b6fb3261SAndroid Build Coastguard Worker 20*b6fb3261SAndroid Build Coastguard WorkerDISABLE_WARNINGS_COPTS = [ 21*b6fb3261SAndroid Build Coastguard Worker "-Wno-vla", 22*b6fb3261SAndroid Build Coastguard Worker] 23*b6fb3261SAndroid Build Coastguard Worker 24*b6fb3261SAndroid Build Coastguard WorkerVAR_SETTINGS_COPTS = [ 25*b6fb3261SAndroid Build Coastguard Worker "-DHWLOC_DUMPED_HWDATA_DIR=", 26*b6fb3261SAndroid Build Coastguard Worker "-DRUNSTATEDIR=", 27*b6fb3261SAndroid Build Coastguard Worker] 28*b6fb3261SAndroid Build Coastguard Worker 29*b6fb3261SAndroid Build Coastguard Worker_INCLUDE_HWLOC_AUTOIGEN_CONFIG_H_COMMON_SUBS = { 30*b6fb3261SAndroid Build Coastguard Worker "#undef HWLOC_VERSION_MAJOR": "#define HWLOC_VERSION_MAJOR 2", 31*b6fb3261SAndroid Build Coastguard Worker "#undef HWLOC_VERSION_MINOR": "#define HWLOC_VERSION_MINOR 0", 32*b6fb3261SAndroid Build Coastguard Worker "#undef HWLOC_VERSION_RELEASE": "#define HWLOC_VERSION_RELEASE 3", 33*b6fb3261SAndroid Build Coastguard Worker "#undef HWLOC_VERSION_GREEK": "#define HWLOC_VERSION_GREEK \"\"", 34*b6fb3261SAndroid Build Coastguard Worker "#undef HWLOC_VERSION": "#define HWLOC_VERSION \"2.0.3\"", 35*b6fb3261SAndroid Build Coastguard Worker "#undef hwloc_pid_t": "#define hwloc_pid_t pid_t", 36*b6fb3261SAndroid Build Coastguard Worker "#undef hwloc_thread_t": "#define hwloc_thread_t pthread_t", 37*b6fb3261SAndroid Build Coastguard Worker "# undef HWLOC_HAVE_STDINT_H": "# define HWLOC_HAVE_STDINT_H 1", 38*b6fb3261SAndroid Build Coastguard Worker "#undef HWLOC_SYM_TRANSFORM": "#define HWLOC_SYM_TRANSFORM 0", 39*b6fb3261SAndroid Build Coastguard Worker "#undef HWLOC_SYM_PREFIX_CAPS": "#define HWLOC_SYM_PREFIX_CAPS HWLOC_", 40*b6fb3261SAndroid Build Coastguard Worker "#undef HWLOC_SYM_PREFIX": "#define HWLOC_SYM_PREFIX hwloc_", 41*b6fb3261SAndroid Build Coastguard Worker} 42*b6fb3261SAndroid Build Coastguard Worker 43*b6fb3261SAndroid Build Coastguard Worker_INCLUDE_HWLOC_AUTOIGEN_CONFIG_H_LINUX_SUBS = dict(_INCLUDE_HWLOC_AUTOIGEN_CONFIG_H_COMMON_SUBS) 44*b6fb3261SAndroid Build Coastguard Worker 45*b6fb3261SAndroid Build Coastguard Worker_INCLUDE_HWLOC_AUTOIGEN_CONFIG_H_LINUX_SUBS.update({ 46*b6fb3261SAndroid Build Coastguard Worker "#undef HWLOC_LINUX_SYS": "#define HWLOC_LINUX_SYS 1", 47*b6fb3261SAndroid Build Coastguard Worker}) 48*b6fb3261SAndroid Build Coastguard Worker 49*b6fb3261SAndroid Build Coastguard Workertemplate_rule( 50*b6fb3261SAndroid Build Coastguard Worker name = "include_hwloc_autogen_config_h", 51*b6fb3261SAndroid Build Coastguard Worker src = "include/hwloc/autogen/config.h.in", 52*b6fb3261SAndroid Build Coastguard Worker out = "include/hwloc/autogen/config.h", 53*b6fb3261SAndroid Build Coastguard Worker substitutions = select({ 54*b6fb3261SAndroid Build Coastguard Worker "@org_tensorflow//tensorflow:linux_x86_64": _INCLUDE_HWLOC_AUTOIGEN_CONFIG_H_LINUX_SUBS, 55*b6fb3261SAndroid Build Coastguard Worker "//conditions:default": _INCLUDE_HWLOC_AUTOIGEN_CONFIG_H_COMMON_SUBS, 56*b6fb3261SAndroid Build Coastguard Worker }), 57*b6fb3261SAndroid Build Coastguard Worker) 58*b6fb3261SAndroid Build Coastguard Worker 59*b6fb3261SAndroid Build Coastguard Worker_INCLUDE_PRIVATE_HWLOC_AUTOIGEN_CONFIG_H_COMMON_SUBS = { 60*b6fb3261SAndroid Build Coastguard Worker "#undef HAVE_CLOCK_GETTIME": "#define HAVE_CLOCK_GETTIME 1", 61*b6fb3261SAndroid Build Coastguard Worker "#undef HAVE_CTYPE_H": "#define HAVE_CTYPE_H 1", 62*b6fb3261SAndroid Build Coastguard Worker "#undef HAVE_DECL_CTL_HW": "#define HAVE_DECL_CTL_HW 0", 63*b6fb3261SAndroid Build Coastguard Worker "#undef HAVE_DECL_FABSF": "#define HAVE_DECL_FABSF 1", 64*b6fb3261SAndroid Build Coastguard Worker "#undef HAVE_DECL_GETEXECNAME": "#define HAVE_DECL_GETEXECNAME 0", 65*b6fb3261SAndroid Build Coastguard Worker "#undef HAVE_DECL_GETMODULEFILENAME": "#define HAVE_DECL_GETMODULEFILENAME 0", 66*b6fb3261SAndroid Build Coastguard Worker "#undef HAVE_DECL_GETPROGNAME": "#define HAVE_DECL_GETPROGNAME 0", 67*b6fb3261SAndroid Build Coastguard Worker "#undef HAVE_DECL_HW_NCPU": "#define HAVE_DECL_HW_NCPU 0", 68*b6fb3261SAndroid Build Coastguard Worker "#undef HAVE_DECL_MODFF": "#define HAVE_DECL_MODFF 1", 69*b6fb3261SAndroid Build Coastguard Worker "#undef HAVE_DECL_PTHREAD_GETAFFINITY_NP": "#define HAVE_DECL_PTHREAD_GETAFFINITY_NP 1", 70*b6fb3261SAndroid Build Coastguard Worker "#undef HAVE_DECL_PTHREAD_SETAFFINITY_NP": "#define HAVE_DECL_PTHREAD_SETAFFINITY_NP 1", 71*b6fb3261SAndroid Build Coastguard Worker "#undef HAVE_DECL_RUNNING_ON_VALGRIND": "#define HAVE_DECL_RUNNING_ON_VALGRIND 0", 72*b6fb3261SAndroid Build Coastguard Worker "#undef HAVE_DECL_SCHED_GETCPU": "#define HAVE_DECL_SCHED_GETCPU 1", 73*b6fb3261SAndroid Build Coastguard Worker "#undef HAVE_DECL_SNPRINTF": "#define HAVE_DECL_SNPRINTF 1", 74*b6fb3261SAndroid Build Coastguard Worker "#undef HAVE_DECL_STRTOULL": "#define HAVE_DECL_STRTOULL 1", 75*b6fb3261SAndroid Build Coastguard Worker "#undef HAVE_DECL__PUTENV": "#define HAVE_DECL__PUTENV 0", 76*b6fb3261SAndroid Build Coastguard Worker "#undef HAVE_DECL__SC_LARGE_PAGESIZE": "#define HAVE_DECL__SC_LARGE_PAGESIZE 0", 77*b6fb3261SAndroid Build Coastguard Worker "#undef HAVE_DECL__SC_NPROCESSORS_CONF": "#define HAVE_DECL__SC_NPROCESSORS_CONF 1", 78*b6fb3261SAndroid Build Coastguard Worker "#undef HAVE_DECL__SC_NPROCESSORS_ONLN": "#define HAVE_DECL__SC_NPROCESSORS_ONLN 1", 79*b6fb3261SAndroid Build Coastguard Worker "#undef HAVE_DECL__SC_NPROC_CONF": "#define HAVE_DECL__SC_NPROC_CONF 0", 80*b6fb3261SAndroid Build Coastguard Worker "#undef HAVE_DECL__SC_NPROC_ONLN": "#define HAVE_DECL__SC_NPROC_ONLN 0", 81*b6fb3261SAndroid Build Coastguard Worker "#undef HAVE_DECL__SC_PAGESIZE": "#define HAVE_DECL__SC_PAGESIZE 1", 82*b6fb3261SAndroid Build Coastguard Worker "#undef HAVE_DECL__SC_PAGE_SIZE": "#define HAVE_DECL__SC_PAGE_SIZE 1", 83*b6fb3261SAndroid Build Coastguard Worker "#undef HAVE_DECL__STRDUP": "#define HAVE_DECL__STRDUP 0", 84*b6fb3261SAndroid Build Coastguard Worker "#undef HAVE_DIRENT_H": "#define HAVE_DIRENT_H 1", 85*b6fb3261SAndroid Build Coastguard Worker "#undef HAVE_DLFCN_H": "#define HAVE_DLFCN_H 1", 86*b6fb3261SAndroid Build Coastguard Worker "#undef HAVE_FFSL": "#define HAVE_FFSL 1", 87*b6fb3261SAndroid Build Coastguard Worker "#undef HAVE_FFS": "#define HAVE_FFS 1", 88*b6fb3261SAndroid Build Coastguard Worker "#undef HAVE_GETPAGESIZE": "#define HAVE_GETPAGESIZE 1", 89*b6fb3261SAndroid Build Coastguard Worker "#undef HAVE_INTTYPES_H": "#define HAVE_INTTYPES_H 1", 90*b6fb3261SAndroid Build Coastguard Worker "#undef HAVE_LANGINFO_H": "#define HAVE_LANGINFO_H 1", 91*b6fb3261SAndroid Build Coastguard Worker "#undef HAVE_LOCALE_H": "#define HAVE_LOCALE_H 1", 92*b6fb3261SAndroid Build Coastguard Worker "#undef HAVE_MALLOC_H": "#define HAVE_MALLOC_H 1", 93*b6fb3261SAndroid Build Coastguard Worker "#undef HAVE_MEMALIGN": "#define HAVE_MEMALIGN 1", 94*b6fb3261SAndroid Build Coastguard Worker "#undef HAVE_MEMORY_H": "#define HAVE_MEMORY_H 1", 95*b6fb3261SAndroid Build Coastguard Worker "#undef HAVE_MKSTEMP": "#define HAVE_MKSTEMP 1", 96*b6fb3261SAndroid Build Coastguard Worker "#undef HAVE_NL_LANGINFO": "#define HAVE_NL_LANGINFO 1", 97*b6fb3261SAndroid Build Coastguard Worker "#undef HAVE_OPENAT": "#define HAVE_OPENAT 1", 98*b6fb3261SAndroid Build Coastguard Worker "#undef HAVE_POSIX_MEMALIGN": "#define HAVE_POSIX_MEMALIGN 1", 99*b6fb3261SAndroid Build Coastguard Worker "#undef HAVE_PTHREAD_T": "#define HAVE_PTHREAD_T 1", 100*b6fb3261SAndroid Build Coastguard Worker "#undef HAVE_PUTWC": "#define HAVE_PUTWC 1", 101*b6fb3261SAndroid Build Coastguard Worker "#undef HAVE_SETLOCALE": "#define HAVE_SETLOCALE 1", 102*b6fb3261SAndroid Build Coastguard Worker "#undef HAVE_SSIZE_T": "#define HAVE_SSIZE_T 1", 103*b6fb3261SAndroid Build Coastguard Worker "#undef HAVE_STDINT_H": "#define HAVE_STDINT_H 1", 104*b6fb3261SAndroid Build Coastguard Worker "#undef HAVE_STDLIB_H": "#define HAVE_STDLIB_H 1", 105*b6fb3261SAndroid Build Coastguard Worker "#undef HAVE_STRCASECMP": "#define HAVE_STRCASECMP 1", 106*b6fb3261SAndroid Build Coastguard Worker "#undef HAVE_STRFTIME": "#define HAVE_STRFTIME 1", 107*b6fb3261SAndroid Build Coastguard Worker "#undef HAVE_STRINGS_H": "#define HAVE_STRINGS_H 1", 108*b6fb3261SAndroid Build Coastguard Worker "#undef HAVE_STRING_H": "#define HAVE_STRING_H 1", 109*b6fb3261SAndroid Build Coastguard Worker "#undef HAVE_STRNCASECMP": "#define HAVE_STRNCASECMP 1", 110*b6fb3261SAndroid Build Coastguard Worker "#undef HAVE_SYS_MMAN_H": "#define HAVE_SYS_MMAN_H 1", 111*b6fb3261SAndroid Build Coastguard Worker "#undef HAVE_SYS_PARAM_H": "#define HAVE_SYS_PARAM_H 1", 112*b6fb3261SAndroid Build Coastguard Worker "#undef HAVE_SYS_STAT_H": "#define HAVE_SYS_STAT_H 1", 113*b6fb3261SAndroid Build Coastguard Worker "#undef HAVE_SYS_SYSCTL_H": "#define HAVE_SYS_SYSCTL_H 1", 114*b6fb3261SAndroid Build Coastguard Worker "#undef HAVE_SYS_TYPES_H": "#define HAVE_SYS_TYPES_H 1", 115*b6fb3261SAndroid Build Coastguard Worker "#undef HAVE_SYS_UTSNAME_H": "#define HAVE_SYS_UTSNAME_H 1", 116*b6fb3261SAndroid Build Coastguard Worker "#undef HAVE_TIME_H": "#define HAVE_TIME_H 1", 117*b6fb3261SAndroid Build Coastguard Worker "#undef HAVE_UNAME": "#define HAVE_UNAME 1", 118*b6fb3261SAndroid Build Coastguard Worker "#undef HAVE_UNISTD_H": "#define HAVE_UNISTD_H 1", 119*b6fb3261SAndroid Build Coastguard Worker "#undef HAVE_USELOCALE": "#define HAVE_USELOCALE 1", 120*b6fb3261SAndroid Build Coastguard Worker "#undef HAVE_WCHAR_T": "#define HAVE_WCHAR_T 1", 121*b6fb3261SAndroid Build Coastguard Worker "#undef HAVE_X11_KEYSYM_H": "#define HAVE_X11_KEYSYM_H 1", 122*b6fb3261SAndroid Build Coastguard Worker "#undef HAVE_X11_XLIB_H": "#define HAVE_X11_XLIB_H 1", 123*b6fb3261SAndroid Build Coastguard Worker "#undef HAVE_X11_XUTIL_H": "#define HAVE_X11_XUTIL_H 1", 124*b6fb3261SAndroid Build Coastguard Worker "#undef HAVE___PROGNAME": "#define HAVE___PROGNAME 1", 125*b6fb3261SAndroid Build Coastguard Worker "#undef HWLOC_C_HAVE_VISIBILITY": "#define HWLOC_C_HAVE_VISIBILITY 1", 126*b6fb3261SAndroid Build Coastguard Worker "#undef HWLOC_HAVE_ATTRIBUTE_ALIGNED": "#define HWLOC_HAVE_ATTRIBUTE_ALIGNED 1", 127*b6fb3261SAndroid Build Coastguard Worker "#undef HWLOC_HAVE_ATTRIBUTE_ALWAYS_INLINE": "#define HWLOC_HAVE_ATTRIBUTE_ALWAYS_INLINE 1", 128*b6fb3261SAndroid Build Coastguard Worker "#undef HWLOC_HAVE_ATTRIBUTE_COLD": "#define HWLOC_HAVE_ATTRIBUTE_COLD 1", 129*b6fb3261SAndroid Build Coastguard Worker "#undef HWLOC_HAVE_ATTRIBUTE_CONSTRUCTOR": "#define HWLOC_HAVE_ATTRIBUTE_CONSTRUCTOR 1", 130*b6fb3261SAndroid Build Coastguard Worker "#undef HWLOC_HAVE_ATTRIBUTE_CONST": "#define HWLOC_HAVE_ATTRIBUTE_CONST 1", 131*b6fb3261SAndroid Build Coastguard Worker "#undef HWLOC_HAVE_ATTRIBUTE_DEPRECATED": "#define HWLOC_HAVE_ATTRIBUTE_DEPRECATED 1", 132*b6fb3261SAndroid Build Coastguard Worker "#undef HWLOC_HAVE_ATTRIBUTE_FORMAT": "#define HWLOC_HAVE_ATTRIBUTE_FORMAT 1", 133*b6fb3261SAndroid Build Coastguard Worker "#undef HWLOC_HAVE_ATTRIBUTE_HOT": "#define HWLOC_HAVE_ATTRIBUTE_HOT 1", 134*b6fb3261SAndroid Build Coastguard Worker "#undef HWLOC_HAVE_ATTRIBUTE_MALLOC": "#define HWLOC_HAVE_ATTRIBUTE_MALLOC 1", 135*b6fb3261SAndroid Build Coastguard Worker "#undef HWLOC_HAVE_ATTRIBUTE_MAY_ALIAS": "#define HWLOC_HAVE_ATTRIBUTE_MAY_ALIAS 1", 136*b6fb3261SAndroid Build Coastguard Worker "#undef HWLOC_HAVE_ATTRIBUTE_NONNULL": "#define HWLOC_HAVE_ATTRIBUTE_NONNULL 1", 137*b6fb3261SAndroid Build Coastguard Worker "#undef HWLOC_HAVE_ATTRIBUTE_NORETURN": "#define HWLOC_HAVE_ATTRIBUTE_NORETURN 1", 138*b6fb3261SAndroid Build Coastguard Worker "#undef HWLOC_HAVE_ATTRIBUTE_NO_INSTRUMENT_FUNCTION": "#define HWLOC_HAVE_ATTRIBUTE_NO_INSTRUMENT_FUNCTION 1", 139*b6fb3261SAndroid Build Coastguard Worker "#undef HWLOC_HAVE_ATTRIBUTE_PACKED": "#define HWLOC_HAVE_ATTRIBUTE_PACKED 1", 140*b6fb3261SAndroid Build Coastguard Worker "#undef HWLOC_HAVE_ATTRIBUTE_PURE": "#define HWLOC_HAVE_ATTRIBUTE_PURE 1", 141*b6fb3261SAndroid Build Coastguard Worker "#undef HWLOC_HAVE_ATTRIBUTE_SENTINEL": "#define HWLOC_HAVE_ATTRIBUTE_SENTINEL 1", 142*b6fb3261SAndroid Build Coastguard Worker "#undef HWLOC_HAVE_ATTRIBUTE_UNUSED": "#define HWLOC_HAVE_ATTRIBUTE_UNUSED 1", 143*b6fb3261SAndroid Build Coastguard Worker "#undef HWLOC_HAVE_ATTRIBUTE_WARN_UNUSED_RESULT": "#define HWLOC_HAVE_ATTRIBUTE_WARN_UNUSED_RESULT 1", 144*b6fb3261SAndroid Build Coastguard Worker "#undef HWLOC_HAVE_ATTRIBUTE_WEAK_ALIAS": "#define HWLOC_HAVE_ATTRIBUTE_WEAK_ALIAS 1", 145*b6fb3261SAndroid Build Coastguard Worker "#undef HWLOC_HAVE_ATTRIBUTE": "#define HWLOC_HAVE_ATTRIBUTE 1", 146*b6fb3261SAndroid Build Coastguard Worker "#undef HWLOC_HAVE_CPU_SET_S": "#define HWLOC_HAVE_CPU_SET_S 1", 147*b6fb3261SAndroid Build Coastguard Worker "#undef HWLOC_HAVE_CPU_SET": "#define HWLOC_HAVE_CPU_SET 1", 148*b6fb3261SAndroid Build Coastguard Worker "#undef HWLOC_HAVE_DECL_FFSL": "#define HWLOC_HAVE_DECL_FFSL 1", 149*b6fb3261SAndroid Build Coastguard Worker "#undef HWLOC_HAVE_DECL_FFS": "#define HWLOC_HAVE_DECL_FFS 1", 150*b6fb3261SAndroid Build Coastguard Worker "#undef HWLOC_HAVE_DECL_STRCASECMP": "#define HWLOC_HAVE_DECL_STRCASECMP 1", 151*b6fb3261SAndroid Build Coastguard Worker "#undef HWLOC_HAVE_DECL_STRNCASECMP": "#define HWLOC_HAVE_DECL_STRNCASECMP 1", 152*b6fb3261SAndroid Build Coastguard Worker "#undef HWLOC_HAVE_FFSL": "#define HWLOC_HAVE_FFSL 1", 153*b6fb3261SAndroid Build Coastguard Worker "#undef HWLOC_HAVE_FFS": "#define HWLOC_HAVE_FFS 1", 154*b6fb3261SAndroid Build Coastguard Worker "#undef HWLOC_HAVE_LIBTERMCAP": "#define HWLOC_HAVE_LIBTERMCAP 1", 155*b6fb3261SAndroid Build Coastguard Worker "#undef HWLOC_HAVE_LINUXIO": "#define HWLOC_HAVE_LINUXIO 1", 156*b6fb3261SAndroid Build Coastguard Worker "#undef HWLOC_HAVE_PTHREAD_MUTEX": "#define HWLOC_HAVE_PTHREAD_MUTEX 1", 157*b6fb3261SAndroid Build Coastguard Worker "#undef HWLOC_HAVE_SCHED_SETAFFINITY": "#define HWLOC_HAVE_SCHED_SETAFFINITY 1", 158*b6fb3261SAndroid Build Coastguard Worker "#undef HWLOC_HAVE_STDINT_H": "#define HWLOC_HAVE_STDINT_H 1", 159*b6fb3261SAndroid Build Coastguard Worker "#undef HWLOC_HAVE_SYSCALL": "#define HWLOC_HAVE_SYSCALL 1", 160*b6fb3261SAndroid Build Coastguard Worker "#undef HWLOC_HAVE_X11_KEYSYM": "#define HWLOC_HAVE_X11_KEYSYM 1", 161*b6fb3261SAndroid Build Coastguard Worker "#undef HWLOC_HAVE_X86_CPUID": "#define HWLOC_HAVE_X86_CPUID 1", 162*b6fb3261SAndroid Build Coastguard Worker "#undef HWLOC_SIZEOF_UNSIGNED_INT": "#define HWLOC_SIZEOF_UNSIGNED_INT 4", 163*b6fb3261SAndroid Build Coastguard Worker "#undef HWLOC_SIZEOF_UNSIGNED_LONG": "#define HWLOC_SIZEOF_UNSIGNED_LONG 8", 164*b6fb3261SAndroid Build Coastguard Worker "#undef HWLOC_SYM_PREFIX_CAPS": "#define HWLOC_SYM_PREFIX_CAPS HWLOC_", 165*b6fb3261SAndroid Build Coastguard Worker "#undef HWLOC_SYM_PREFIX": "#define HWLOC_SYM_PREFIX hwloc_", 166*b6fb3261SAndroid Build Coastguard Worker "#undef HWLOC_SYM_TRANSFORM": "#define HWLOC_SYM_TRANSFORM 0", 167*b6fb3261SAndroid Build Coastguard Worker "#undef HWLOC_USE_NCURSES": "#define HWLOC_USE_NCURSES 1", 168*b6fb3261SAndroid Build Coastguard Worker "#undef HWLOC_VERSION_GREEK": "#define HWLOC_VERSION_GREEK \"\"", 169*b6fb3261SAndroid Build Coastguard Worker "#undef HWLOC_VERSION_MAJOR": "#define HWLOC_VERSION_MAJOR 2", 170*b6fb3261SAndroid Build Coastguard Worker "#undef HWLOC_VERSION_MINOR": "#define HWLOC_VERSION_MINOR 0", 171*b6fb3261SAndroid Build Coastguard Worker "#undef HWLOC_VERSION_RELEASE": "#define HWLOC_VERSION_RELEASE 3", 172*b6fb3261SAndroid Build Coastguard Worker "#undef HWLOC_VERSION": "#define HWLOC_VERSION \"2.0.3\"", 173*b6fb3261SAndroid Build Coastguard Worker "#undef HWLOC_X86_64_ARCH": "#define HWLOC_X86_64_ARCH 1", 174*b6fb3261SAndroid Build Coastguard Worker "#undef LT_OBJDIR": "#define LT_OBJDIR \".libs/\"", 175*b6fb3261SAndroid Build Coastguard Worker "#undef PACKAGE_BUGREPORT": "#define PACKAGE_BUGREPORT \"http://github.com/open-mpi/hwloc/issues", 176*b6fb3261SAndroid Build Coastguard Worker "#undef PACKAGE_NAME": "#define PACKAGE_NAME \"hwloc\"", 177*b6fb3261SAndroid Build Coastguard Worker "#undef PACKAGE_STRING": "#define PACKAGE_STRING \"hwloc 2.0.3\"", 178*b6fb3261SAndroid Build Coastguard Worker "#undef PACKAGE_TARNAME": "#define PACKAGE_TARNAME \"hwloc\"", 179*b6fb3261SAndroid Build Coastguard Worker "#undef PACKAGE_URL": "#define PACKAGE_URL \"\"", 180*b6fb3261SAndroid Build Coastguard Worker "#undef PACKAGE_VERSION": "#define PACKAGE_VERSION \"2.0.3\"", 181*b6fb3261SAndroid Build Coastguard Worker "#undef PACKAGE": "#define PACKAGE \"hwloc\"", 182*b6fb3261SAndroid Build Coastguard Worker "#undef SIZEOF_UNSIGNED_INT": "#define SIZEOF_UNSIGNED_INT 4", 183*b6fb3261SAndroid Build Coastguard Worker "#undef SIZEOF_UNSIGNED_LONG": "#define SIZEOF_UNSIGNED_LONG 8", 184*b6fb3261SAndroid Build Coastguard Worker "#undef SIZEOF_VOID_P": "#define SIZEOF_VOID_P 8", 185*b6fb3261SAndroid Build Coastguard Worker "#undef STDC_HEADERS": "#define STDC_HEADERS 1", 186*b6fb3261SAndroid Build Coastguard Worker "# undef _HPUX_SOURCE": "# define _HPUX_SOURCE 1", 187*b6fb3261SAndroid Build Coastguard Worker "# undef _ALL_SOURCE": "# define _ALL_SOURCE 1", 188*b6fb3261SAndroid Build Coastguard Worker "# undef _GNU_SOURCE": "# define _GNU_SOURCE 1", 189*b6fb3261SAndroid Build Coastguard Worker "# undef _POSIX_PTHREAD_SEMANTICS": "# define _POSIX_PTHREAD_SEMANTICS 1", 190*b6fb3261SAndroid Build Coastguard Worker "# undef _TANDEM_SOURCE": "# define _TANDEM_SOURCE 1", 191*b6fb3261SAndroid Build Coastguard Worker "# undef __EXTENSIONS__": "# define __EXTENSIONS__ 1", 192*b6fb3261SAndroid Build Coastguard Worker "#undef VERSION": "#define VERSION \"2.0.3\"", 193*b6fb3261SAndroid Build Coastguard Worker "#undef _HPUX_SOURCE": "#define _HPUX_SOURCE 1", 194*b6fb3261SAndroid Build Coastguard Worker "#undef hwloc_pid_t": "#define hwloc_pid_t pid_t", 195*b6fb3261SAndroid Build Coastguard Worker "#undef hwloc_thread_t": "#define hwloc_thread_t pthread_t", 196*b6fb3261SAndroid Build Coastguard Worker} 197*b6fb3261SAndroid Build Coastguard Worker 198*b6fb3261SAndroid Build Coastguard Worker_INCLUDE_PRIVATE_HWLOC_AUTOIGEN_CONFIG_H_CUDA_SUBS = { 199*b6fb3261SAndroid Build Coastguard Worker "#undef HAVE_CUDA_RUNTIME_API_H": "#define HAVE_CUDA_RUNTIME_API_H 1", 200*b6fb3261SAndroid Build Coastguard Worker "#undef HAVE_CUDA_H": "#define HAVE_CUDA_H 1", 201*b6fb3261SAndroid Build Coastguard Worker "#undef HAVE_CUDA": "#define HAVE_CUDA 1", 202*b6fb3261SAndroid Build Coastguard Worker} 203*b6fb3261SAndroid Build Coastguard Worker 204*b6fb3261SAndroid Build Coastguard Worker_INCLUDE_PRIVATE_HWLOC_AUTOIGEN_CONFIG_H_LINUX_SUBS = { 205*b6fb3261SAndroid Build Coastguard Worker "#undef HAVE_PROGRAM_INVOCATION_NAME": "#define HAVE_PROGRAM_INVOCATION_NAME 1", 206*b6fb3261SAndroid Build Coastguard Worker "#undef HWLOC_LINUX_SYS": "#define HWLOC_LINUX_SYS 1", 207*b6fb3261SAndroid Build Coastguard Worker} 208*b6fb3261SAndroid Build Coastguard Worker 209*b6fb3261SAndroid Build Coastguard Worker_INCLUDE_PRIVATE_HWLOC_AUTOIGEN_CONFIG_H_LINUX_SUBS.update(_INCLUDE_PRIVATE_HWLOC_AUTOIGEN_CONFIG_H_COMMON_SUBS) 210*b6fb3261SAndroid Build Coastguard Worker 211*b6fb3261SAndroid Build Coastguard Worker_INCLUDE_PRIVATE_HWLOC_AUTOIGEN_CONFIG_H_CUDA_SUBS.update(_INCLUDE_PRIVATE_HWLOC_AUTOIGEN_CONFIG_H_LINUX_SUBS) 212*b6fb3261SAndroid Build Coastguard Worker 213*b6fb3261SAndroid Build Coastguard Workertemplate_rule( 214*b6fb3261SAndroid Build Coastguard Worker name = "include_private_hwloc_autogen__config_h", 215*b6fb3261SAndroid Build Coastguard Worker src = "include/private/autogen/config.h.in", 216*b6fb3261SAndroid Build Coastguard Worker out = "include/private/autogen/config.h", 217*b6fb3261SAndroid Build Coastguard Worker substitutions = if_cuda( 218*b6fb3261SAndroid Build Coastguard Worker _INCLUDE_PRIVATE_HWLOC_AUTOIGEN_CONFIG_H_CUDA_SUBS, 219*b6fb3261SAndroid Build Coastguard Worker if_false = _INCLUDE_PRIVATE_HWLOC_AUTOIGEN_CONFIG_H_LINUX_SUBS, 220*b6fb3261SAndroid Build Coastguard Worker ), 221*b6fb3261SAndroid Build Coastguard Worker) 222*b6fb3261SAndroid Build Coastguard Worker 223*b6fb3261SAndroid Build Coastguard Workertemplate_rule( 224*b6fb3261SAndroid Build Coastguard Worker name = "move_static_components_h", 225*b6fb3261SAndroid Build Coastguard Worker src = "@org_tensorflow//third_party/hwloc:static-components.h", 226*b6fb3261SAndroid Build Coastguard Worker out = "hwloc/static-components.h", 227*b6fb3261SAndroid Build Coastguard Worker substitutions = {"&hwloc_linuxio_component": "//&hwloc_linuxio_component"}, 228*b6fb3261SAndroid Build Coastguard Worker) 229*b6fb3261SAndroid Build Coastguard Worker 230*b6fb3261SAndroid Build Coastguard Workercc_library( 231*b6fb3261SAndroid Build Coastguard Worker name = "hwloc", 232*b6fb3261SAndroid Build Coastguard Worker srcs = [ 233*b6fb3261SAndroid Build Coastguard Worker "hwloc/base64.c", 234*b6fb3261SAndroid Build Coastguard Worker "hwloc/bind.c", 235*b6fb3261SAndroid Build Coastguard Worker "hwloc/bitmap.c", 236*b6fb3261SAndroid Build Coastguard Worker "hwloc/components.c", 237*b6fb3261SAndroid Build Coastguard Worker "hwloc/cpukinds.c", 238*b6fb3261SAndroid Build Coastguard Worker "hwloc/diff.c", 239*b6fb3261SAndroid Build Coastguard Worker "hwloc/distances.c", 240*b6fb3261SAndroid Build Coastguard Worker "hwloc/memattrs.c", 241*b6fb3261SAndroid Build Coastguard Worker "hwloc/misc.c", 242*b6fb3261SAndroid Build Coastguard Worker "hwloc/pci-common.c", 243*b6fb3261SAndroid Build Coastguard Worker "hwloc/shmem.c", 244*b6fb3261SAndroid Build Coastguard Worker "hwloc/static-components.h", 245*b6fb3261SAndroid Build Coastguard Worker "hwloc/topology.c", 246*b6fb3261SAndroid Build Coastguard Worker "hwloc/topology-hardwired.c", 247*b6fb3261SAndroid Build Coastguard Worker "hwloc/topology-noos.c", 248*b6fb3261SAndroid Build Coastguard Worker "hwloc/topology-synthetic.c", 249*b6fb3261SAndroid Build Coastguard Worker "hwloc/topology-xml.c", 250*b6fb3261SAndroid Build Coastguard Worker "hwloc/topology-xml-nolibxml.c", 251*b6fb3261SAndroid Build Coastguard Worker "hwloc/traversal.c", 252*b6fb3261SAndroid Build Coastguard Worker "include/hwloc/plugins.h", 253*b6fb3261SAndroid Build Coastguard Worker "include/hwloc/shmem.h", 254*b6fb3261SAndroid Build Coastguard Worker "include/private/autogen/config.h", 255*b6fb3261SAndroid Build Coastguard Worker "include/private/components.h", 256*b6fb3261SAndroid Build Coastguard Worker "include/private/debug.h", 257*b6fb3261SAndroid Build Coastguard Worker "include/private/internal-components.h", 258*b6fb3261SAndroid Build Coastguard Worker "include/private/misc.h", 259*b6fb3261SAndroid Build Coastguard Worker "include/private/private.h", 260*b6fb3261SAndroid Build Coastguard Worker "include/private/xml.h", 261*b6fb3261SAndroid Build Coastguard Worker ] + select({ 262*b6fb3261SAndroid Build Coastguard Worker "@org_tensorflow//tensorflow:linux_x86_64": [ 263*b6fb3261SAndroid Build Coastguard Worker "hwloc/topology-linux.c", 264*b6fb3261SAndroid Build Coastguard Worker "include/hwloc/linux.h", 265*b6fb3261SAndroid Build Coastguard Worker "hwloc/topology-x86.c", 266*b6fb3261SAndroid Build Coastguard Worker "include/private/cpuid-x86.h", 267*b6fb3261SAndroid Build Coastguard Worker ], 268*b6fb3261SAndroid Build Coastguard Worker "@org_tensorflow//tensorflow:linux_aarch64": [ 269*b6fb3261SAndroid Build Coastguard Worker "hwloc/topology-linux.c", 270*b6fb3261SAndroid Build Coastguard Worker "include/hwloc/linux.h", 271*b6fb3261SAndroid Build Coastguard Worker ], 272*b6fb3261SAndroid Build Coastguard Worker "@org_tensorflow//tensorflow:linux_ppc64le": [ 273*b6fb3261SAndroid Build Coastguard Worker "hwloc/topology-linux.c", 274*b6fb3261SAndroid Build Coastguard Worker "include/hwloc/linux.h", 275*b6fb3261SAndroid Build Coastguard Worker ], 276*b6fb3261SAndroid Build Coastguard Worker "@org_tensorflow//tensorflow:freebsd": [ 277*b6fb3261SAndroid Build Coastguard Worker "hwloc/topology-freebsd.c", 278*b6fb3261SAndroid Build Coastguard Worker "hwloc/topology-x86.c", 279*b6fb3261SAndroid Build Coastguard Worker "include/private/cpuid-x86.h", 280*b6fb3261SAndroid Build Coastguard Worker ], 281*b6fb3261SAndroid Build Coastguard Worker "//conditions:default": [], 282*b6fb3261SAndroid Build Coastguard Worker }), 283*b6fb3261SAndroid Build Coastguard Worker hdrs = [ 284*b6fb3261SAndroid Build Coastguard Worker "include/hwloc.h", 285*b6fb3261SAndroid Build Coastguard Worker "include/hwloc/autogen/config.h", 286*b6fb3261SAndroid Build Coastguard Worker "include/hwloc/bitmap.h", 287*b6fb3261SAndroid Build Coastguard Worker "include/hwloc/cpukinds.h", 288*b6fb3261SAndroid Build Coastguard Worker "include/hwloc/deprecated.h", 289*b6fb3261SAndroid Build Coastguard Worker "include/hwloc/diff.h", 290*b6fb3261SAndroid Build Coastguard Worker "include/hwloc/distances.h", 291*b6fb3261SAndroid Build Coastguard Worker "include/hwloc/export.h", 292*b6fb3261SAndroid Build Coastguard Worker "include/hwloc/helper.h", 293*b6fb3261SAndroid Build Coastguard Worker "include/hwloc/inlines.h", 294*b6fb3261SAndroid Build Coastguard Worker "include/hwloc/memattrs.h", 295*b6fb3261SAndroid Build Coastguard Worker "include/hwloc/rename.h", 296*b6fb3261SAndroid Build Coastguard Worker ], 297*b6fb3261SAndroid Build Coastguard Worker copts = COMMON_INCLUDE_COPTS + DISABLE_WARNINGS_COPTS + VAR_SETTINGS_COPTS, 298*b6fb3261SAndroid Build Coastguard Worker features = [ 299*b6fb3261SAndroid Build Coastguard Worker "-parse_headers", 300*b6fb3261SAndroid Build Coastguard Worker "-layering_check", 301*b6fb3261SAndroid Build Coastguard Worker ], 302*b6fb3261SAndroid Build Coastguard Worker includes = [ 303*b6fb3261SAndroid Build Coastguard Worker "hwloc", 304*b6fb3261SAndroid Build Coastguard Worker "include", 305*b6fb3261SAndroid Build Coastguard Worker ], 306*b6fb3261SAndroid Build Coastguard Worker deps = [], 307*b6fb3261SAndroid Build Coastguard Worker) 308*b6fb3261SAndroid Build Coastguard Worker 309*b6fb3261SAndroid Build Coastguard Workercc_binary( 310*b6fb3261SAndroid Build Coastguard Worker name = "hwloc_print", 311*b6fb3261SAndroid Build Coastguard Worker srcs = ["hwloc_print.cc"], 312*b6fb3261SAndroid Build Coastguard Worker copts = COMMON_INCLUDE_COPTS, 313*b6fb3261SAndroid Build Coastguard Worker deps = [ 314*b6fb3261SAndroid Build Coastguard Worker ":hwloc", 315*b6fb3261SAndroid Build Coastguard Worker ], 316*b6fb3261SAndroid Build Coastguard Worker) 317