Set minimum LLVM version for compilation.

This commit is contained in:
Christoffer Lerno
2024-06-29 20:30:37 +02:00
parent 492f83f5e2
commit f3d5e3d4c2
2 changed files with 6 additions and 2 deletions

View File

@@ -130,6 +130,10 @@ message(STATUS "Found LLVM ${LLVM_PACKAGE_VERSION}")
message(STATUS "Using LLVMConfig.cmake in: ${LLVM_DIR}")
message(STATUS "Libraries located in: ${LLVM_LIBRARY_DIRS}")
if (NOT LLVM_PACKAGE_VERSION VERSION_GREATER_EQUAL 15.0)
message(FATAL_ERROR "LLVM version 15.0 or later is required.")
endif()
if(LLVM_ENABLE_RTTI)
message(STATUS "LLVM was built with RTTI")
else()

View File

@@ -47,7 +47,7 @@ const char *trust_level[3] = {
[TRUST_FULL] = "full",
};
#define EOUTPUT(string, ...) fprintf(stderr, string "\n", ##__VA_ARGS__)
#define EOUTPUT(string, ...) fprintf(stderr, string "\n", ##__VA_ARGS__) // NOLINT
#define PRINTF(string, ...) fprintf(stdout, string "\n", ##__VA_ARGS__) // NOLINT
#define FAIL_WITH_ERR(string, ...) do { fprintf(stderr, "Error: " string "\n\n", ##__VA_ARGS__); usage(); exit_compiler(EXIT_FAILURE); } while (0) /* NOLINT */
@@ -237,7 +237,7 @@ void append_file(BuildOptions *build_options)
{
if (vec_size(build_options->files) == MAX_FILES)
{
fprintf(stderr, "Max %d files may be specified\n", MAX_FILES);
EOUTPUT("Max %d files may be specified.", MAX_FILES);
exit_compiler(EXIT_FAILURE);
}
vec_add(build_options->files, current_arg);