Skip to content

Commit 66adc82

Browse files
authored
Only export API symbols for shared builds (#1525)
1 parent ed80a90 commit 66adc82

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

quickjs.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ extern "C" {
6868
# define JS_EXTERN /* nothing */
6969
# endif
7070
#else
71-
# ifdef QUICKJS_NG_CC_GNULIKE
71+
# if defined(BUILDING_QJS_SHARED) && defined(QUICKJS_NG_CC_GNULIKE)
7272
# define JS_EXTERN __attribute__((visibility("default")))
7373
# else
7474
# define JS_EXTERN /* nothing */
@@ -109,7 +109,7 @@ extern "C" {
109109
# define JS_MODULE_EXTERN __declspec(dllimport)
110110
# endif
111111
#else
112-
# ifdef QUICKJS_NG_CC_GNULIKE
112+
# if defined(QUICKJS_NG_MODULE_BUILD) && defined(QUICKJS_NG_CC_GNULIKE)
113113
# define JS_MODULE_EXTERN __attribute__((visibility("default")))
114114
# else
115115
# define JS_MODULE_EXTERN /* nothing */

0 commit comments

Comments
 (0)