-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[cargo-gnaw] Tweak tests to fix cargo roll
In rust-lang/cargo#10243, cargo was changed to disallow crate-types that produce the same filename. This can happen with `lib` and `rlib`, or `dylib` and `cdylib`. This changes the `multiple_crate_type` to split out these into multiple sub-crates. Note that because cargo-gnaw currently only supports generating rules for `lib` types, we don't produce anything for the `sub-crate-with-rlib`. Change-Id: Id1c15e884de228f9024a6df1fc315e03a4a33bb4 Reviewed-on: https://fuchsia-review.googlesource.com/c/fuchsia/+/637408 Fuchsia-Auto-Submit: Erick Tryzelaar <etryzelaar@google.com> Reviewed-by: Adam Perry <adamperry@google.com> Commit-Queue: Auto-Submit <auto-submit@fuchsia-infra.iam.gserviceaccount.com>
- Loading branch information
Showing
11 changed files
with
88 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
...multiple_crate_types/sub-crate/Cargo.toml → ...te_types/sub-crate-with-cdylib/Cargo.toml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
[package] | ||
name = "sub-crate" | ||
name = "sub-crate-with-cdylib" | ||
version = "1.0.25" | ||
authors = ["Erick Tryzelaar <etryzelaar@google.com>"] | ||
edition = "2018" | ||
|
||
[lib] | ||
crate-type = ["lib", "rlib", "staticlib", "dylib", "cdylib"] | ||
crate-type = ["cdylib", "lib", "staticlib"] |
File renamed without changes.
8 changes: 8 additions & 0 deletions
8
tools/cargo-gnaw/tests/multiple_crate_types/sub-crate-with-dylib/Cargo.toml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
[package] | ||
name = "sub-crate-with-dylib" | ||
version = "1.0.25" | ||
authors = ["Erick Tryzelaar <etryzelaar@google.com>"] | ||
edition = "2018" | ||
|
||
[lib] | ||
crate-type = ["dylib", "lib", "staticlib"] |
7 changes: 7 additions & 0 deletions
7
tools/cargo-gnaw/tests/multiple_crate_types/sub-crate-with-dylib/src/lib.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
// Copyright 2020 The Fuchsia Authors. All rights reserved. | ||
// Use of this source code is governed by a BSD-style license that can be | ||
// found in the LICENSE file. | ||
|
||
// no-op | ||
// hello there | ||
pub const EXPORTED: u32 = 777; |
8 changes: 8 additions & 0 deletions
8
tools/cargo-gnaw/tests/multiple_crate_types/sub-crate-with-rlib/Cargo.toml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
[package] | ||
name = "sub-crate-with-rlib" | ||
version = "1.0.25" | ||
authors = ["Erick Tryzelaar <etryzelaar@google.com>"] | ||
edition = "2018" | ||
|
||
[lib] | ||
crate-type = ["rlib", "staticlib"] |
7 changes: 7 additions & 0 deletions
7
tools/cargo-gnaw/tests/multiple_crate_types/sub-crate-with-rlib/src/lib.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
// Copyright 2020 The Fuchsia Authors. All rights reserved. | ||
// Use of this source code is governed by a BSD-style license that can be | ||
// found in the LICENSE file. | ||
|
||
// no-op | ||
// hello there | ||
pub const EXPORTED: u32 = 777; |