mirror of
https://github.com/curl/curl.git
synced 2024-11-21 01:16:58 +08:00
autotools: accept linker flags via CURL_LDFLAGS_{LIB,BIN}
To allow passing `LDFLAGS` specific to libcurl (`CURL_LDFLAGS_LIB`) and curl tool (`CURL_LDFLAGS_BIN`). This makes it possible to build libcurl and curl with a single invocation with lib- and tool-specific custom linker flags. Such flag can be enabling `.map` files, a `.def` file for libcurl DLL, controlling static/shared, incl. requesting a static curl tool (with `-static-libtool-libs`) while building both shared and static libcurl. curl-for-win uses the above and some more. These options are already supported in `Makefile.mk`. CMake has built-in variables for this. Closes #12312
This commit is contained in:
parent
efbbbf4f7a
commit
b365a34c60
@ -110,7 +110,7 @@ libcurl_la_CFLAGS_EXTRA += $(CFLAG_CURL_SYMBOL_HIDING)
|
||||
endif
|
||||
|
||||
libcurl_la_CPPFLAGS = $(AM_CPPFLAGS) $(libcurl_la_CPPFLAGS_EXTRA)
|
||||
libcurl_la_LDFLAGS = $(AM_LDFLAGS) $(libcurl_la_LDFLAGS_EXTRA) $(LDFLAGS) $(LIBCURL_LIBS)
|
||||
libcurl_la_LDFLAGS = $(AM_LDFLAGS) $(libcurl_la_LDFLAGS_EXTRA) $(LDFLAGS) $(CURL_LDFLAGS_LIB) $(LIBCURL_LIBS)
|
||||
libcurl_la_CFLAGS = $(AM_CFLAGS) $(libcurl_la_CFLAGS_EXTRA)
|
||||
|
||||
libcurlu_la_CPPFLAGS = $(AM_CPPFLAGS) -DCURL_STATICLIB -DUNITTESTS
|
||||
|
@ -61,6 +61,8 @@ curl_SOURCES += $(CURL_RCFILES)
|
||||
$(CURL_RCFILES): tool_version.h
|
||||
endif
|
||||
|
||||
curl_LDFLAGS = $(AM_LDFLAGS) $(CURL_LDFLAGS_BIN)
|
||||
|
||||
# This might hold -Werror
|
||||
CFLAGS += @CURL_CFLAG_EXTRAS@
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user