Skip to content

Commit 05c7d30

Browse files
author
bors-servo
authored
Auto merge of #185 - jdm:no-nspr, r=asajeffrey
Don't build NSPR at all. <!-- Reviewable:start --> This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/mozjs/185) <!-- Reviewable:end -->
2 parents 2e00bbc + 281ab6b commit 05c7d30

File tree

5 files changed

+27
-6
lines changed

5 files changed

+27
-6
lines changed

build.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,8 +123,6 @@ fn build_jsapi() {
123123
println!("cargo:rustc-link-lib=psapi");
124124
println!("cargo:rustc-link-lib=user32");
125125
println!("cargo:rustc-link-lib=Dbghelp");
126-
println!("cargo:rustc-link-search=native={}/config/external/nspr/pr", out_dir);
127-
println!("cargo:rustc-link-lib=nspr4");
128126
if target.contains("gnu") {
129127
println!("cargo:rustc-link-lib=stdc++");
130128
}
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
diff --git a/mozjs/js/src/vm/PosixNSPR.cpp b/mozjs/js/src/vm/PosixNSPR.cpp
2+
index 41ce31e488..fdeee75b1b 100644
3+
--- a/mozjs/js/src/vm/PosixNSPR.cpp
4+
+++ b/mozjs/js/src/vm/PosixNSPR.cpp
5+
@@ -11,7 +11,6 @@
6+
#ifdef JS_POSIX_NSPR
7+
8+
# include <errno.h>
9+
-# include <sys/time.h>
10+
# include <time.h>
11+
12+
int32_t PR_FileDesc2NativeHandle(PRFileDesc *fd) {
13+
diff --git a/mozjs/js/src/vm/Time.cpp b/mozjs/js/src/vm/Time.cpp
14+
index e1c810cc29..19ee15009b 100644
15+
--- a/mozjs/js/src/vm/Time.cpp
16+
+++ b/mozjs/js/src/vm/Time.cpp
17+
@@ -27,8 +27,6 @@
18+
# include <mmsystem.h> /* for timeBegin/EndPeriod */
19+
# include <stdlib.h> /* for _set_invalid_parameter_handler */
20+
21+
-# include "prinit.h"
22+
-
23+
#endif
24+
25+
#ifdef XP_UNIX

makefile.cargo

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@ CONFIGURE_FLAGS := \
88
--disable-js-shell \
99
--disable-tests \
1010
--disable-shared-js \
11-
--build-backends=RecursiveMake
11+
--build-backends=RecursiveMake \
12+
--enable-posix-nspr-emulation
1213

1314
ifeq (windows,$(findstring windows,$(TARGET)))
1415
WINDOWS := 1

mozjs/js/src/vm/PosixNSPR.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
#ifdef JS_POSIX_NSPR
1212

1313
# include <errno.h>
14-
# include <sys/time.h>
1514
# include <time.h>
1615

1716
int32_t PR_FileDesc2NativeHandle(PRFileDesc *fd) {

mozjs/js/src/vm/Time.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,6 @@
2727
# include <mmsystem.h> /* for timeBegin/EndPeriod */
2828
# include <stdlib.h> /* for _set_invalid_parameter_handler */
2929

30-
# include "prinit.h"
31-
3230
#endif
3331

3432
#ifdef XP_UNIX

0 commit comments

Comments
 (0)