-
Alyssa Ross yazdı
macOS's linker can take a -filelist argument, in place of taking the list of object files to link on the command line. This is a more limited version of "response files" as used elsewhere in the code base, and by using it we make it far less likely that a linker invocation will hit ARG_MAX. A standard LibreOffice build probably won't hit ARG_MAX on macOS just yet, but it's not far off - some LDFLAGS are enough to tip it over the edge, which is what prompted me to fix the issue. If not fixed, a few more object files will probably break LibreOffice builds on macOS! An example of another large program that has encountered this issue is Thunderbird, which implemented the same fix[1]. The changes I've made to use -filelist are adapted from the code elsewhere in gbuild that creates response files, but this is slightly different because -filelist files are a bit different - they can only contain object files, as opposed to arbitrary linker arguments, and arguments are separated by newlines rather than spaces. [1]: https://bugzilla.mozilla.org/show_bug.cgi?id=837618 Change-Id: I01b9126aad95056c3dc82f941dea4fd43f95d0f2 Reviewed-on: https://gerrit.libreoffice.org/64010 Tested-by: Jenkins Reviewed-by: Michael Stahl <Michael.Stahl@cib.de>
ab9d95e6