Skip to content

Commit 499b892

Browse files
author
bors-servo
authored
Auto merge of #180 - asajeffrey:add-libcpp-inline-visibility-envvar, r=jdm
Add _LIBCPP_INLINE_VISIBILITY environment variable This patch allows the `_LIBCPP_INLINE_VISIBILITY` variable to be set by an environment variable, rather than just basing it on the compiler and target OS. It's needed for builds for Android targets which use the usual `libc++`, such as magicleap. <!-- 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/180) <!-- Reviewable:end -->
2 parents 2f27f40 + f97767d commit 499b892

File tree

4 files changed

+31
-3
lines changed

4 files changed

+31
-3
lines changed

.travis.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ addons:
1717
- llvm-toolchain-xenial-5.0
1818
packages:
1919
- autoconf2.13
20+
- gcc-6
2021
- g++-6
2122
- clang-5.0
2223

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
name = "mozjs_sys"
33
description = "System crate for the Mozilla SpiderMonkey JavaScript engine."
44
repository = "https://github.com/servo/mozjs/"
5-
version = "0.61.12"
5+
version = "0.61.13"
66
authors = ["Mozilla"]
77
links = "mozjs"
88
build = "build.rs"
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
diff --git a/mozjs/build/moz.configure/toolchain.configure b/mozjs/build/moz.configure/toolchain.configure
2+
index a1e443019..613ce94aa 100755
3+
--- a/mozjs/build/moz.configure/toolchain.configure
4+
+++ b/mozjs/build/moz.configure/toolchain.configure
5+
@@ -1199,8 +1199,14 @@ set_config('COLOR_CFLAGS', color_cflags)
6+
# hidden visibility.
7+
8+
9+
-@depends(c_compiler, target)
10+
-def libcxx_override_visibility(c_compiler, target):
11+
+option(env='_LIBCPP_INLINE_VISIBILITY',
12+
+ nargs=1,
13+
+ help='Visibility of libc++ inlines')
14+
+
15+
+@depends('_LIBCPP_INLINE_VISIBILITY', c_compiler, target)
16+
+def libcxx_override_visibility(value, c_compiler, target):
17+
+ if len(value):
18+
+ return value[0]
19+
if c_compiler.type == 'clang' and target.os == 'Android':
20+
return ''
21+

mozjs/build/moz.configure/toolchain.configure

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1199,8 +1199,14 @@ set_config('COLOR_CFLAGS', color_cflags)
11991199
# hidden visibility.
12001200

12011201

1202-
@depends(c_compiler, target)
1203-
def libcxx_override_visibility(c_compiler, target):
1202+
option(env='_LIBCPP_INLINE_VISIBILITY',
1203+
nargs=1,
1204+
help='Visibility of libc++ inlines')
1205+
1206+
@depends('_LIBCPP_INLINE_VISIBILITY', c_compiler, target)
1207+
def libcxx_override_visibility(value, c_compiler, target):
1208+
if len(value):
1209+
return value[0]
12041210
if c_compiler.type == 'clang' and target.os == 'Android':
12051211
return ''
12061212

0 commit comments

Comments
 (0)