Skip to content

Commit

Permalink
Fixed build
Browse files Browse the repository at this point in the history
  • Loading branch information
deathkiller committed Oct 23, 2024
1 parent 33d4f23 commit 5a69765
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions Sources/Shared/Core/Logger.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,7 @@
# include <sys/mman.h>
# endif

// _mm_clflushopt is supported only since Skylake and requires "-mclflushopt" option on GCC/clang, and is undefined on clang-cl
# if defined(DEATH_TARGET_X86) && defined(DEATH_TARGET_CLFLUSHOPT) && !defined(DEATH_TARGET_CLANG_CL)
# if defined(DEATH_TARGET_X86)
# if defined(DEATH_TARGET_MSVC)
# include <intrin.h>
# else
Expand Down Expand Up @@ -447,6 +446,7 @@ namespace Death { namespace Trace {
T _lastFlushedReaderPos{0};

# if defined(DEATH_TARGET_X86) && defined(DEATH_TARGET_CLFLUSHOPT) && !defined(DEATH_TARGET_CLANG_CL)
// _mm_clflushopt is supported only since Skylake and requires "-mclflushopt" option on GCC/clang, and is undefined on clang-cl
void flushCacheLines(T& last, T offset)
{
T lastDiff = last - (last & CacheLineMask);
Expand Down
16 changes: 8 additions & 8 deletions cmake/ncine_compiler_options.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -191,14 +191,14 @@ else() # GCC and LLVM
endif()

# _mm_clflushopt also requires "-mclflushopt" option on GCC/clang
if(CMAKE_OSX_ARCHITECTURES)
set(CPU_ARCH "${CMAKE_OSX_ARCHITECTURES}")
else()
set(CPU_ARCH "${CMAKE_SYSTEM_PROCESSOR}")
endif()
if ("${CPU_ARCH}" STREQUAL "x86_64")
target_compile_options(${NCINE_APP} PRIVATE -mclflushopt)
endif()
#if(CMAKE_OSX_ARCHITECTURES)
# set(CPU_ARCH "${CMAKE_OSX_ARCHITECTURES}")
#else()
# set(CPU_ARCH "${CMAKE_SYSTEM_PROCESSOR}")
#endif()
#if ("${CPU_ARCH}" STREQUAL "x86_64")
# target_compile_options(${NCINE_APP} PRIVATE -mclflushopt)
#endif()

if(NCINE_WITH_TRACY)
target_compile_options(${NCINE_APP} PRIVATE $<$<CONFIG:Release>:-g -fno-omit-frame-pointer>)
Expand Down

0 comments on commit 5a69765

Please sign in to comment.