================
@@ -471,6 +498,18 @@ static void SetupTargetOpts(CompilerInstance &compiler,
// Set the target ABI
if (std::string abi = GetClangTargetABI(target_arch); !abi.empty())
compiler.getTargetOpts().ABI = std::move(abi);
+
+ if ((target_machine == llvm::Triple::riscv64 &&
+ compiler.getTargetOpts().ABI == "lp64f") ||
+ (target_machine == llvm::Triple::riscv32 &&
+ compiler.getTargetOpts().ABI == "ilp32f"))
+ compiler->getTargetOpts().FeaturesAsWritten.emplace_back("+f");
+
+ if ((target_machine == llvm::Triple::riscv64 &&
+ compiler.getTargetOpts().ABI == "lp64d") ||
+ (target_machine == llvm::Triple::riscv32 &&
+ compiler.getTargetOpts().ABI == "ilp32d"))
+ compiler->getTargetOpts().FeaturesAsWritten.emplace_back("+d");
----------------
Michael137 wrote:
What happens if we just unconditionally add `+d` and `+f`? I'm not super
familiar with RISCV but are ilp32d/ilp32f/ilp64f/ilp32f all the supported ABI
strings? The GCC docs also seem to mention `rv64ifd`, e.g.. So my thinking is
that we could maybe just enable these features for all targets (like we do with
x86 sse?)
https://github.com/llvm/llvm-project/pull/99336
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits