diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2024-07-18 08:08:59 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-07-18 08:08:59 +0200 |
| commit | 2013bf9077b5cf43326fc29ee2fb5f8c0784a171 (patch) | |
| tree | d868720cdf27140f195a61028ad47277344678f4 /src | |
| parent | 97d5edf4b1c31c0657f760c20f8388f2c2196d00 (diff) | |
| parent | a8b6e3f5c9a9addf320f34e33422043ac682aa91 (diff) | |
| download | rust-2013bf9077b5cf43326fc29ee2fb5f8c0784a171.tar.gz rust-2013bf9077b5cf43326fc29ee2fb5f8c0784a171.zip | |
Rollup merge of #127787 - Rejyr:migrate-atomic-lock-free-rmake, r=jieyouxu
Migrate `atomic-lock-free` to `rmake` Also adds `llvm_components_contain` to `run-make-support`. Part of #121876. r? ``@jieyouxu`` try-job: dist-x86_64-linux
Diffstat (limited to 'src')
| -rw-r--r-- | src/tools/run-make-support/src/lib.rs | 2 | ||||
| -rw-r--r-- | src/tools/run-make-support/src/targets.rs | 7 | ||||
| -rw-r--r-- | src/tools/tidy/src/allowed_run_make_makefiles.txt | 1 |
3 files changed, 8 insertions, 2 deletions
diff --git a/src/tools/run-make-support/src/lib.rs b/src/tools/run-make-support/src/lib.rs index b15705e8965..e6a45f57de6 100644 --- a/src/tools/run-make-support/src/lib.rs +++ b/src/tools/run-make-support/src/lib.rs @@ -61,7 +61,7 @@ pub use env::{env_var, env_var_os}; pub use run::{cmd, run, run_fail, run_with_args}; /// Helpers for checking target information. -pub use targets::{is_darwin, is_msvc, is_windows, target, uname}; +pub use targets::{is_darwin, is_msvc, is_windows, llvm_components_contain, target, uname}; /// Helpers for building names of output artifacts that are potentially target-specific. pub use artifact_names::{ diff --git a/src/tools/run-make-support/src/targets.rs b/src/tools/run-make-support/src/targets.rs index 42d4a45680d..5dcb0b83430 100644 --- a/src/tools/run-make-support/src/targets.rs +++ b/src/tools/run-make-support/src/targets.rs @@ -28,6 +28,13 @@ pub fn is_darwin() -> bool { target().contains("darwin") } +/// Check if `component` is within `LLVM_COMPONENTS` +#[must_use] +pub fn llvm_components_contain(component: &str) -> bool { + // `LLVM_COMPONENTS` is a space-separated list of words + env_var("LLVM_COMPONENTS").split_whitespace().find(|s| s == &component).is_some() +} + /// Run `uname`. This assumes that `uname` is available on the platform! #[track_caller] #[must_use] diff --git a/src/tools/tidy/src/allowed_run_make_makefiles.txt b/src/tools/tidy/src/allowed_run_make_makefiles.txt index 2e26f9344b8..f33cde110a5 100644 --- a/src/tools/tidy/src/allowed_run_make_makefiles.txt +++ b/src/tools/tidy/src/allowed_run_make_makefiles.txt @@ -1,5 +1,4 @@ run-make/archive-duplicate-names/Makefile -run-make/atomic-lock-free/Makefile run-make/branch-protection-check-IBT/Makefile run-make/c-dynamic-dylib/Makefile run-make/c-dynamic-rlib/Makefile |
