Add loongarch64 support#4914
Add loongarch64 support#4914youknowone merged 6 commits intoRustPython:mainfrom xiangzhai:loongarch64
Conversation
Lib/test/test_sysconfig.py
Outdated
| machine = platform.machine() | ||
| suffix = sysconfig.get_config_var('EXT_SUFFIX') | ||
| if re.match('(aarch64|arm|mips|ppc|powerpc|s390|sparc)', machine): | ||
| if re.match('(aarch64|arm|loongarch64|mips|ppc|powerpc|s390|sparc)', machine): |
There was a problem hiding this comment.
We generally don't edit this file ourselves because it mostly came from CPython.
But I understand this is necessary to correctly support the architecture.
Not to lose the changes when we update this file to new version,
Adding a comment is useful.
| if re.match('(aarch64|arm|loongarch64|mips|ppc|powerpc|s390|sparc)', machine): | |
| # XXX: RUSTPYTHON; loongarch64 is locally added in github #4914 | |
| if re.match('(aarch64|arm|loongarch64|mips|ppc|powerpc|s390|sparc)', machine): |
And also, I found the related CPython patch doesn't include this change. Is it necessary in RustPython?
There was a problem hiding this comment.
Thanks for your careful review!
It is not necessary in RustPython.
Fixed.
|
Hi @youknowone I fixed cargo fmt and clippy issues and ran the test for Ubuntu 22.04 x86_64: Please review it again! Thanks, |
stdlib/src/mmap.rs
Outdated
| MADV_MERGEABLE, MADV_NOHUGEPAGE, MADV_REMOVE, MADV_UNMERGEABLE, | ||
| }; | ||
|
|
||
| #[allow(unused_imports)] |
There was a problem hiding this comment.
This is supposed to be used by #[pyattr]
| #[allow(unused_imports)] | |
| #[pyattr] |
Because we usually use cfg - pyattr order, placing it under cfg will be better.
stdlib/src/mmap.rs
Outdated
| ) | ||
| ) | ||
| ))] | ||
| #[allow(unused_imports)] |
There was a problem hiding this comment.
| #[allow(unused_imports)] | |
| #[pyattr] |
The value has to be used by pyattr to be exposed to python side
|
Thank you for contributing! |
Hi,
cargo build && test, all tests pass:
Please review my patch.
Thanks,
Leslie Zhai