Preload embedded trace on emscripten.

This commit is contained in:
Bartosz Taudul 2022-10-02 00:41:08 +02:00
parent dff45f1dc1
commit 75b95233ea
No known key found for this signature in database
GPG Key ID: B7FE2008B7575DF3
2 changed files with 4 additions and 1 deletions

View File

@ -5,7 +5,7 @@ CFLAGS += -sUSE_FREETYPE=1 -pthread
CXXFLAGS := $(CFLAGS) -std=c++17 CXXFLAGS := $(CFLAGS) -std=c++17
DEFINES += -DIMGUI_ENABLE_FREETYPE -DIMGUI_IMPL_OPENGL_ES2 DEFINES += -DIMGUI_ENABLE_FREETYPE -DIMGUI_IMPL_OPENGL_ES2
INCLUDES := -I../../../imgui -I$(HOME)/.emscripten_cache/sysroot/include/capstone INCLUDES := -I../../../imgui -I$(HOME)/.emscripten_cache/sysroot/include/capstone
LIBS += -lpthread -ldl $(HOME)/.emscripten_cache/sysroot/lib/libcapstone.a -sUSE_GLFW=3 -sTOTAL_MEMORY=512mb -sWASM_BIGINT=1 -sPTHREAD_POOL_SIZE=4 LIBS += -lpthread -ldl $(HOME)/.emscripten_cache/sysroot/lib/libcapstone.a -sUSE_GLFW=3 -sTOTAL_MEMORY=512mb -sWASM_BIGINT=1 -sPTHREAD_POOL_SIZE=4 --preload-file embed.tracy
PROJECT := Tracy PROJECT := Tracy
IMAGE := $(PROJECT)-$(BUILD).html IMAGE := $(PROJECT)-$(BUILD).html

View File

@ -148,6 +148,9 @@ int main( int argc, char** argv )
sprintf( title, "Tracy Profiler %i.%i.%i", tracy::Version::Major, tracy::Version::Minor, tracy::Version::Patch ); sprintf( title, "Tracy Profiler %i.%i.%i", tracy::Version::Major, tracy::Version::Minor, tracy::Version::Patch );
std::unique_ptr<tracy::FileRead> initFileOpen; std::unique_ptr<tracy::FileRead> initFileOpen;
#ifdef __EMSCRIPTEN__
initFileOpen = std::unique_ptr<tracy::FileRead>( tracy::FileRead::Open( "embed.tracy" ) );
#endif
if( argc == 2 ) if( argc == 2 )
{ {
if( strcmp( argv[1], "--help" ) == 0 ) if( strcmp( argv[1], "--help" ) == 0 )