-
Notifications
You must be signed in to change notification settings - Fork 14.3k
[Driver][FreeBSD] Remove FreeBSD/loongarch32 support #122515
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
Conversation
@llvm/pr-subscribers-clang-driver @llvm/pr-subscribers-clang Author: Brad Smith (brad0) ChangesFreeBSD going forward will not have 32-bit arch support. Also missed a spot with removing riscv32 support. Full diff: https://github.com/llvm/llvm-project/pull/122515.diff 4 Files Affected:
diff --git a/clang/lib/Basic/Targets.cpp b/clang/lib/Basic/Targets.cpp
index be5dedbe8044e2..872f2952a1bae2 100644
--- a/clang/lib/Basic/Targets.cpp
+++ b/clang/lib/Basic/Targets.cpp
@@ -735,9 +735,6 @@ std::unique_ptr<TargetInfo> AllocateTarget(const llvm::Triple &Triple,
case llvm::Triple::Linux:
return std::make_unique<LinuxTargetInfo<LoongArch32TargetInfo>>(Triple,
Opts);
- case llvm::Triple::FreeBSD:
- return std::make_unique<FreeBSDTargetInfo<LoongArch32TargetInfo>>(Triple,
- Opts);
default:
return std::make_unique<LoongArch32TargetInfo>(Triple, Opts);
}
diff --git a/clang/lib/Basic/Targets/OSTargets.h b/clang/lib/Basic/Targets/OSTargets.h
index 53dd23c3129636..3408b008b2217c 100644
--- a/clang/lib/Basic/Targets/OSTargets.h
+++ b/clang/lib/Basic/Targets/OSTargets.h
@@ -228,11 +228,8 @@ class LLVM_LIBRARY_VISIBILITY FreeBSDTargetInfo : public OSTargetInfo<Target> {
case llvm::Triple::arm:
this->MCountName = "__mcount";
break;
- case llvm::Triple::riscv32:
- case llvm::Triple::riscv64:
- break;
- case llvm::Triple::loongarch32:
case llvm::Triple::loongarch64:
+ case llvm::Triple::riscv64:
break;
}
}
diff --git a/clang/lib/Driver/ToolChains/FreeBSD.cpp b/clang/lib/Driver/ToolChains/FreeBSD.cpp
index 88a27e3192827f..a6d859f0ebfec2 100644
--- a/clang/lib/Driver/ToolChains/FreeBSD.cpp
+++ b/clang/lib/Driver/ToolChains/FreeBSD.cpp
@@ -213,10 +213,6 @@ void freebsd::Linker::ConstructJob(Compilation &C, const JobAction &JA,
CmdArgs.push_back("-m");
CmdArgs.push_back("elf64lriscv");
break;
- case llvm::Triple::loongarch32:
- CmdArgs.push_back("-m");
- CmdArgs.push_back("elf32loongarch");
- break;
case llvm::Triple::loongarch64:
CmdArgs.push_back("-m");
CmdArgs.push_back("elf64loongarch");
diff --git a/clang/test/Driver/freebsd.c b/clang/test/Driver/freebsd.c
index a0787bab4feb8f..94db63278bfe97 100644
--- a/clang/test/Driver/freebsd.c
+++ b/clang/test/Driver/freebsd.c
@@ -79,9 +79,6 @@
//
// Check that LoongArch passes the correct linker emulation.
//
-// RUN: %clang --target=loongarch32-freebsd -### %s %s 2>&1 \
-// RUN: | FileCheck --check-prefix=CHECK-LA32-LD %s
-// CHECK-LA32-LD: ld{{.*}}" {{.*}} "-m" "elf32loongarch"
// RUN: %clang --target=loongarch64-freebsd -### %s %s 2>&1 \
// RUN: | FileCheck --check-prefix=CHECK-LA64-LD %s
// CHECK-LA64-LD: ld{{.*}}" {{.*}} "-m" "elf64loongarch"
|
✅ With the latest revision this PR passed the C/C++ code formatter. |
FreeBSD going forward will not have 32-bit arch support. Also missed a spot with removing riscv32 support.
e2bec3c
to
b6b7ecf
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM for the LoongArch changes.
LLVM Buildbot has detected a new failure on builder Full details are available at: https://lab.llvm.org/buildbot/#/builders/73/builds/11996 Here is the relevant piece of the build log for the reference
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Retroactive, but LGTM. No need to leave riscv32 around providing a confusing trail for future architectures.
backport from llvm20: [clang][LoongArch] Add FreeBSD targets: llvm/llvm-project#119191 [Driver][FreeBSD] Remove FreeBSD/loongarch32 support: llvm/llvm-project#122515 Co-authored-by: haowuge <[email protected]> Co-authored-by: xiaoqiang zhao <[email protected]> Signed-off-by: yu shan wei <[email protected]>
FreeBSD going forward will not have 32-bit arch support.
Also missed a spot with removing riscv32 support.