New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 777671 link

Starred by 1 user

Issue metadata

Status: Available
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: iOS
Pri: 3
Type: Bug



Sign in to add a comment

GN: lib deps propagation across toolchain

Project Member Reported by sdefresne@chromium.org, Oct 24 2017

Issue description

It looks like when doing fat builds, some deps propagate across toolchain when using ios_framework_bundle target $foo+bundle as can be observed with the following command:

$ ninja -C out/Debug-iphonesimulator -v \
  ios_clang_x86/obj/components/cronet/ios/test/x86/cronet_test
[1/1] TOOL_VERSION=1508804102 ../../build/toolchain/mac/linker_driver.py ../../third_party/llvm-build/Release+Asserts/bin/clang++  -Xlinker -rpath -Xlinker @executable_path/Frameworks -Xlinker -objc_abi_version -Xlinker 2 -Xlinker -sectcreate -Xlinker __TEXT -Xlinker __entitlements -Xlinker obj/components/cronet/ios/test/cronet_test.xcent -arch i386 -Werror -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.0.sdk -stdlib=libc++ -mios-simulator-version-min=9.0 -Wl,-ObjC -F gen/components/cronet/ios -Lgen/components/cronet/ios -o "ios_clang_x86/obj/components/cronet/ios/test/x86/cronet_test" -Wl,-filelist,"ios_clang_x86/obj/components/cronet/ios/test/x86/cronet_test.rsp"  -framework UIKit -framework CoreFoundation -framework CoreGraphics -framework CoreText -framework Foundation -framework Cronet -framework CFNetwork -framework MobileCoreServices -framework Security -framework SystemConfiguration -lresolv
ld: warning: ignoring file obj/components/grpc_support/grpc_support/bidirectional_stream_c.o, file was built for x86_64 which is not the architecture being linked (i386): obj/components/grpc_support/grpc_support/bidirectional_stream_c.o
ld: warning: ignoring file obj/components/grpc_support/grpc_support/bidirectional_stream.o, file was built for x86_64 which is not the architecture being linked (i386): obj/components/grpc_support/grpc_support/bidirectional_stream.o
ld: warning: ignoring file obj/net/constants/trace_constants.o, file was built for x86_64 which is not the architecture being linked (i386): obj/net/constants/trace_constants.o
ld: warning: ignoring file obj/base/libbase_static.a, file was built for archive which is not the architecture being linked (i386): obj/base/libbase_static.a
ld: warning: ignoring file obj/base/third_party/dynamic_annotations/libdynamic_annotations.a, file was built for archive which is not the architecture being linked (i386): obj/base/third_party/dynamic_annotations/libdynamic_annotations.a
ld: warning: ignoring file obj/third_party/modp_b64/libmodp_b64.a, file was built for archive which is not the architecture being linked (i386): obj/third_party/modp_b64/libmodp_b64.a
ld: warning: ignoring file obj/base/third_party/libevent/libevent.a, file was built for archive which is not the architecture being linked (i386): obj/base/third_party/libevent/libevent.a

If I remove the dependency on //components/cronet/ios:cronet_framework+link from //components/cronet/ios/test:cronet_test, then the error vanish (the build fail due to missing symbols, but this is expected). Looking at the .rsp file, I can see the following:

$ cat out/Debug-iphonesimulator/ios_clang_x86/obj/components/cronet/ios/test/x86/cronet_test.rsp
...
ios_clang_x86/obj/net/simple_quic_tools/quic_time_wait_list_manager.o
ios_clang_x86/obj/net/simple_quic_tools/stateless_rejector.o
ios_clang_x86/obj/net/simple_quic_tools/synchronous_host_resolver.o
obj/components/grpc_support/grpc_support/bidirectional_stream.o
obj/components/grpc_support/grpc_support/bidirectional_stream_c.o
obj/net/constants/trace_constants.o
...

So we try to link an binary for a secondary toolchain, but the dependency from primary toolchain leak out. This is probably due to the fact that the +link target do depends on both the primary and secondary target due to the "lipo" target. I'm not really sure how to prevent as we want the deps to work, but we'd like to avoid the libs to propagate.

Since it is a warning, this is not blocking, so leaving a Pri-3.
 
Components: Build
Owner: ----
Status: Available (was: Assigned)
Project Member

Comment 3 by sheriffbot@chromium.org, Jan 7

Labels: Hotlist-Recharge-Cold
Status: Untriaged (was: Available)
This issue has been Available for over a year. If it's no longer important or seems unlikely to be fixed, please consider closing it out. If it is important, please re-triage the issue.

Sorry for the inconvenience if the bug really should have been left as Available.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Status: Available (was: Untriaged)

Sign in to add a comment