2
0
mirror of https://github.com/boostorg/build.git synced 2026-02-14 12:42:11 +00:00

Read options before commit (#408)

* src/engine/jam.c
 ( main ): Read KEEP_GOING and PARALLELISM before calls to parse-file, so they are respected also here.
This commit is contained in:
jehelset
2019-03-18 05:11:14 +01:00
committed by Rene Rivera
parent f8e6caeb45
commit 1cf0b2031a

View File

@@ -601,6 +601,30 @@ int main( int argc, char * * argv, char * * arg_environ )
}
}
/* The build system may set the PARALLELISM variable to override -j
* options.
*/
{
LIST * const p = var_get( root_module(), constant_PARALLELISM );
if ( !list_empty( p ) )
{
int const j = atoi( object_str( list_front( p ) ) );
if ( j < 1 )
out_printf( "Invalid value of PARALLELISM: %s.\n",
object_str( list_front( p ) ) );
else
globs.jobs = j;
}
}
/* KEEP_GOING overrides -q option. */
{
LIST * const p = var_get( root_module(), constant_KEEP_GOING );
if ( !list_empty( p ) )
globs.quitquick = atoi( object_str( list_front( p ) ) ) ? 0 : 1;
}
if ( list_empty( targets_to_update() ) )
mark_target_for_updating( constant_all );
@@ -629,28 +653,6 @@ int main( int argc, char * * argv, char * * arg_environ )
object_free( target );
}
/* The build system may set the PARALLELISM variable to override -j
* options.
*/
{
LIST * const p = var_get( root_module(), constant_PARALLELISM );
if ( !list_empty( p ) )
{
int const j = atoi( object_str( list_front( p ) ) );
if ( j < 1 )
out_printf( "Invalid value of PARALLELISM: %s.\n",
object_str( list_front( p ) ) );
else
globs.jobs = j;
}
}
/* KEEP_GOING overrides -q option. */
{
LIST * const p = var_get( root_module(), constant_KEEP_GOING );
if ( !list_empty( p ) )
globs.quitquick = atoi( object_str( list_front( p ) ) ) ? 0 : 1;
}
/* Now make target. */
{