build/configure: Add support for --with-extra-ld-options flag (to provide extra
authorDaniel Dunbar <daniel@zuster.org>
Thu, 16 Jun 2011 22:30:38 +0000 (22:30 +0000)
committerDaniel Dunbar <daniel@zuster.org>
Thu, 16 Jun 2011 22:30:38 +0000 (22:30 +0000)
options just to pass to ld).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133206 91177308-0d34-0410-b5e6-96231b3b80d8

Makefile.config.in
Makefile.rules
autoconf/configure.ac

index 5c737580632ea5c0456c8ddbba3ce7f2fa0b606b..9bdb07563f545f5cc4ea05ec91da386990d96782 100644 (file)
@@ -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@
 
index 71d4307abae0bbd08f963c00ff5a4726550b29e5..162fd235522f83059437ce3f5aa066f2d017655b 100644 (file)
@@ -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
index 3d2faa3f2db4720a0434cf5724d95dfba4420aad..a39a6857c26bd7c2e4b96c77ee043c2403334a20 100644 (file)
@@ -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)]),,