Bug 837618 - teach expandlibs_exec.py about OS X's -filelist linker option; r=glandium

This commit is contained in:
Nathan Froyd 2013-04-16 11:13:50 -04:00
Родитель 0e69d13800
Коммит 95b3000df9
4 изменённых файлов: 20 добавлений и 2 удалений

Просмотреть файл

@ -20,7 +20,13 @@ AC_CACHE_CHECK(what kind of list files are supported by the linker,
EXPAND_LIBS_LIST_STYLE=linkerscript
else
echo "conftest.${OBJ_SUFFIX}" > conftest.list
if AC_TRY_COMMAND(${CC-cc} -o conftest${ac_exeext} $LDFLAGS @conftest.list $LIBS 1>&5) && test -s conftest${ac_exeext}; then
dnl -filelist is for the OS X linker. We need to try -filelist
dnl first because clang understands @file, but may pass an
dnl oversized argument list to the linker depending on the
dnl contents of @file.
if AC_TRY_COMMAND(${CC-cc} -o conftest${ac_exeext} $LDFLAGS [-Wl,-filelist,conftest.list] $LIBS 1>&5) && test -s conftest${ac_exeext}; then
EXPAND_LIBS_LIST_STYLE=filelist
elif AC_TRY_COMMAND(${CC-cc} -o conftest${ac_exeext} $LDFLAGS @conftest.list $LIBS 1>&5) && test -s conftest${ac_exeext}; then
EXPAND_LIBS_LIST_STYLE=list
else
EXPAND_LIBS_LIST_STYLE=none

Просмотреть файл

@ -98,6 +98,9 @@ class ExpandArgsMore(ExpandArgs):
if conf.EXPAND_LIBS_LIST_STYLE == "linkerscript":
content = ['INPUT("%s")\n' % obj for obj in objs]
ref = tmp
elif conf.EXPAND_LIBS_LIST_STYLE == "filelist":
content = ["%s\n" % obj for obj in objs]
ref = "-Wl,-filelist," + tmp
elif conf.EXPAND_LIBS_LIST_STYLE == "list":
content = ["%s\n" % obj for obj in objs]
ref = "@" + tmp

Просмотреть файл

@ -20,7 +20,13 @@ AC_CACHE_CHECK(what kind of list files are supported by the linker,
EXPAND_LIBS_LIST_STYLE=linkerscript
else
echo "conftest.${OBJ_SUFFIX}" > conftest.list
if AC_TRY_COMMAND(${CC-cc} -o conftest${ac_exeext} $LDFLAGS @conftest.list $LIBS 1>&5) && test -s conftest${ac_exeext}; then
dnl -filelist is for the OS X linker. We need to try -filelist
dnl first because clang understands @file, but may pass an
dnl oversized argument list to the linker depending on the
dnl contents of @file.
if AC_TRY_COMMAND(${CC-cc} -o conftest${ac_exeext} $LDFLAGS [-Wl,-filelist,conftest.list] $LIBS 1>&5) && test -s conftest${ac_exeext}; then
EXPAND_LIBS_LIST_STYLE=filelist
elif AC_TRY_COMMAND(${CC-cc} -o conftest${ac_exeext} $LDFLAGS @conftest.list $LIBS 1>&5) && test -s conftest${ac_exeext}; then
EXPAND_LIBS_LIST_STYLE=list
else
EXPAND_LIBS_LIST_STYLE=none

Просмотреть файл

@ -98,6 +98,9 @@ class ExpandArgsMore(ExpandArgs):
if conf.EXPAND_LIBS_LIST_STYLE == "linkerscript":
content = ['INPUT("%s")\n' % obj for obj in objs]
ref = tmp
elif conf.EXPAND_LIBS_LIST_STYLE == "filelist":
content = ["%s\n" % obj for obj in objs]
ref = "-Wl,-filelist," + tmp
elif conf.EXPAND_LIBS_LIST_STYLE == "list":
content = ["%s\n" % obj for obj in objs]
ref = "@" + tmp