Skip to content

Commit cc12216

Browse files
bwbarrettawlauria
authored andcommitted
Clean up wrapper flag docs in opal_mca
Clarify the behavior of the wrapper compiler flag handling in the opal_mca system, since it took me more than a couple of seconds to figure out what I meant in the previous version of the comments. Signed-off-by: Brian Barrett <bbarrett@amazon.com> (cherry picked from commit 72ac1b8)
1 parent e42a68e commit cc12216

File tree

1 file changed

+11
-6
lines changed

1 file changed

+11
-6
lines changed

config/opal_mca.m4

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -820,9 +820,10 @@ AC_MSG_ERROR([*** $2 component $3 was supposed to be direct-called, but
820820
# provide them for the final link of the application. Components
821821
# can explicitly set <framework>_<component>_WRAPPER_EXTRA_<flag>
822822
# for either LDFLAGS or LIBS, for cases where the component wants
823-
# to explicitly manage that behavior. If the full variable is not
824-
# defined, this macro will copy <framework>_<component>_<flag>
825-
# into the wrapper flags.
823+
# to explicitly manage which flags are passed to the wrapper
824+
# compiler. If the <framework>_<component>_WRAPPER_EXTRA_<flag>
825+
# variable is not set, then it is assumed that the component
826+
# wishes all LDFLAGS and LIBS to be provided as wrapper flags.
826827
AS_IF([test "$8" = "static"],
827828
[m4_foreach(flags, [LDFLAGS, LIBS],
828829
[m4_if(flags, [LIBS],
@@ -839,9 +840,13 @@ AC_MSG_ERROR([*** $2 component $3 was supposed to be direct-called, but
839840
])])
840841
841842
842-
# if needed, copy over WRAPPER_EXTRA_CPPFLAGS. Since a configure script
843-
# component can never be used in a STOP_AT_FIRST framework, we
844-
# don't have to implement the else clause in the literal check...
843+
# WRAPPER_EXTRA_CPPFLAGS are only needed for STOP_AT_FIRST
844+
# components, as all other components are not allowed to leak
845+
# headers or compile-time flags into the top-level library or
846+
# wrapper compilers. If needed, copy over WRAPPER_EXTRA_CPPFLAGS.
847+
# Since a configure script component can never be used in a
848+
# STOP_AT_FIRST framework, we don't have to implement the else
849+
# clause in the literal check.
845850
AS_LITERAL_IF([$3],
846851
[AS_IF([test "$$2_$3_WRAPPER_EXTRA_CPPFLAGS" != ""],
847852
[m4_if(OPAL_EVAL_ARG([MCA_$1_$2_CONFIGURE_MODE]), [STOP_AT_FIRST], [stop_at_first=1], [stop_at_first=0])

0 commit comments

Comments
 (0)