You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[roll] Roll fuchsia Revert "[build][rust] Support #[link] directives properly."
This reverts commit 9d05b8763f7185860158de6b5f3436e37ccb68f5.
Reason for revert: Possibly breaking sdk builders, see https://chat.google.com/room/AAAABFiUm4o/S1-ARl6a68U
Original change's description:
> [build][rust] Support #[link] directives properly.
>
> This CL adds a new GN template named rustc_link_directive()
> that is necessary to support Rust `#[link(name = "foo")]`
> when using newer version of GN.
>
> GN changed the way it handles Rust -> C++ dependencies, to
> avoid incorrect incremental linking when stale libraries are
> in the build directory, for full details see
> https://bugs.chromium.org/p/gn/issues/detail?id=370
>
> This CL contains fixes for the Fuchsia build rules to allow
> link directives to work properly. Without this, trying to
> use/roll the newest GN binary into the tree fails with
> linking errors (see associated bug for example).
>
> When the source code of a Rust crate contains a link directive,
> the corresponding GN target must now depend on a matching
> rustc_link_directive(), which encapsulate the dependency to
> the real library, and provides enough information to the build
> to ensure everything works correctly.
>
> This CL modifies all BUILD.gn files for such targets + performs
> minor cleanups in some of the directives.
>
> Submitting this CL should unblock the gn-prebuilt-roller whose
> builds are currently blocked by linker errors (see tqr/851211
> for an example).
>
> Original-Bug: 343927812
> Original-Reviewed-on: https://fuchsia-review.googlesource.com/c/fuchsia/+/1058435
Original-Bug: 343927812
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Original-Reviewed-on: https://fuchsia-review.googlesource.com/c/fuchsia/+/1069252
Original-Revision: d27abc63d4014f2762a9aa61157a5745fc9c720b
GitOrigin-RevId: 227bea26a28a321aa576a862464a0ee6c5286c91
Change-Id: I6da35671c1c66828bd06f19fd1421889883ee78e
0 commit comments