diff options
Diffstat (limited to 'lld/ELF')
-rw-r--r-- | lld/ELF/Config.h | 1 | ||||
-rw-r--r-- | lld/ELF/LTO.cpp | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/lld/ELF/Config.h b/lld/ELF/Config.h index c88abd84a27..a47d7cda4af 100644 --- a/lld/ELF/Config.h +++ b/lld/ELF/Config.h @@ -13,6 +13,7 @@ #include "llvm/ADT/MapVector.h" #include "llvm/ADT/StringRef.h" #include "llvm/ADT/StringSet.h" +#include "llvm/Support/CodeGen.h" #include "llvm/Support/ELF.h" #include <vector> diff --git a/lld/ELF/LTO.cpp b/lld/ELF/LTO.cpp index 1fb752579a9..eec62e96bb1 100644 --- a/lld/ELF/LTO.cpp +++ b/lld/ELF/LTO.cpp @@ -73,6 +73,7 @@ static std::unique_ptr<lto::LTO> createLTO() { Conf.Options.RelaxELFRelocations = true; Conf.RelocModel = Config->pic() ? Reloc::PIC_ : Reloc::Static; + Conf.CodeModel = GetCodeModelFromCMModel(); Conf.DisableVerify = Config->DisableVerify; Conf.DiagHandler = diagnosticHandler; Conf.OptLevel = Config->LTOO; |