Skip to content

Commit 5febd67

Browse files
sparistDawn LUCI CQ
authored andcommitted
Only define NAPI_SYMBOL as weak stub on Clang
Change-Id: I0c1752db20343abe03d174c9a9b67f602c5423b5 Bug: dawn:1978 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/146800 Kokoro: Kokoro <[email protected]> Commit-Queue: Ben Clayton <[email protected]> Reviewed-by: Ben Clayton <[email protected]>
1 parent e205317 commit 5febd67

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/dawn/node/NapiSymbols.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,16 @@
2525
#error "NapiSymbols.cpp is not used on Windows"
2626
#endif
2727

28+
#ifdef __clang__
2829
#define NAPI_SYMBOL(NAME) \
2930
__attribute__((weak)) void NAME() { \
3031
UNREACHABLE( \
3132
"#NAME is a weak stub, and should have been runtime replaced by the node " \
3233
"implementation"); \
3334
}
35+
#else
36+
#define NAPI_SYMBOL(NAME)
37+
#endif
3438

3539
extern "C" {
3640
// List of Napi symbols generated from the node_api_headers/symbols.js file

0 commit comments

Comments
 (0)