From 4a313f75eef6243759158d88d54264bf63757a65 Mon Sep 17 00:00:00 2001 From: Steven Johnson Date: Thu, 7 Mar 2024 14:05:27 -0800 Subject: [PATCH] Fix for top-of-tree LLVM --- src/CodeGen_Internal.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/CodeGen_Internal.cpp b/src/CodeGen_Internal.cpp index 78fc4224fb61..697b9200fa33 100644 --- a/src/CodeGen_Internal.cpp +++ b/src/CodeGen_Internal.cpp @@ -610,7 +610,11 @@ void get_target_options(const llvm::Module &module, llvm::TargetOptions &options options.UseInitArray = true; options.FloatABIType = use_soft_float_abi ? llvm::FloatABI::Soft : llvm::FloatABI::Hard; +#if LLVM_VERSION >= 190 + options.MCOptions.X86RelaxRelocations = false; +#else options.RelaxELFRelocations = false; +#endif options.MCOptions.ABIName = mabi; }