Skip to content

Conversation

Verney7
Copy link

@Verney7 Verney7 commented Aug 28, 2025

In this commit, support for a new architecture sw_64 is added to bazel. sw_64 is a new RISC ISA, which is a bit like RISC-V. Though it is a rather new ISA, it has been added to openEuler and openAnolis port since 2020. So supporting this new architecture is meaningful.
It's PR is to solve compilation failure on sw_64 architecture.

Binutils has identified EM_SW64 is 268, I hope bazel can accept this patch. Thanks.

https://en.wikipedia.org/wiki/Sunway_(processor)

More information about sw_64 ISA:

$ uname -m
sw_64
$ gcc -E -dM - < /dev/null|grep __sw_64__
#define __sw_64__ 1
$ gcc -E -dM - < /dev/null|grep BYTE_ORDER
#define __BYTE_ORDER__ __ORDER_LITTLE_ENDIAN__

Introduces the sw_64 CPU constraint in the BUILD file and updates the _translate_cpu function in extension.bzl to recognize and translate the sw_64 architecture.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant