Skip to content

Commit

Permalink
utils/lstopo: don't build lstopo-win with MSVC
Browse files Browse the repository at this point in the history
Clang can be used in "MSVC mode" to build hwloc using autotools.
That mode doesn't support -mwindows just like MSVC doesn't.
-mwindows is the only difference between lstopo-win and lstopo,
so just disable lstopo-win instead of building both identically.

Closes #631

Signed-off-by: Brice Goglin <Brice.Goglin@inria.fr>
  • Loading branch information
bgoglin committed Oct 24, 2023
1 parent fed97f6 commit 704e71d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
1 change: 1 addition & 0 deletions config/hwloc.m4
Expand Up @@ -1789,6 +1789,7 @@ AC_DEFUN([HWLOC_DO_AM_CONDITIONALS],[
AM_CONDITIONAL([HWLOC_BUILD_STANDALONE], [test "$hwloc_mode" = "standalone"])
AM_CONDITIONAL([HWLOC_HAVE_GCC], [test "x$GCC" = "xyes"])
AM_CONDITIONAL([HWLOC_HAVE_MSVC], [test "$hwloc_c_vendor" = "microsoft"])
AM_CONDITIONAL([HWLOC_HAVE_MS_LIB], [test "x$HWLOC_MS_LIB" != "x"])
AM_CONDITIONAL([HWLOC_HAVE_OPENAT], [test "x$hwloc_have_openat" = "xyes"])
AM_CONDITIONAL([HWLOC_HAVE_SCHED_SETAFFINITY],
Expand Down
7 changes: 5 additions & 2 deletions utils/lstopo/Makefile.am
@@ -1,4 +1,4 @@
# Copyright © 2009-2020 Inria. All rights reserved.
# Copyright © 2009-2023 Inria. All rights reserved.
# Copyright © 2009-2012, 2014 Université Bordeaux
# Copyright © 2009-2014 Cisco Systems, Inc. All rights reserved.
# Copyright © 2020 Hewlett Packard Enterprise. All rights reserved.
Expand Down Expand Up @@ -60,7 +60,10 @@ lstopo_LDADD += -luser32
endif
lstopo_win_SOURCES = $(lstopo_SOURCES)
lstopo_win_CPPFLAGS = $(lstopo_CPPFLAGS)
lstopo_win_CFLAGS = $(lstopo_CFLAGS) -mwindows
lstopo_win_CFLAGS = $(lstopo_CFLAGS)
if !HWLOC_HAVE_MSVC
lstopo_win_CFLAGS += -mwindows
endif
lstopo_win_LDADD = $(lstopo_LDADD)
endif

Expand Down

0 comments on commit 704e71d

Please sign in to comment.