Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 7def445

Browse files
authoredDec 4, 2024
Unrolled build for rust-lang#133811
Rollup merge of rust-lang#133811 - mustartt:change-default-codemodel, r=jieyouxu [AIX] change AIX default codemodel=large On AIX, for most libraries, we run out of Table of Contents (TOC) offsets very quickly due to the default 16-bit offset limit. We want the large code model should be used as the default to provide more TOC entries so the end user does not have to specify `-Ccode-model=large` for all their packages. This is even more of an issue with ThinLTO as the ThinLTO globals can very quickly use all available TOC entry. In addition, on AIX, code with different code-model across different compilation units will not cause undefined behavior, so this is safe to do.
2 parents c44b3d5 + 89b70b9 commit 7def445

File tree

1 file changed

+1
-1
lines changed
  • compiler/rustc_target/src/spec/base

1 file changed

+1
-1
lines changed
 

‎compiler/rustc_target/src/spec/base/aix.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ use crate::spec::{Cc, CodeModel, LinkOutputKind, LinkerFlavor, TargetOptions, cr
44
pub(crate) fn opts() -> TargetOptions {
55
TargetOptions {
66
abi: "vec-extabi".into(),
7-
code_model: Some(CodeModel::Small),
7+
code_model: Some(CodeModel::Large),
88
cpu: "pwr7".into(),
99
os: "aix".into(),
1010
vendor: "ibm".into(),

0 commit comments

Comments
 (0)
Failed to load comments.