diff --git a/lib/Decompiler.cpp b/lib/Decompiler.cpp index 156dc197..f0e1e266 100644 --- a/lib/Decompiler.cpp +++ b/lib/Decompiler.cpp @@ -81,6 +81,12 @@ Result Decompile( std::vector args{"-Wno-pointer-to-int-cast", "-Wno-pointer-sign", "-target", module->getTargetTriple()}; + // Silence clang warning + // warning: unknown platform, assumming -mfloat-abi=soft + const auto& triple{llvm::Triple(module->getTargetTriple())}; + if (triple.isARM()) { + args.push_back("-mfloat-abi=soft"); + } auto ast_unit{clang::tooling::buildASTFromCodeWithArgs("", args, "out.c")}; rellic::DecompilationContext dec_ctx(*ast_unit); rellic::GenerateAST::run(*module, dec_ctx); @@ -162,4 +168,4 @@ Result Decompile( return Result(std::move(error)); } } -} // namespace rellic \ No newline at end of file +} // namespace rellic