Skip to content

Commit 212f273

Browse files
committed
Run licence checks for cg_gcc and rust-analyzer
1 parent 4182d93 commit 212f273

File tree

1 file changed

+28
-1
lines changed

1 file changed

+28
-1
lines changed

src/tools/tidy/src/deps.rs

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,14 +43,21 @@ type ExceptionList = &'static [(&'static str, &'static str)];
4343
/// * A list of crates for which dependencies need to be explicitly allowed.
4444
/// * The list of allowed dependencies.
4545
const WORKSPACES: &[(&str, ExceptionList, Option<(&[&str], &[&str])>)] = &[
46+
// The root workspace has to be first for check_rustfix to work.
4647
("Cargo.toml", EXCEPTIONS, Some((&["rustc-main"], PERMITTED_RUSTC_DEPENDENCIES))),
47-
("src/tools/cargo/Cargo.toml", EXCEPTIONS_CARGO, None),
48+
// Outside of the alphabetical section because rustfmt formats it using multiple lines.
4849
(
4950
"compiler/rustc_codegen_cranelift/Cargo.toml",
5051
EXCEPTIONS_CRANELIFT,
5152
Some((&["rustc_codegen_cranelift"], PERMITTED_CRANELIFT_DEPENDENCIES)),
5253
),
54+
// tidy-alphabetical-start
55+
("compiler/rustc_codegen_gcc/Cargo.toml", EXCEPTIONS_GCC, None),
5356
("src/bootstrap/Cargo.toml", EXCEPTIONS_BOOTSTRAP, None),
57+
("src/tools/cargo/Cargo.toml", EXCEPTIONS_CARGO, None),
58+
("src/tools/rust-analyzer/Cargo.toml", EXCEPTIONS_RUST_ANALYZER, None),
59+
("src/tools/x/Cargo.toml", &[], None),
60+
// tidy-alphabetical-end
5461
];
5562

5663
/// These are exceptions to Rust's permissive licensing policy, and
@@ -100,6 +107,19 @@ const EXCEPTIONS_CARGO: ExceptionList = &[
100107
// tidy-alphabetical-end
101108
];
102109

110+
const EXCEPTIONS_RUST_ANALYZER: ExceptionList = &[
111+
// tidy-alphabetical-start
112+
("anymap", "BlueOak-1.0.0 OR MIT OR Apache-2.0"),
113+
("dissimilar", "Apache-2.0"),
114+
("instant", "BSD-3-Clause"),
115+
("notify", "CC0-1.0 OR Artistic-2.0"),
116+
("pulldown-cmark-to-cmark", "Apache-2.0"),
117+
("ryu", "Apache-2.0 OR BSL-1.0"),
118+
("scip", "Apache-2.0"),
119+
("snap", "BSD-3-Clause"),
120+
// tidy-alphabetical-end
121+
];
122+
103123
const EXCEPTIONS_CRANELIFT: ExceptionList = &[
104124
// tidy-alphabetical-start
105125
("cranelift-bforest", "Apache-2.0 WITH LLVM-exception"),
@@ -121,6 +141,13 @@ const EXCEPTIONS_CRANELIFT: ExceptionList = &[
121141
// tidy-alphabetical-end
122142
];
123143

144+
const EXCEPTIONS_GCC: ExceptionList = &[
145+
// tidy-alphabetical-start
146+
("gccjit", "GPL-3.0"),
147+
("gccjit_sys", "GPL-3.0"),
148+
// tidy-alphabetical-end
149+
];
150+
124151
const EXCEPTIONS_BOOTSTRAP: ExceptionList = &[
125152
("ryu", "Apache-2.0 OR BSL-1.0"), // through serde
126153
];

0 commit comments

Comments
 (0)