Skip to content

Commit 0334ea1

Browse files
committed
utils/lstopo: don't build lstopo-win with MSVC
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, and we already remove -mwindows from lstopo-win if building with MSVC, so just disable lstopo-win instead of building both identically. Closes #631 Signed-off-by: Brice Goglin <[email protected]> (cherry picked from commit a2ee1db)
1 parent 8a21d90 commit 0334ea1

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

NEWS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,12 @@ Version 2.11.3
2222
* Fix Linux cpukind information when some CPUs are offline.
2323
* Don't report multiple local NUMA nodes in hwloc-calc on heterogeneous memory
2424
platforms when a single one is requested, broken since 2.9.
25+
* Fix lstopo build with Clang in MSVC format.
2526
* Split hwloc-calc.1 into more sections to dsitinguish output conversion,
2627
I/O set/object and formatting options.
2728

2829

30+
2931
Version 2.11.2
3032
--------------
3133
* Add missing CPU info attrs on aarch64 on Linux.

utils/lstopo/Makefile.am

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright © 2009-2023 Inria. All rights reserved.
1+
# Copyright © 2009-2024 Inria. All rights reserved.
22
# Copyright © 2009-2012, 2014 Université Bordeaux
33
# Copyright © 2009-2014 Cisco Systems, Inc. All rights reserved.
44
# Copyright © 2020 Hewlett Packard Enterprise. All rights reserved.
@@ -52,7 +52,12 @@ lstopo_CFLAGS = $(lstopo_no_graphics_CFLAGS) $(HWLOC_CAIRO_CFLAGS)
5252
lstopo_LDADD += $(HWLOC_CAIRO_LIBS) $(HWLOC_X11_LIBS)
5353
endif
5454
if HWLOC_HAVE_WINDOWS
55-
bin_PROGRAMS += lstopo lstopo-win
55+
bin_PROGRAMS += lstopo
56+
if !HWLOC_HAVE_MSVC
57+
# only build lstopo-win if NOT building with MSVC (or Clang in MSVC mode) because
58+
# MSVC doesn't support -mwindows, and lstopo-win would be identical to lstopo
59+
bin_PROGRAMS += lstopo-win
60+
endif
5661
lstopo_SOURCES += lstopo-windows.c
5762
lstopo_CPPFLAGS += -DLSTOPO_HAVE_GRAPHICS
5863
if HWLOC_HAVE_USER32

0 commit comments

Comments
 (0)