mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 12:01:16 +00:00
Wrapper RTTI now follows LLVM RTTI.
This commit is contained in:
@@ -401,6 +401,9 @@ if(MSVC)
|
||||
message("Adding MSVC options")
|
||||
target_compile_options(c3c PRIVATE /wd4068 /wd4090 /WX /Wv:18)
|
||||
target_compile_options(c3c_wrappers PUBLIC /wd4624 /wd4267 /wd4244 /WX /Wv:18)
|
||||
if (NOT LLVM_ENABLE_RTTI)
|
||||
target_compile_options(c3c_wrappers PUBLIC /GR-)
|
||||
endif()
|
||||
target_link_options(c3c_wrappers PUBLIC /ignore:4099)
|
||||
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
|
||||
target_compile_options(c3c PUBLIC /MTd)
|
||||
@@ -417,10 +420,12 @@ if(MSVC)
|
||||
target_compile_options(tilde-backend PUBLIC /MT)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
else()
|
||||
message(STATUS "using gcc/clang warning switches")
|
||||
target_link_options(c3c PRIVATE -pthread)
|
||||
if (NOT LLVM_ENABLE_RTTI)
|
||||
target_compile_options(c3c_wrappers PUBLIC -fno-rtti)
|
||||
endif()
|
||||
target_compile_options(c3c PRIVATE -pthread -Wall -Werror -Wno-unknown-pragmas -Wno-unused-result
|
||||
-Wno-unused-function -Wno-unused-variable -Wno-unused-parameter)
|
||||
endif()
|
||||
|
||||
@@ -136,7 +136,7 @@ extern "C" {
|
||||
bool llvm_run_passes(LLVMModuleRef m, LLVMTargetMachineRef tm,
|
||||
LLVMPasses *passes)
|
||||
{
|
||||
llvm::TargetMachine *Machine = reinterpret_cast<llvm::TargetMachine *>(tm);
|
||||
llvm::TargetMachine *Machine = (llvm::TargetMachine *)(tm);
|
||||
llvm::Module *Mod = llvm::unwrap(m);
|
||||
llvm::PassInstrumentationCallbacks PIC;
|
||||
llvm::PipelineTuningOptions PTO{};
|
||||
@@ -307,7 +307,7 @@ int llvm_version_major = LLVM_VERSION_MAJOR;
|
||||
|
||||
void LLVMSetTargetMachineUseInitArray(LLVMTargetMachineRef ref, bool use_init_array)
|
||||
{
|
||||
auto machine = reinterpret_cast<llvm::TargetMachine *>(ref);
|
||||
auto machine = (llvm::TargetMachine*)ref;
|
||||
machine->Options.UseInitArray = use_init_array;
|
||||
}
|
||||
void LLVMSetDSOLocal(LLVMValueRef Global, bool value)
|
||||
|
||||
Reference in New Issue
Block a user