We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
llvm_components_contain
run-make-support
1 parent 5c8459f commit 740833eCopy full SHA for 740833e
src/tools/run-make-support/src/lib.rs
@@ -429,6 +429,13 @@ pub fn assert_not_contains(haystack: &str, needle: &str) {
429
}
430
431
432
+/// Check that `component` is in the `LLVM_COMPONENTS` variable.
433
+pub fn llvm_components_contain(component: &str) -> bool {
434
+ let llvm_components = env_var("LLVM_COMPONENTS");
435
+ // llvm_components is a list of space-separated words
436
+ format!(" {llvm_components} ").contains(&format!(" {component} "))
437
+}
438
+
439
/// This function is designed for running commands in a temporary directory
440
/// that is cleared after the function ends.
441
///
0 commit comments