Example invocation:
em++ -s USE_PTHREADS=1 tests/pthread/test_pthread_clock_drift.cpp
Does not use any graphics, but output a.out.js contains
var GL={counter:1,buffers:[],programs:[],framebuffers:[],renderbuffers:[],textures:[],uniforms:[],shaders:[],
and so on.
Not eliminated when using -O3 or even --closure 1.