Skip to content
This repository was archived by the owner on Aug 22, 2022. It is now read-only.
This repository was archived by the owner on Aug 22, 2022. It is now read-only.

Disable emcc sanity checks for child processes to remove sleep hack #331

Description

@aheejin

TODO: Disable emcc sanity checks for child processes in emscripten and remove this hack. Looks like some related work is underway emscripten-core/emscripten#6124.

waterfall/src/build.py

Lines 1135 to 1153 in 53ed3e7

# FIXME HACK emcc does sanity check by comparing mtime of the sanity file
# with that of emscripten config file. The sanity check process in
# emscripten thinks current cache is invalid when 'sanity file's mtime <=
# config file's mtime'. embuilder launches emcc for each of system library
# we need to build, and each of those emcc process in turn launches several
# more emcc processes for each of .c source file included in the library.
# Each of these emcc processes runs its own sanity check, which is
# unnecessary anyway, and we are planning to fix it. But this is also
# causing problems for Mac and Windows build in waterfall. The first emcc
# process sees the configuration file has changed, deletes cache, and
# rewrites the sanity file. Then, Mac OS X and Windows' timestamps for
# mtime only have 1~2 seconds resolution, which makes it possible that
# other emcc processes launched later by the initial emcc process again
# think the cache is invalid and delete the cache again, which would then
# contain half-built libraries, if less than 1 seconds has elapsed after
# the first deletion. So here we make sure that enough time has elapsed
# between configuration file writing and sanity checking, so that it would
# temporarily work on Mac and Windows.
time.sleep(3)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions