diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2023-04-20 12:46:18 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2023-04-20 12:46:18 -0700 |
commit | 6a66fdd29ea1695d615fcc93dccfb6dbe2f53b1d (patch) | |
tree | d30e5031023d581ec2748bf276721b2c908e2648 /scripts | |
parent | 23309d600db1abb73b77ca35db96133b7fc35959 (diff) | |
parent | d966c3cab924fb750fefef11e77a6fa07dd5420e (diff) | |
download | lwn-6a66fdd29ea1695d615fcc93dccfb6dbe2f53b1d.tar.gz lwn-6a66fdd29ea1695d615fcc93dccfb6dbe2f53b1d.zip |
Merge tag 'rust-fixes-6.3' of https://github.com/Rust-for-Linux/linux
Pull Rust fixes from Miguel Ojeda:
"Most of these are straightforward.
The last one is more complex, but it only touches Rust + GCC builds
which are for the moment best-effort.
- Code: Missing 'extern "C"' fix.
- Scripts: 'is_rust_module.sh' and 'generate_rust_analyzer.py' fixes.
- A couple trivial fixes
- Build: Rust + GCC build fix and 'grep' warning fix"
* tag 'rust-fixes-6.3' of https://github.com/Rust-for-Linux/linux:
rust: allow to use INIT_STACK_ALL_ZERO
rust: fix regexp in scripts/is_rust_module.sh
rust: build: Fix grep warning
scripts: generate_rust_analyzer: Handle sub-modules with no Makefile
rust: kernel: Mark rust_fmt_argument as extern "C"
rust: sort uml documentation arch support table
rust: str: fix requierments->requirements typo
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/generate_rust_analyzer.py | 5 | ||||
-rwxr-xr-x | scripts/is_rust_module.sh | 2 |
2 files changed, 5 insertions, 2 deletions
diff --git a/scripts/generate_rust_analyzer.py b/scripts/generate_rust_analyzer.py index ecc7ea9a4dcf..946e250c1b2a 100755 --- a/scripts/generate_rust_analyzer.py +++ b/scripts/generate_rust_analyzer.py @@ -104,7 +104,10 @@ def generate_crates(srctree, objtree, sysroot_src): name = path.name.replace(".rs", "") # Skip those that are not crate roots. - if f"{name}.o" not in open(path.parent / "Makefile").read(): + try: + if f"{name}.o" not in open(path.parent / "Makefile").read(): + continue + except FileNotFoundError: continue logging.info("Adding %s", name) diff --git a/scripts/is_rust_module.sh b/scripts/is_rust_module.sh index 28b3831a7593..464761a7cf7f 100755 --- a/scripts/is_rust_module.sh +++ b/scripts/is_rust_module.sh @@ -13,4 +13,4 @@ set -e # # In the future, checking for the `.comment` section may be another # option, see https://github.com/rust-lang/rust/pull/97550. -${NM} "$*" | grep -qE '^[0-9a-fA-F]+ r _R[^[:space:]]+16___IS_RUST_MODULE[^[:space:]]*$' +${NM} "$*" | grep -qE '^[0-9a-fA-F]+ [Rr] _R[^[:space:]]+16___IS_RUST_MODULE[^[:space:]]*$' |