Skip to content

Commit

Permalink
Unrolled build for rust-lang#133811
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
rust-timer authored Dec 4, 2024
2 parents c44b3d5 + 89b70b9 commit 7def445
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion compiler/rustc_target/src/spec/base/aix.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use crate::spec::{Cc, CodeModel, LinkOutputKind, LinkerFlavor, TargetOptions, cr
pub(crate) fn opts() -> TargetOptions {
TargetOptions {
abi: "vec-extabi".into(),
code_model: Some(CodeModel::Small),
code_model: Some(CodeModel::Large),
cpu: "pwr7".into(),
os: "aix".into(),
vendor: "ibm".into(),
Expand Down

0 comments on commit 7def445

Please sign in to comment.