From a42787d10854fe2fdaca019634aed03adebcb864 Mon Sep 17 00:00:00 2001 From: Arthur Eubanks Date: Tue, 26 Sep 2023 09:44:31 -0700 Subject: [clang] Add -mlarge-data-threshold for x86_64 medium code model (#66839) Error if not used with x86_64. Warn if not used with the medium code model (can update if other code models end up using this). Set TargetMachine option and add module flag. --- clang/lib/Frontend/CompilerInvocation.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'clang/lib/Frontend/CompilerInvocation.cpp') diff --git a/clang/lib/Frontend/CompilerInvocation.cpp b/clang/lib/Frontend/CompilerInvocation.cpp index 9293b91..f2fe904 100644 --- a/clang/lib/Frontend/CompilerInvocation.cpp +++ b/clang/lib/Frontend/CompilerInvocation.cpp @@ -574,6 +574,7 @@ static bool FixupInvocation(CompilerInvocation &Invocation, llvm::Triple::ArchType Arch = T.getArch(); CodeGenOpts.CodeModel = TargetOpts.CodeModel; + CodeGenOpts.LargeDataThreshold = TargetOpts.LargeDataThreshold; if (LangOpts.getExceptionHandling() != LangOptions::ExceptionHandlingKind::None && -- cgit v1.1