Skip to content

Commit 25aa757

Browse files
ci_lynxjianliang00
authored andcommitted
[BugFix] Fix headless NAPI config for Harmony
- Extend the headless NAPI visibility define to Harmony in third_party/napi/BUILD.gn. - Harmony headless builds need the same hidden symbol export behavior as Android. AutoLand: release/3.9, release/4.0
1 parent 5ae8e21 commit 25aa757

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

third_party/napi/BUILD.gn

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,19 +20,16 @@ config("napi_config") {
2020
if (use_primjs_napi) {
2121
defines += [ "USE_PRIMJS_NAPI" ]
2222
}
23-
24-
if (is_headless && is_android) {
25-
defines += [ "NAPI_EXTERN=__attribute__((visibility(\"hidden\")))" ]
26-
}
2723
}
2824

2925
config("private_config") {
3026
cflags = [
3127
"-Wno-sign-compare",
3228
"-Wno-unused-function",
3329
]
30+
defines = []
3431
if (is_win) {
35-
defines = [ "OS_WIN" ]
32+
defines += [ "OS_WIN" ]
3633
}
3734
if (is_win || is_mac) {
3835
cflags += [ "-Wno-c99-designator" ]
@@ -45,6 +42,9 @@ config("private_config") {
4542
"../quickjs/src/src/napi",
4643
"../quickjs/src/src/napi/common",
4744
]
45+
if (is_headless && (is_android || is_harmony)) {
46+
defines += [ "NAPI_EXTERN=__attribute__((visibility(\"hidden\")))" ]
47+
}
4848
}
4949

5050
source_set("adapter") {

0 commit comments

Comments
 (0)