Skip to content

Commit 2074552

Browse files
committed
[lanai] Add back the ability to set the memory model with --mcmodel.
Sometimes between April 2023 and today the option disappeared. I wasn't able to trace when it went away through the different refactoring.
1 parent d368d11 commit 2074552

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

clang/lib/Driver/ToolChains/CommonArgs.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3055,6 +3055,8 @@ void tools::addMCModel(const Driver &D, const llvm::opt::ArgList &Args,
30553055
else if (CM == "medany")
30563056
CM = "large";
30573057
Ok = CM == "small" || CM == "medium" || CM == "large";
3058+
} else if (Triple.getArch() == llvm::Triple::lanai) {
3059+
Ok = llvm::is_contained({"small", "medium", "large"}, CM);
30583060
}
30593061
if (Ok) {
30603062
CmdArgs.push_back(Args.MakeArgString("-mcmodel=" + CM));

0 commit comments

Comments
 (0)