I'm using CMAKE and the Emscripten that comes with Unity 3D (the Emscripten
version is 1.37.3).
I'm using this command on a Windows Batch file to compile the library (the
parameter %~1 is the Unity installation folder):
SET UNITYPATH=C:/Program Files/%~1
SET
EMSCRIPTEN=%UNITYPATH%/Editor/data/PlaybackEngines/WebGLSupport/BuildTools/Emscripten
SET
BINARYEN=%UNITYPATH%/Editor/Data/PlaybackEngines/WebGLSupport/BuildTools/Emscripten_FastComp_Win/binaryen/bin
SET
LLVM=%UNITYPATH%/Editor/Data/PlaybackEngines/WebGLSupport/BuildTools/Emscripten_FastComp_Win
CALL "%EMSCRIPTEN%/emcmake" cmake ../assimp -DEMSCRIPTEN=1 -G "MinGW
Makefiles"
-DCMAKE_TOOLCHAIN_FILE="%UNITYPATH%/Editor/data/PlaybackEngines/WebGLSupport/BuildTools/Emscripten/cmake/Modules/Platform/Emscripten.cmake"
-DCMAKE_MODULE_PATH="%UNITYPATH%/Editor/data/PlaybackEngines/WebGLSupport/BuildTools/Emscripten/cmake"
-DCMAKE_BUILD_TYPE=MinSizeRel -DASSIMP_BUILD_TESTS=OFF
-DASSIMP_BUILD_ASSIMP_TOOLS=OFF -DASSIMP_NO_EXPORT=ON
-DASSIMP_BUILD_MINIZIP=ON -DASSIMP_BUILD_ZLIB=ON -DBUILD_SHARED_LIBS=ON
-DCMAKE_C_FLAGS=-Wno-implicit-function-declaration
-DCMAKE_CXX_FLAGS=-Wno-implicit-function-declaration
-DASSIMP_BUILD_Q3BSP_IMPORTER=OFF -DASSIMP_BUILD_IFC_IMPORTER=OFF
CALL "%EMSCRIPTEN%/emmake" mingw32-make
On my CMakeLists.txt I have this line that defines the version-script:
SET_TARGET_PROPERTIES( assimp PROPERTIES
OUTPUT_NAME assimp${LIBRARY_SUFFIX}
LINK_FLAGS "-Wl,--version-script=${CMAKE_SOURCE_DIR}/assimp.version"
)
My assimp.version file has the methods I want to expose marked as global:
VERS_1.0 {
global:
aiAnimation_GetAnimationChannel;
aiAnimation_GetDuraction;
aiAnimation_GetName;
...truncated
local:
*;
};
It should make only the symbols on the version script global, but the
symbols from all compilation units are marked as global in the final .a
(BC) file.
Em quinta-feira, 7 de fevereiro de 2019 20:47:22 UTC-2, Sam Clegg escreveu:
>
> Are you trying to hide them from other translation units in the same
> link command? Or from the outside (e.g. JS)?
>
> Can you post the command line you are using when compiling your BC
> library, or at least the flags you using to try to control this? Are
> you using `llvm-link` to create your BC library?
>
> On Thu, Feb 7, 2019 at 9:20 AM Ricardo Reis <[email protected]
> <javascript:>> wrote:
> >
> > Hi!
> >
> > I'm trying to hide some symbols from external code using a
> version-script when compiling my BC library, but the symbols still visible
> to the outside. Any example on how it should be done?
> >
> > --
> > You received this message because you are subscribed to the Google
> Groups "emscripten-discuss" group.
> > To unsubscribe from this group and stop receiving emails from it, send
> an email to [email protected] <javascript:>.
>
> > For more options, visit https://groups.google.com/d/optout.
>
--
You received this message because you are subscribed to the Google Groups
"emscripten-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.