Skip to content

Commit 3e8aa49

Browse files
committed
Auto merge of #140 - rust-lang-nursery:backports, r=alexcrichton
backport rust-lang/rust changes this mainly removes a bunch of unused intrinsics r? @alexcrichton
2 parents 9debde0 + f7bd48e commit 3e8aa49

File tree

1 file changed

+7
-12
lines changed

1 file changed

+7
-12
lines changed

build.rs

+7-12
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,12 @@ fn main() {
5050
println!("cargo:rerun-if-changed=build.rs");
5151

5252
let target = env::var("TARGET").unwrap();
53+
54+
// Emscripten's runtime includes all the builtins
55+
if target.contains("emscripten") {
56+
return;
57+
}
58+
5359
let Cfg { ref target_arch, ref target_os, ref target_env, ref target_vendor, .. } =
5460
Cfg::new(&target).unwrap_or_else(|e| {
5561
writeln!(io::stderr(), "{}", e).ok();
@@ -110,7 +116,6 @@ fn main() {
110116
"addvdi3.c",
111117
"addvsi3.c",
112118
"apple_versioning.c",
113-
"clear_cache.c",
114119
"clzdi2.c",
115120
"clzsi2.c",
116121
"cmpdi2.c",
@@ -176,12 +181,10 @@ fn main() {
176181

177182
if target_os != "ios" {
178183
sources.extend(&["absvti2.c",
179-
"addtf3.c",
180184
"addvti3.c",
181185
"clzti2.c",
182186
"cmpti2.c",
183187
"ctzti2.c",
184-
"divtf3.c",
185188
"ffsti2.c",
186189
"fixdfti.c",
187190
"fixsfti.c",
@@ -195,16 +198,12 @@ fn main() {
195198
"floatuntidf.c",
196199
"floatuntisf.c",
197200
"floatuntixf.c",
198-
"multf3.c",
199201
"mulvti3.c",
200202
"negti2.c",
201203
"negvti2.c",
202204
"parityti2.c",
203205
"popcountti2.c",
204-
"powitf2.c",
205-
"subtf3.c",
206206
"subvti3.c",
207-
"trampoline_setup.c",
208207
"ucmpti2.c"]);
209208
}
210209

@@ -217,16 +216,12 @@ fn main() {
217216
"atomic_thread_fence.c"]);
218217
}
219218

220-
if target_os != "windows" && target_os != "none" {
221-
sources.extend(&["emutls.c"]);
222-
}
223-
224219
if target_env == "msvc" {
225220
if target_arch == "x86_64" {
226221
sources.extend(&["x86_64/floatdidf.c", "x86_64/floatdisf.c", "x86_64/floatdixf.c"]);
227222
}
228223
} else {
229-
if target_os != "freebsd" {
224+
if target_os != "freebsd" && target_os != "netbsd" {
230225
sources.extend(&["gcc_personality_v0.c"]);
231226
}
232227

0 commit comments

Comments
 (0)