Repository: mesos Updated Branches: refs/heads/master 9dfc36b49 -> d863620e5
Added --disable-libtool-wrapper configuration to Mesos. This flag is used to force libtool to generate executables instead of wrapper scripts. A wrapper script might trigger relinking, which takes quite a while on slow machines, thus causing failure of tests. Review: https://reviews.apache.org/r/62661/ Project: http://git-wip-us.apache.org/repos/asf/mesos/repo Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/d863620e Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/d863620e Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/d863620e Branch: refs/heads/master Commit: d863620e5cb82b7f22cade0da0a0d18afbdf9136 Parents: 9dfc36b Author: Andrei Budnik <[email protected]> Authored: Wed Oct 4 08:00:09 2017 -0400 Committer: Alexander Rukletsov <[email protected]> Committed: Wed Oct 4 08:00:09 2017 -0400 ---------------------------------------------------------------------- configure.ac | 13 +++++++++++++ src/Makefile.am | 10 +++++++++- 2 files changed, 22 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/mesos/blob/d863620e/configure.ac ---------------------------------------------------------------------- diff --git a/configure.ac b/configure.ac index 92bc1aa..6fe11b6 100644 --- a/configure.ac +++ b/configure.ac @@ -231,6 +231,16 @@ AC_ARG_ENABLE([install-module-dependencies], for module development]), [], [enable_install_module_dependencies=no]) +AC_ARG_ENABLE([libtool-wrappers], + AS_HELP_STRING([--disable-libtool-wrappers], + [Directly create binaries instead of libtool + wrapper scripts to prevent relinking when first + executing binaries from the build directory. This + flag leads to binaries with the build directory + encoded in the executables' RPATH which makes them + in general unfit for installation. + USE WITH CARE.])) + AC_ARG_ENABLE([optimize], AS_HELP_STRING([--enable-optimize], [enable optimizations. If CFLAGS/CXXFLAGS are set, @@ -653,6 +663,9 @@ case "${target_os}" in AC_MSG_ERROR("Mesos is currently unsupported on your platform.") esac +AM_CONDITIONAL([DISABLE_LIBTOOL_WRAPPERS], + [test x"$enable_libtool_wrappers" = "xno"]) + # Used for conditionally including source files. AM_CONDITIONAL([OS_LINUX], [test "x$OS_NAME" = "xlinux"]) AM_CONDITIONAL([OS_FREEBSD], [test "x$OS_NAME" = "xfreebsd"]) http://git-wip-us.apache.org/repos/asf/mesos/blob/d863620e/src/Makefile.am ---------------------------------------------------------------------- diff --git a/src/Makefile.am b/src/Makefile.am index 1b23234..2b5b88d 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -82,6 +82,15 @@ LDADD = AM_LDFLAGS = +if DISABLE_LIBTOOL_WRAPPERS +# This is used to force libtool to generate executables instead of wrapper +# scripts. A wrapper script might trigger relinking, which takes quite a while +# on slow machines, thus causing failure of tests. +# NOTE: Disabling libtool wrapper should only be used when building a mesos to +# be tested within the build tree, see `info libtool` for details. +AM_LDFLAGS += -no-install +endif + # Use -Wl,--as-needed to AM_LDFLAGS since we link against all the # libraries programs may depend upon, not the exact one. --as-needed # causes the linker to only link to the ones a program actually uses, @@ -2546,7 +2555,6 @@ mesos_tests_SOURCES += \ mesos_tests_CPPFLAGS += $(JAVA_CPPFLAGS) mesos_tests_CPPFLAGS += -DZOOKEEPER_VERSION=\"$(ZOOKEEPER_VERSION)\" -mesos_tests_LDFLAGS = $(AM_LDFLAGS) mesos_tests_DEPENDENCIES += $(EXAMPLES_JAR) EXAMPLESCRIPTSJAVA = \
