Skip to content

Commit 6ed7870

Browse files
John Huggmeta-codesync[bot]
authored andcommitted
Fix Automake parsing of fbthrift link group
Summary: The OSS GitHub build still failed during `autoreconf` after D113608290 because Automake classifies literal `-Wl,--start-group` and `-Wl,--end-group` tokens in `LDADD` as misplaced linker flags. Build the linker-driver tokens through a Make variable instead. This keeps the group delimiters in `LDADD`, where they continue to surround the static fbthrift libraries, while avoiding Automake declaration-time classification errors. Reviewed By: anidev Differential Revision: D114285182 fbshipit-source-id: 42a14ed2ef518f9444046a5cc4fa09c2d252961b
1 parent 05fee44 commit 6ed7870

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

mcrouter/lib/network/test/Makefile.am

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,12 @@ noinst_PROGRAMS = mock_mc_server
77
noinst_LIBRARIES = libtest_util.a
88
check_PROGRAMS = mcrouter_network_test
99

10+
# Keep the group delimiters in LDADD so they surround the static libraries.
11+
# Splitting the driver prefix prevents Automake from misclassifying them as
12+
# target LDFLAGS, which would be emitted before LDADD and break the grouping.
13+
FBTHRIFT_LINKER_DRIVER_FLAG = -Wl
1014
FBTHRIFT_STATIC_LIBS = \
11-
-Wl,--start-group \
15+
$(FBTHRIFT_LINKER_DRIVER_FLAG),--start-group \
1216
-lthriftcpp2 \
1317
-lserverdbginfo \
1418
-ltransport \
@@ -25,7 +29,7 @@ FBTHRIFT_STATIC_LIBS = \
2529
-lruntime \
2630
-lthrift-core \
2731
-lcommon \
28-
-Wl,--end-group
32+
$(FBTHRIFT_LINKER_DRIVER_FLAG),--end-group
2933

3034
mock_mc_server_SOURCES = \
3135
MockMc.cpp \

0 commit comments

Comments
 (0)