mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-26 07:54:36 +00:00
Add emscripten build files.
This commit is contained in:
parent
78169326b3
commit
ffa48be2d9
12
profiler/build/wasm/Makefile
Normal file
12
profiler/build/wasm/Makefile
Normal file
@ -0,0 +1,12 @@
|
||||
all: release
|
||||
|
||||
debug:
|
||||
@+make -f debug.mk all
|
||||
|
||||
release:
|
||||
@+make -f release.mk all
|
||||
|
||||
clean:
|
||||
@+make -f build.mk clean
|
||||
|
||||
.PHONY: all clean debug release db
|
19
profiler/build/wasm/build.mk
Normal file
19
profiler/build/wasm/build.mk
Normal file
@ -0,0 +1,19 @@
|
||||
CC=emcc
|
||||
CXX=em++
|
||||
|
||||
CFLAGS += -sUSE_FREETYPE=1 -pthread
|
||||
CXXFLAGS := $(CFLAGS) -std=c++17
|
||||
DEFINES += -DIMGUI_ENABLE_FREETYPE -DIMGUI_IMPL_OPENGL_ES2
|
||||
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
|
||||
|
||||
PROJECT := Tracy
|
||||
IMAGE := $(PROJECT)-$(BUILD).html
|
||||
NO_TBB := 1
|
||||
|
||||
FILTER := ../../../nfd/nfd_win.cpp
|
||||
include ../../../common/src-from-vcxproj.mk
|
||||
|
||||
CXXFLAGS += -DTRACY_NO_FILESELECTOR
|
||||
|
||||
include ../../../common/unix.mk
|
7
profiler/build/wasm/debug.mk
Normal file
7
profiler/build/wasm/debug.mk
Normal file
@ -0,0 +1,7 @@
|
||||
CFLAGS := -g3 -gsource-map -Wall
|
||||
DEFINES := -DDEBUG
|
||||
BUILD := debug
|
||||
LIBS := -sDEMANGLE_SUPPORT=1
|
||||
|
||||
include ../../../common/unix-debug.mk
|
||||
include build.mk
|
17
profiler/build/wasm/httpd.py
Normal file
17
profiler/build/wasm/httpd.py
Normal file
@ -0,0 +1,17 @@
|
||||
from http import server
|
||||
|
||||
class MyHTTPRequestHandler(server.SimpleHTTPRequestHandler):
|
||||
def end_headers(self):
|
||||
self.send_my_headers()
|
||||
server.SimpleHTTPRequestHandler.end_headers(self)
|
||||
|
||||
def send_my_headers(self):
|
||||
self.send_header("Cache-Control", "no-cache, no-store, must-revalidate")
|
||||
self.send_header("Pragma", "no-cache")
|
||||
self.send_header("Expires", "0")
|
||||
self.send_header("Cross-Origin-Embedder-Policy", "require-corp");
|
||||
self.send_header("Cross-Origin-Opener-Policy", "same-origin");
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
server.test(HandlerClass=MyHTTPRequestHandler)
|
9
profiler/build/wasm/release.mk
Normal file
9
profiler/build/wasm/release.mk
Normal file
@ -0,0 +1,9 @@
|
||||
CFLAGS := -Os
|
||||
ifndef TRACY_NO_LTO
|
||||
CFLAGS += -flto
|
||||
endif
|
||||
DEFINES := -DNDEBUG
|
||||
BUILD := release
|
||||
|
||||
include ../../../common/unix-release.mk
|
||||
include build.mk
|
Loading…
Reference in New Issue
Block a user