From e67584241b7e3f5852db58cf8e499432f58a8144 Mon Sep 17 00:00:00 2001 From: Ionel-Cristinel ANICHITEI Date: Mon, 5 Dec 2022 12:06:53 +0200 Subject: [PATCH] Revert "Fix `clang-cl` and `mingw` builds" This reverts commit add871993f1d15f9cec1234d6462758e5f955f10. I'll make a PR with these changes. --- CMakeLists.txt | 11 ++++------- bddisasm/bddisasm.c | 8 ++++---- bddisasm/include/nd_crt.h | 4 ++++ disasmtool/CMakeLists.txt | 14 +++++--------- disasmtool/disasmtool.c | 4 ++-- 5 files changed, 19 insertions(+), 22 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index e573c15..996eb25 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -35,9 +35,7 @@ if (NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES) endif () # These are shared by bddisasm and bdshemu. -if (MSVC OR "${CMAKE_C_COMPILER_FRONTEND_VARIANT}" STREQUAL "MSVC") - set(BDDISASM_COMMON_COMPILE_OPTIONS /W4 /WX) -else () +if (NOT MSVC) set(BDDISASM_COMMON_COMPILE_OPTIONS "$<$:-U_FORTIFY_SOURCE>" "$<$:-D_FORTIFY_SOURCE=2>" @@ -70,6 +68,8 @@ else () -gdwarf-4 -grecord-gcc-switches -march=westmere) +else () + set(BDDISASM_COMMON_COMPILE_OPTIONS /W4 /WX) endif () set(BDDISASM_PUBLIC_HEADERS @@ -91,7 +91,6 @@ set(BDDISASM_INSTALL_INCLUDE_DIR include(CheckFunctionExists) include(CheckSymbolExists) -include(CheckCCompilerFlag) add_library( bddisasm STATIC @@ -172,9 +171,7 @@ target_include_directories(bddisasm PUBLIC $= (INT32)ARRAYSIZE(Options->ShemuRegs)) + if (regIdx < 0 || regIdx >= ARRAYSIZE(Options->ShemuRegs)) { if (!_stricmp(regStr, "rip")) {