Remove extern crate linking workaround in mojo. [chromium/src : main]

7 views
Skip to first unread message

danakj (Gerrit)

unread,
Mar 9, 2022, 10:37:16 AM3/9/22
to rust...@chromium.org, Chromium LUCI CQ, Collin Baker, chromium...@chromium.org, Matthew Riley

Attention is currently required from: Collin Baker.

Patch set 2:Commit-Queue +1

View Change

1 comment:

To view, visit change 3513976. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: I442343d45a7da8bdfc41894cc7d07816e0d7afe2
Gerrit-Change-Number: 3513976
Gerrit-PatchSet: 2
Gerrit-Owner: danakj <dan...@chromium.org>
Gerrit-Reviewer: Collin Baker <colli...@chromium.org>
Gerrit-Reviewer: danakj <dan...@chromium.org>
Gerrit-CC: Matthew Riley <mat...@chromium.org>
Gerrit-Attention: Collin Baker <colli...@chromium.org>
Gerrit-Comment-Date: Wed, 09 Mar 2022 15:37:04 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment

danakj (Gerrit)

unread,
Mar 9, 2022, 10:42:21 AM3/9/22
to rust...@chromium.org

Attention is currently required from: Collin Baker.

danakj uploaded patch set #3 to this change.

View Change

Remove extern crate linking workaround in mojo.

Mojo was declaring `extern crate base` in order to ensure base's Rust
crate was linked into mojo_rust_extra_tests. We have improved the deps
and public_deps in the mixed_target GN templates however, and this is
no longer needed to link.

R=colli...@chromium.org

Bug: 1289742, 1296156
Change-Id: I442343d45a7da8bdfc41894cc7d07816e0d7afe2
Cq-Include-Trybots: luci.chromium.try:linux-rust-x64-rel,android-rust-arm-rel
---
M mojo/public/rust/lib.rs
1 file changed, 18 insertions(+), 4 deletions(-)

To view, visit change 3513976. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: I442343d45a7da8bdfc41894cc7d07816e0d7afe2
Gerrit-Change-Number: 3513976
Gerrit-PatchSet: 3
Gerrit-Owner: danakj <dan...@chromium.org>
Gerrit-Reviewer: Collin Baker <colli...@chromium.org>
Gerrit-Reviewer: danakj <dan...@chromium.org>
Gerrit-CC: Matthew Riley <mat...@chromium.org>
Gerrit-Attention: Collin Baker <colli...@chromium.org>
Gerrit-MessageType: newpatchset

Collin Baker (Gerrit)

unread,
Mar 9, 2022, 11:37:07 AM3/9/22
to danakj, rust...@chromium.org, Chromium LUCI CQ, chromium...@chromium.org, Matthew Riley

Attention is currently required from: danakj.

Patch set 3:Code-Review +1

View Change

    To view, visit change 3513976. To unsubscribe, or for help writing mail filters, visit settings.

    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: I442343d45a7da8bdfc41894cc7d07816e0d7afe2
    Gerrit-Change-Number: 3513976
    Gerrit-PatchSet: 3
    Gerrit-Owner: danakj <dan...@chromium.org>
    Gerrit-Reviewer: Collin Baker <colli...@chromium.org>
    Gerrit-Reviewer: danakj <dan...@chromium.org>
    Gerrit-CC: Matthew Riley <mat...@chromium.org>
    Gerrit-Attention: danakj <dan...@chromium.org>
    Gerrit-Comment-Date: Wed, 09 Mar 2022 16:36:57 +0000
    Gerrit-HasComments: No
    Gerrit-Has-Labels: Yes
    Gerrit-MessageType: comment

    danakj (Gerrit)

    unread,
    Mar 9, 2022, 2:14:59 PM3/9/22
    to rust...@chromium.org, Collin Baker, Chromium LUCI CQ, chromium...@chromium.org, Matthew Riley

    Patch set 5:Commit-Queue +2

    View Change

      To view, visit change 3513976. To unsubscribe, or for help writing mail filters, visit settings.

      Gerrit-Project: chromium/src
      Gerrit-Branch: main
      Gerrit-Change-Id: I442343d45a7da8bdfc41894cc7d07816e0d7afe2
      Gerrit-Change-Number: 3513976
      Gerrit-PatchSet: 5
      Gerrit-Owner: danakj <dan...@chromium.org>
      Gerrit-Reviewer: Collin Baker <colli...@chromium.org>
      Gerrit-Reviewer: danakj <dan...@chromium.org>
      Gerrit-CC: Matthew Riley <mat...@chromium.org>
      Gerrit-Comment-Date: Wed, 09 Mar 2022 19:14:45 +0000

      Chromium LUCI CQ (Gerrit)

      unread,
      Mar 9, 2022, 2:17:42 PM3/9/22
      to danakj, rust...@chromium.org, Collin Baker, chromium...@chromium.org, Matthew Riley

      Chromium LUCI CQ submitted this change.

      View Change



      3 is the latest approved patch-set.
      No files were changed between the latest approved patch-set and the submitted one.

      Approvals: Collin Baker: Looks good to me danakj: Commit
      Remove extern crate linking workaround in mojo.

      Mojo was declaring `extern crate base` in order to ensure base's Rust
      crate was linked into mojo_rust_extra_tests. We have improved the deps
      and public_deps in the mixed_target GN templates however, and this is
      no longer needed to link.

      R=colli...@chromium.org

      Bug: 1289742, 1296156
      Change-Id: I442343d45a7da8bdfc41894cc7d07816e0d7afe2
      Cq-Include-Trybots: luci.chromium.try:linux-rust-x64-rel,android-rust-arm-rel
      Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3513976
      Reviewed-by: Collin Baker <colli...@chromium.org>
      Commit-Queue: danakj <dan...@chromium.org>
      Cr-Commit-Position: refs/heads/main@{#979356}
      ---
      M mojo/public/rust/lib.rs
      1 file changed, 22 insertions(+), 4 deletions(-)

      diff --git a/mojo/public/rust/lib.rs b/mojo/public/rust/lib.rs
      index 0a5b825..dd506bf 100644
      --- a/mojo/public/rust/lib.rs
      +++ b/mojo/public/rust/lib.rs
      @@ -2,10 +2,6 @@
      // Use of this source code is governed by a BSD-style license that can be
      // found in the LICENSE file.

      -// Workaround for linkage bug for rust binary -> C++ component -> rust component
      -// dependency. TOOD(https://crbug.com/1289742): remove this after fix.
      -extern crate base;
      -
      #[macro_use]
      mod macros {
      /// This macro must be used at the top-level in any

      To view, visit change 3513976. To unsubscribe, or for help writing mail filters, visit settings.

      Gerrit-Project: chromium/src
      Gerrit-Branch: main
      Gerrit-Change-Id: I442343d45a7da8bdfc41894cc7d07816e0d7afe2
      Gerrit-Change-Number: 3513976
      Gerrit-PatchSet: 6
      Gerrit-Owner: danakj <dan...@chromium.org>
      Gerrit-Reviewer: Chromium LUCI CQ <chromiu...@luci-project-accounts.iam.gserviceaccount.com>
      Gerrit-Reviewer: Collin Baker <colli...@chromium.org>
      Gerrit-Reviewer: danakj <dan...@chromium.org>
      Gerrit-CC: Matthew Riley <mat...@chromium.org>
      Gerrit-MessageType: merged
      Reply all
      Reply to author
      Forward
      0 new messages