Skip to content

Commit 8c840ee

Browse files
committed
Synchronize i686 rustc triples with Clang
Try to be consistently replicate Clang default CPU for i686 triples.
1 parent 0062f72 commit 8c840ee

File tree

3 files changed

+8
-14
lines changed

3 files changed

+8
-14
lines changed

src/librustc_back/target/i686_apple_darwin.rs

+2-5
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,8 @@ use target::Target;
1212

1313
pub fn target() -> Target {
1414
let mut base = super::apple_base::opts();
15-
16-
// Use yonah as default CPU to enable SSE[2] instructions.
17-
// Clang defaults to i686 for this target, but defaulting to yonah
18-
// is consistent with what Clang does for i386-apple-darwin.
19-
base.cpu = "yonah".to_string();
15+
// Use i686 as default CPU. Clang uses the same default.
16+
base.cpu = "i686".to_string();
2017

2118
base.pre_link_args.push("-m32".to_string());
2219

src/librustc_back/target/i686_linux_android.rs

+4-5
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,10 @@ use target::Target;
1313
pub fn target() -> Target {
1414
let mut base = super::android_base::opts();
1515

16-
// Use pentium4 as default CPU to enable SSE[2] instructions.
17-
// Clang defaults to i686 and enables SSSE3 for this target, but
18-
// defaulting to pentium4 is consistent with linux and windows
19-
// targets.
20-
base.cpu = "pentium4".to_string();
16+
// Use i686 as default CPU and enable SSSE3.
17+
// Clang and GCC do the same.
18+
base.cpu = "i686".to_string();
19+
base.features = "+ssse3".to_string();
2120

2221
Target {
2322
llvm_target: "i686-linux-android".to_string(),

src/librustc_back/target/i686_unknown_freebsd.rs

+2-4
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,8 @@ use target::Target;
1313
pub fn target() -> Target {
1414
let mut base = super::freebsd_base::opts();
1515

16-
// Use pentium4 as default CPU to enable SSE[2] instructions.
17-
// Clang defaults to i486 for this target, but defaulting to
18-
// pentium4 is consistent with linux and windows targets.
19-
base.cpu = "pentium4".to_string();
16+
// Use i486 as default CPU. Clang uses the same default.
17+
base.cpu = "i486".to_string();
2018

2119
base.pre_link_args.push("-m32".to_string());
2220

0 commit comments

Comments
 (0)