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

objc-fully-link is not using -filelist and causes argument list too long error #13477

Closed
ashi009 opened this issue May 15, 2021 · 1 comment
Closed

Comments

@ashi009
Copy link
Contributor

ashi009 commented May 15, 2021

Description of the problem:

When using apple_static_library to link hundreds of objc_library targets, the linktool failed for the argument list too long.

Bugs: what's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.

  1. create hundreds of objc_library
  2. create an apple_static_library depend on them
  3. build the apple_static_library

What operating system are you running Bazel on?

macOS

What's the output of bazel info release?

release 3.6.0

Have you found anything relevant by searching the web?

objc-archive uses -filelist to pass objects to linker:

https://cs.opensource.google/bazel/bazel/+/master:src/test/java/com/google/devtools/build/lib/packages/util/mock/osx_cc_toolchain_config.bzl;l=2245-2274?q=obj_list_path&ss=bazel%2Fbazel

objc-fully-link uses argument list directly:

https://cs.opensource.google/bazel/bazel/+/master:src/test/java/com/google/devtools/build/lib/packages/util/mock/osx_cc_toolchain_config.bzl;l=4946-4985?q=obj_list_path&ss=bazel%2Fbazel

@ashi009
Copy link
Contributor Author

ashi009 commented May 15, 2021

It seems that #12265 has fixed this in 4.0. Closing accordingly.

@ashi009 ashi009 closed this as completed May 15, 2021
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

No branches or pull requests

1 participant