summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile.config.in3
-rw-r--r--Makefile.rules4
-rw-r--r--autoconf/configure.ac11
3 files changed, 18 insertions, 0 deletions
diff --git a/Makefile.config.in b/Makefile.config.in
index 5c73758063..9bdb07563f 100644
--- a/Makefile.config.in
+++ b/Makefile.config.in
@@ -123,6 +123,9 @@ TARGET_TRIPLE=@target@
# Extra options to compile LLVM with
EXTRA_OPTIONS=@EXTRA_OPTIONS@
+# Extra options to link LLVM with
+EXTRA_LD_OPTIONS=@EXTRA_LD_OPTIONS@
+
# Endian-ness of the target
ENDIAN=@ENDIAN@
diff --git a/Makefile.rules b/Makefile.rules
index 71d4307aba..162fd23552 100644
--- a/Makefile.rules
+++ b/Makefile.rules
@@ -582,6 +582,10 @@ endif
# Options To Invoke Tools
#----------------------------------------------------------
+ifdef EXTRA_LD_OPTIONS
+LD.Flags += $(EXTRA_LD_OPTIONS)
+endif
+
ifndef NO_PEDANTIC
CompileCommonOpts += -pedantic -Wno-long-long
endif
diff --git a/autoconf/configure.ac b/autoconf/configure.ac
index 3d2faa3f2d..a39a6857c2 100644
--- a/autoconf/configure.ac
+++ b/autoconf/configure.ac
@@ -831,6 +831,17 @@ case "$withval" in
esac
AC_SUBST(EXTRA_OPTIONS,$EXTRA_OPTIONS)
+dnl Specify extra linker build options
+AC_ARG_WITH(extra-ld-options,
+ AS_HELP_STRING([--with-extra-ld-options],
+ [Specify additional options to link LLVM with]),,
+ withval=default)
+case "$withval" in
+ default) EXTRA_LD_OPTIONS= ;;
+ *) EXTRA_LD_OPTIONS=$withval ;;
+esac
+AC_SUBST(EXTRA_LD_OPTIONS,$EXTRA_LD_OPTIONS)
+
dnl Allow specific bindings to be specified for building (or not)
AC_ARG_ENABLE([bindings],AS_HELP_STRING([--enable-bindings],
[Build specific language bindings: all,auto,none,{binding-name} (default=auto)]),,