@@ -448,11 +448,11 @@ set(IOTJS_INCLUDE_DIRS
448
448
449
449
if (NOT BUILD_LIB_ONLY )
450
450
if ("${CMAKE_SYSTEM_NAME} " STREQUAL "Darwin" )
451
- iotjs_add_link_flags ("-Xlinker -map -Xlinker iotjs.map" )
451
+ iotjs_add_link_flags (-Wl, -map, iotjs.map )
452
452
elseif (USING_MSVC )
453
- iotjs_add_link_flags ("/ MAP:iotjs.map" )
453
+ iotjs_add_link_flags ("- MAP:iotjs.map" )
454
454
else ()
455
- iotjs_add_link_flags (" -Xlinker -Map -Xlinker iotjs.map" )
455
+ iotjs_add_link_flags (-Xlinker -Map= iotjs.map )
456
456
endif ()
457
457
endif ()
458
458
@@ -515,22 +515,21 @@ else()
515
515
file (READ "${IOTJS_SOURCE_DIR} /napi/node_symbols.txt" NODE_SYMBOLS )
516
516
string (REGEX REPLACE "[\r |\n ]" ";" NODE_SYMBOLS "${NODE_SYMBOLS} " )
517
517
518
- if (USING_MSVC )
519
- set (NODE_SYMBOL_SEPARATOR " /INCLUDE:" )
520
- if ("${TARGET_ARCH} " STREQUAL "i686" )
521
- set (NODE_SYMBOL_SEPARATOR "${NODE_SYMBOL_SEPARATOR} _" )
522
- endif ()
523
- else ()
524
- set (NODE_SYMBOLS_LINK_FLAGS "-Wl" )
525
- set (NODE_SYMBOL_SEPARATOR ",-u," )
526
- endif ()
527
-
528
518
foreach (NODE_SYMBOL ${NODE_SYMBOLS} )
529
- set (NODE_SYMBOLS_LINK_FLAGS
530
- "${NODE_SYMBOLS_LINK_FLAGS}${NODE_SYMBOL_SEPARATOR}${NODE_SYMBOL} " )
531
- endforeach ()
532
-
533
- iotjs_add_link_flags (${NODE_SYMBOLS_LINK_FLAGS} )
519
+ if (USING_MSVC )
520
+ if ("${TARGET_ARCH} " STREQUAL "i686" )
521
+ iotjs_add_link_flags ("/INCLUDE:_${NODE_SYMBOL} " )
522
+ else ()
523
+ iotjs_add_link_flags ("/INCLUDE:${NODE_SYMBOL} " )
524
+ endif ()
525
+ else ()
526
+ if ("${TARGET_OS} " STREQUAL "DARWIN" )
527
+ iotjs_add_link_flags ("-Wl,-u,_${NODE_SYMBOL} " )
528
+ else ()
529
+ iotjs_add_link_flags ("-Wl,-u,${NODE_SYMBOL} " )
530
+ endif ()
531
+ endif ()
532
+ endforeach ()
534
533
endif ()
535
534
endif (CREATE_SHARED_LIB )
536
535
0 commit comments