Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[cmake] split the archive process to avoid parameter too long problems #12964

Merged
merged 1 commit into from
Aug 18, 2024

Conversation

xuxin930
Copy link
Contributor

Summary

we split independent targets in cmake, which usually does not cause the problem of parameters too long
however, due to some platform-specific environment settings, it may not be enough.

I tried to use cmake to build in Msys2 on Windows and found that there were too many archive files of libc, causing the parameter to be too long.
This is because the bash command line of Msys2 is limited by the impression of Windows bridge, only 32k? (maybe), and it cannot be adjusted.

this patch fixes this issue.

refer to:https://cmake.org/cmake/help/latest/variable/CMAKE_LANG_ARCHIVE_APPEND.html

Impact

Testing

CI build

refer to:https://cmake.org/cmake/help/latest/variable/CMAKE_LANG_ARCHIVE_APPEND.html

this will solve the problem of too long parameters
when executing ar in cygwin environment such as msys.

Signed-off-by: xuxin19 <xuxin19@xiaomi.com>
@xiaoxiang781216 xiaoxiang781216 merged commit 9fdd299 into apache:master Aug 18, 2024
28 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants