mirror of https://github.com/YosysHQ/abc.git
Patch for lack of `system` on WASM
This commit is contained in:
parent
b502f00222
commit
03da96f12f
|
|
@ -145,7 +145,11 @@ Gia_Man_t * Gia_StochProcessOne( Gia_Man_t * p, char * pScript, int Rand, int Ti
|
|||
sprintf( FileName, "%06x.aig", Rand );
|
||||
Gia_AigerWrite( p, FileName, 0, 0, 0 );
|
||||
sprintf( Command, "./abc -q \"&read %s; %s; &write %s\"", FileName, pScript, FileName );
|
||||
#if defined(__wasm)
|
||||
if ( 1 )
|
||||
#else
|
||||
if ( system( (char *)Command ) )
|
||||
#endif
|
||||
{
|
||||
fprintf( stderr, "The following command has returned non-zero exit status:\n" );
|
||||
fprintf( stderr, "\"%s\"\n", (char *)Command );
|
||||
|
|
|
|||
|
|
@ -7252,7 +7252,11 @@ int Abc_CommandRunSat( Abc_Frame_t * pAbc, int argc, char ** argv )
|
|||
sprintf( pCommand, "kissat -q --seed=%d %s", i, pFileCnf );
|
||||
else if ( fWalk )
|
||||
sprintf( pCommand, "walk -s%d %s", i, pFileCnf );
|
||||
#if defined(__wasm)
|
||||
if (1) {
|
||||
#else
|
||||
if (system(pCommand) == -1) {
|
||||
#endif
|
||||
fprintf(stdout, "Command \"%s\" did not succeed.\n", pCommand);
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue