Skip to content

Instantly share code, notes, and snippets.

@nektro
Last active March 7, 2023 01:53
Show Gist options
  • Save nektro/01ff3affbc2efb8b7bbedcadab14e769 to your computer and use it in GitHub Desktop.
Save nektro/01ff3affbc2efb8b7bbedcadab14e769 to your computer and use it in GitHub Desktop.
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 925fd2d63..ff5005494 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -655,13 +655,13 @@ include_directories(
)
if(MSVC)
- set(EXE_CXX_FLAGS "/std:c++14")
+ set(EXE_CXX_FLAGS "/std:c++17")
set(EXE_LDFLAGS "/STACK:16777216")
if(NOT "${CMAKE_BUILD_TYPE}" STREQUAL "Release" AND NOT "${CMAKE_BUILD_TYPE}" STREQUAL "MinSizeRel")
set(EXE_LDFLAGS "${EXE_LDFLAGS} /debug:fastlink")
endif()
else()
- set(EXE_CXX_FLAGS "-std=c++14 -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -D_GNU_SOURCE -fvisibility-inlines-hidden -fno-exceptions -fno-rtti -Werror=type-limits -Wno-missing-braces -Wno-comment")
+ set(EXE_CXX_FLAGS "-std=c++17 -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -D_GNU_SOURCE -fvisibility-inlines-hidden -fno-exceptions -fno-rtti -Werror=type-limits -Wno-missing-braces -Wno-comment")
set(EXE_LDFLAGS " ")
if(MINGW)
set(EXE_CXX_FLAGS "${EXE_CXX_FLAGS} -Wno-format")
diff --git a/cmake/Findllvm.cmake b/cmake/Findllvm.cmake
index d86620345..48081cf50 100644
--- a/cmake/Findllvm.cmake
+++ b/cmake/Findllvm.cmake
@@ -37,7 +37,7 @@ if(ZIG_USE_LLVM_CONFIG)
OUTPUT_STRIP_TRAILING_WHITESPACE)
get_filename_component(LLVM_CONFIG_DIR "${LLVM_CONFIG_EXE}" DIRECTORY)
- if("${LLVM_CONFIG_VERSION}" VERSION_LESS 15 OR "${LLVM_CONFIG_VERSION}" VERSION_EQUAL 16 OR "${LLVM_CONFIG_VERSION}" VERSION_GREATER 16)
+ if("${LLVM_CONFIG_VERSION}" VERSION_LESS 15)
# Save the error message, in case this is the last llvm-config we find
list(APPEND LLVM_CONFIG_ERROR_MESSAGES "expected LLVM 15.x but found ${LLVM_CONFIG_VERSION} using ${LLVM_CONFIG_EXE}")
diff --git a/src/zig_llvm.cpp b/src/zig_llvm.cpp
index 4f73bd2c3..8a237713c 100644
--- a/src/zig_llvm.cpp
+++ b/src/zig_llvm.cpp
@@ -47,10 +47,9 @@
#include <llvm/Object/COFFModuleDefinition.h>
#include <llvm/PassRegistry.h>
#include <llvm/Support/CommandLine.h>
-#include <llvm/Support/Host.h>
+#include <llvm/TargetParser/Host.h>
#include <llvm/Support/FileSystem.h>
#include <llvm/Support/Process.h>
-#include <llvm/Support/TargetParser.h>
#include <llvm/Support/TimeProfiler.h>
#include <llvm/Support/Timer.h>
#include <llvm/Support/raw_ostream.h>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment