Skip to content

Is there a way to replace emscripten stub functions? #18728

Answered by sbc100
iliakan asked this question in Q&A
Discussion options

You must be logged in to vote

If you include your own definition of fork in your program (i.e. in one of your object files, or libraries) the linker will choose your definition over the stub one.

Alternatively if you set -sALLOW_UNIMPLEMENTED_SYSCALLS=0 the stub library will not be included at all, and you will be forced to implement any symbols your program depends on.

From settings.js:

// Include unimplemented JS syscalls to be included in the final output.  This   
// allows programs that depend on these syscalls at runtime to be compiled, even 
// though these syscalls will fail (or do nothing) at runtime.                      
var ALLOW_UNIMPLEMENTED_SYSCALLS = true;  

Replies: 4 comments 23 replies

Comment options

You must be logged in to vote
11 replies
@iliakan
Comment options

@sbc100
Comment options

@iliakan
Comment options

@sbc100
Comment options

@iliakan
Comment options

Answer selected by iliakan
Comment options

You must be logged in to vote
5 replies
@sbc100
Comment options

@iliakan
Comment options

@sbc100
Comment options

@iliakan
Comment options

@sbc100
Comment options

Comment options

You must be logged in to vote
2 replies
@iliakan
Comment options

@iliakan
Comment options

Comment options

You must be logged in to vote
5 replies
@sbc100
Comment options

@iliakan
Comment options

@iliakan
Comment options

@sbc100
Comment options

@iliakan
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants