More linux fixes

This commit is contained in:
ArtemisX64 2022-08-27 15:53:31 +09:00
parent e4fc8ce726
commit 4bc6c01ce6
3 changed files with 10 additions and 4 deletions

View file

@ -28,7 +28,11 @@ elseif(UNIX)
add_definitions(-fpermissive)
add_definitions(-maes)
# warnings
add_compile_options(-Wno-switch -Wno-ignored-attributes -Wno-deprecated-enum-enum-conversion -Wno-ambiguous-reversed-operator)
if(CMAKE_C_COMPILER_ID MATCHES "Clang")
add_compile_options(-Wno-ambiguous-reversed-operator)
endif()
add_compile_options(-Wno-switch -Wno-ignored-attributes -Wno-deprecated-enum-enum-conversion)
endif()
add_definitions(-DVK_NO_PROTOTYPES)

View file

@ -231,10 +231,12 @@ typedef union _LARGE_INTEGER {
#else
#define DLLEXPORT
#define DLLIMPORT
#define DEBUG_BREAK
// fixme: random stack overflow solution. use with caution
#include <csignal>
#define DEBUG_BREAK raise(SIGTRAP)
#define ALIGN(N) __attribute__((aligned (N)))
#define NOINLINE __attribute__((noinline))
// fixme: random github solution. use it with caution
// fixme: random stack overflow solution. use it with caution
#define ASSUME(X) do { if (!(X)) __builtin_unreachable(); } while (0)
#define THREAD_LOCAL __thread
#define POPCNT(X) __builtin_popcount((X))