Skip to content

Commit 72ac1b8

Browse files
committed
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>
1 parent 032e871 commit 72ac1b8

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
@@ -836,9 +836,10 @@ AC_MSG_ERROR([*** $2 component $3 was supposed to be direct-called, but
836836
# provide them for the final link of the application. Components
837837
# can explicitly set <framework>_<component>_WRAPPER_EXTRA_<flag>
838838
# for either LDFLAGS or LIBS, for cases where the component wants
839-
# to explicitly manage that behavior. If the full variable is not
840-
# defined, this macro will copy <framework>_<component>_<flag>
841-
# into the wrapper flags.
839+
# to explicitly manage which flags are passed to the wrapper
840+
# compiler. If the <framework>_<component>_WRAPPER_EXTRA_<flag>
841+
# variable is not set, then it is assumed that the component
842+
# wishes all LDFLAGS and LIBS to be provided as wrapper flags.
842843
AS_IF([test "$8" = "static"],
843844
[m4_foreach(flags, [LDFLAGS, LIBS],
844845
[m4_if(flags, [LIBS],
@@ -855,9 +856,13 @@ AC_MSG_ERROR([*** $2 component $3 was supposed to be direct-called, but
855856
])])
856857
857858
858-
# if needed, copy over WRAPPER_EXTRA_CPPFLAGS. Since a configure script
859-
# component can never be used in a STOP_AT_FIRST framework, we
860-
# don't have to implement the else clause in the literal check...
859+
# WRAPPER_EXTRA_CPPFLAGS are only needed for STOP_AT_FIRST
860+
# components, as all other components are not allowed to leak
861+
# headers or compile-time flags into the top-level library or
862+
# wrapper compilers. If needed, copy over WRAPPER_EXTRA_CPPFLAGS.
863+
# Since a configure script component can never be used in a
864+
# STOP_AT_FIRST framework, we don't have to implement the else
865+
# clause in the literal check.
861866
AS_LITERAL_IF([$3],
862867
[AS_IF([test "$$2_$3_WRAPPER_EXTRA_CPPFLAGS" != ""],
863868
[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)