Skip to content

Commit

Permalink
[Driver] Remove FreeBSD/riscv32 support (#67277)
Browse files Browse the repository at this point in the history
FreeBSD does not support riscv32 and has no intention of doing so.
  • Loading branch information
brad0 committed Sep 25, 2023
1 parent 085075a commit c1300ef
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 12 deletions.
3 changes: 0 additions & 3 deletions clang/lib/Basic/Targets.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -430,9 +430,6 @@ std::unique_ptr<TargetInfo> AllocateTarget(const llvm::Triple &Triple,

case llvm::Triple::riscv32:
switch (os) {
case llvm::Triple::FreeBSD:
return std::make_unique<FreeBSDTargetInfo<RISCV32TargetInfo>>(Triple,
Opts);
case llvm::Triple::NetBSD:
return std::make_unique<NetBSDTargetInfo<RISCV32TargetInfo>>(Triple,
Opts);
Expand Down
5 changes: 0 additions & 5 deletions clang/lib/Driver/ToolChains/FreeBSD.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -210,11 +210,6 @@ void freebsd::Linker::ConstructJob(Compilation &C, const JobAction &JA,
else
CmdArgs.push_back("elf64ltsmip_fbsd");
break;
case llvm::Triple::riscv32:
CmdArgs.push_back("-m");
CmdArgs.push_back("elf32lriscv");
CmdArgs.push_back("-X");
break;
case llvm::Triple::riscv64:
CmdArgs.push_back("-m");
CmdArgs.push_back("elf64lriscv");
Expand Down
3 changes: 0 additions & 3 deletions clang/test/Driver/freebsd.c
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,6 @@
//
// Check that RISC-V passes the correct linker emulation.
//
// RUN: %clang --target=riscv32-freebsd -### %s %s 2>&1 \
// RUN: | FileCheck --check-prefix=CHECK-RV32I-LD %s
// CHECK-RV32I-LD: ld{{.*}}" {{.*}} "-m" "elf32lriscv"
// RUN: %clang --target=riscv64-freebsd -### %s %s 2>&1 \
// RUN: | FileCheck --check-prefix=CHECK-RV64I-LD %s
// CHECK-RV64I-LD: ld{{.*}}" {{.*}} "-m" "elf64lriscv"
Expand Down
1 change: 0 additions & 1 deletion clang/test/Preprocessor/predefined-macros-no-warnings.c
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,6 @@
// RUN: %clang_cc1 %s -Eonly -Wsystem-headers -Werror -triple amdgcn
// RUN: %clang_cc1 %s -Eonly -Wsystem-headers -Werror -triple r600
// RUN: %clang_cc1 %s -Eonly -Wsystem-headers -Werror -triple riscv32
// RUN: %clang_cc1 %s -Eonly -Wsystem-headers -Werror -triple riscv32-freebsd
// RUN: %clang_cc1 %s -Eonly -Wsystem-headers -Werror -triple riscv32-linux
// RUN: %clang_cc1 %s -Eonly -Wsystem-headers -Werror -triple riscv64
// RUN: %clang_cc1 %s -Eonly -Wsystem-headers -Werror -triple riscv64-freebsd
Expand Down

0 comments on commit c1300ef

Please sign in to comment.