Skip to content

Commit

Permalink
Enable v for RISCV64 Android (#69261)
Browse files Browse the repository at this point in the history
Android has already enabled V by default for aosp:
https://android-review.googlesource.com/c/platform/build/soong/+/2752805
four weeks back.
  • Loading branch information
hiraditya committed Oct 17, 2023
1 parent abd0d5d commit 20af0e5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions clang/lib/Driver/ToolChains/Arch/RISCV.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ StringRef riscv::getRISCVArch(const llvm::opt::ArgList &Args,
return "rv32imafdc";
else if (MABI.starts_with_insensitive("lp64")) {
if (Triple.isAndroid())
return "rv64imafdc_zba_zbb_zbs";
return "rv64imafdcv_zba_zbb_zbs";

return "rv64imafdc";
}
Expand All @@ -329,7 +329,7 @@ StringRef riscv::getRISCVArch(const llvm::opt::ArgList &Args,
if (Triple.getOS() == llvm::Triple::UnknownOS)
return "rv64imac";
else if (Triple.isAndroid())
return "rv64imafdc_zba_zbb_zbs";
return "rv64imafdcv_zba_zbb_zbs";
else
return "rv64imafdc";
}
Expand Down
1 change: 1 addition & 0 deletions clang/test/Driver/riscv-features.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
// RUN: %clang --target=riscv32-unknown-elf -### %s -mrelax 2>&1 | FileCheck %s -check-prefix=RELAX
// RUN: %clang --target=riscv32-unknown-elf -### %s -mno-relax 2>&1 | FileCheck %s -check-prefix=NO-RELAX

// ANDROID: "-target-feature" "+v"
// ANDROID: "-target-feature" "+zba"
// ANDROID: "-target-feature" "+zbb"
// ANDROID: "-target-feature" "+zbs"
Expand Down

0 comments on commit 20af0e5

Please sign in to comment.