Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support LoongArch64 #23965

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions src/conditions/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,15 @@ config_setting(
visibility = ["//visibility:public"],
)

config_setting(
name = "linux_loongarch64",
constraint_values = [
"@platforms//os:linux",
"@platforms//cpu:loongarch64",
],
visibility = ["//visibility:public"],
)

config_setting(
name = "linux_x86_64",
constraint_values = [
Expand Down
9 changes: 9 additions & 0 deletions src/conditions/BUILD.tools
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,15 @@ config_setting(
visibility = ["//visibility:public"],
)

config_setting(
name = "linux_loongarch64",
constraint_values = [
"@platforms//os:linux",
"@platforms//cpu:loongarch64",
],
visibility = ["//visibility:public"],
)

config_setting(
name = "linux_x86_64",
constraint_values = [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ public String convert(String input) throws OptionsParsingException {
case S390X -> "s390x";
case MIPS64 -> "mips64";
case RISCV64 -> "riscv64";
case LOONGARCH64 -> "loongarch64";
default -> "unknown";
};
default -> "unknown";
Expand Down
1 change: 1 addition & 0 deletions src/main/java/com/google/devtools/build/lib/util/CPU.java
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ public enum CPU {
S390X("s390x", ImmutableSet.of("s390x", "s390")),
MIPS64("mips64", ImmutableSet.of("mips64el", "mips64")),
RISCV64("riscv64", ImmutableSet.of("riscv64")),
LOONGARCH64("loongarch64", ImmutableSet.of("loongarch64")),
UNKNOWN("unknown", ImmutableSet.<String>of());

private final String canonicalName;
Expand Down
Loading