Skip to content

Instantly share code, notes, and snippets.

@kripken
Created July 5, 2019 21:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kripken/00cb60f86bbb6f0931ff6e2729a7a178 to your computer and use it in GitHub Desktop.
Save kripken/00cb60f86bbb6f0931ff6e2729a7a178 to your computer and use it in GitHub Desktop.
#!/bin/bash
~/Dev/emscripten/em++ -std=c++11 \
-I./libc/include -Oz -s SUPPORT_ERRNO=1 -s EXIT_RUNTIME=0 -s WASM_OBJECT_FILES=0 --llvm-lto 1 -s MALLOC=emmalloc --closure 1 -s ENVIRONMENT=node \
-fno-exceptions -fno-rtti -fno-threadsafe-statics -fvisibility-inlines-hidden \
-DHB_TINY -DHB_USE_INTERNAL_QSORT \
-s 'EXPORTED_FUNCTIONS=["_malloc", "_hb_blob_create", "_hb_face_create", "_hb_font_create", "_hb_buffer_create", "_hb_buffer_add_utf8", "_hb_buffer_guess_segment_properties", "_hb_buffer_set_direction", "_hb_shape", "_hb_buffer_get_glyph_infos", "_hb_buffer_get_glyph_positions", "_hb_buffer_get_length", "_hb_buffer_destroy", "_hb_font_destroy", "_hb_face_destroy", "_hb_blob_destroy", "_hb_blob_get_length", "_hb_font_set_scale", "_free"]' \
libc/zephyr-string.c libc/main.c harfbuzz/src/harfbuzz.cc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment