Skip to content

Commit e7e471a

Browse files
author
Alan Jeffrey
committed
Add a _LIBCPP_INLINE_VISIBILITY environment variable
1 parent 2f27f40 commit e7e471a

File tree

2 files changed

+29
-2
lines changed

2 files changed

+29
-2
lines changed
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)