diff --git a/CMakeLists.txt b/CMakeLists.txt index f138dcdd8..53f18449e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -193,7 +193,8 @@ if(WIN32) /wd4457 /wd4458 /wd4459 /wd4503 /wd4624 /wd4722 /wd4800 /wd4100 /wd4127 /wd4512 /wd4505 /wd4610 /wd4510 /wd4702 /wd4245 /wd4706 /wd4310 /wd4701 /wd4703 /wd4389 /wd4611 - /wd4805 /wd4204 /wd4577 /wd4091 /wd4592 /wd4324 + /wd4805 /wd4204 /wd4577 /wd4091 /wd4592 /wd4324 + -Xclang -mlong-double-80 /DLLVM_FORCE_USE_OLD_TOOLCHAIN ) target_compile_definitions(remill_settings INTERFACE diff --git a/cmake/BCCompiler.cmake b/cmake/BCCompiler.cmake index 6387aa038..6dbef41f2 100644 --- a/cmake/BCCompiler.cmake +++ b/cmake/BCCompiler.cmake @@ -161,7 +161,8 @@ function(add_runtime target_name) # # When the versions do not match, the compilation will fail; we don't really care about # this, as the second compiler is only really used to output BC files. - set(additional_windows_settings "-D_ALLOW_COMPILER_AND_STL_VERSION_MISMATCH") + # Also set -mlong-double-80 to compile on Windows with 16 byte long double. + set(additional_windows_settings "-D_ALLOW_COMPILER_AND_STL_VERSION_MISMATCH" "-mlong-double-80") endif() if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin") diff --git a/lib/BC/Util.cpp b/lib/BC/Util.cpp index 93781e173..c93564c46 100644 --- a/lib/BC/Util.cpp +++ b/lib/BC/Util.cpp @@ -413,7 +413,7 @@ LoadModuleFromFile(llvm::LLVMContext *context, auto module = llvm::parseIRFile(file_name.string(), err, *context); if (!module) { - llvm::outs() << "Unable to parse module file " << file_name << ": " + llvm::outs() << "Unable to parse module file " << file_name.string() << ": " << err.getMessage().str(); return {}; }