From 67ea7a1b114f0168ad97de747440b88e7a984540 Mon Sep 17 00:00:00 2001 From: Rainer Orth Date: Wed, 17 Aug 2022 11:54:38 +0200 Subject: [PATCH] [flang] Add Solaris/x86 support to Optimizer/CodeGen/Target.cpp When testing LLVM 15.0.0 rc1 on Solaris, I found that 50+ flang tests `FAIL`ed with error: /vol/llvm/src/llvm-project/local/flang/lib/Optimizer/CodeGen/Target.cpp:310: not yet implemented: target not implemented This patch fixes that for Solaris/x86, where the fix is trivial (just handling it like the other x86 OSes). Tested on `amd64-pc-solaris2.11`; only a single failure remains now. Differential Revision: https://reviews.llvm.org/D131054 (cherry picked from commit bcb2740f415b0f825402f656dda3271414121a0e) --- flang/lib/Optimizer/CodeGen/Target.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/flang/lib/Optimizer/CodeGen/Target.cpp b/flang/lib/Optimizer/CodeGen/Target.cpp index 9ec2f04489ae..5295420ae9a8 100644 --- a/flang/lib/Optimizer/CodeGen/Target.cpp +++ b/flang/lib/Optimizer/CodeGen/Target.cpp @@ -268,6 +268,7 @@ fir::CodeGenSpecifics::get(mlir::MLIRContext *ctx, llvm::Triple &&trp, case llvm::Triple::OSType::Linux: case llvm::Triple::OSType::Darwin: case llvm::Triple::OSType::MacOSX: + case llvm::Triple::OSType::Solaris: case llvm::Triple::OSType::Win32: return std::make_unique(ctx, std::move(trp), std::move(kindMap)); @@ -280,6 +281,7 @@ fir::CodeGenSpecifics::get(mlir::MLIRContext *ctx, llvm::Triple &&trp, case llvm::Triple::OSType::Linux: case llvm::Triple::OSType::Darwin: case llvm::Triple::OSType::MacOSX: + case llvm::Triple::OSType::Solaris: case llvm::Triple::OSType::Win32: return std::make_unique(ctx, std::move(trp), std::move(kindMap));