diff options
author | Mathew Robinson <chasinglogic@gmail.com> | 2020-01-31 17:25:08 -0500 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2020-01-31 22:37:45 +0000 |
commit | e1774c067b3074f9c28f284061d9de0820f942c7 (patch) | |
tree | 6824b3a4cbef40adb9d891ea30f031132ca47a9b /SConstruct | |
parent | d9bd7a1be843ddb38473506ea2aa4802be6d9993 (diff) | |
download | mongo-e1774c067b3074f9c28f284061d9de0820f942c7.tar.gz |
Revert "SERVER-45302 Only write Ninja file if the contents have changed"
This reverts commit 66c7d6485f6e6f921b5ce455ec1d3f90dd0e1d37.
Diffstat (limited to 'SConstruct')
-rw-r--r-- | SConstruct | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/SConstruct b/SConstruct index 394385ecf70..4ed8cbce671 100644 --- a/SConstruct +++ b/SConstruct @@ -4265,18 +4265,10 @@ env.Alias("distsrc", "distsrc-tgz") # # psutil.cpu_count returns None when it can't determine the number. This always # fails on BSD's for example. -cpu_count = psutil.cpu_count() - -# If using icecream try to set the number of jobs higher than the -# cpu_count since the cluster will have more concurrency. We want to -# avoid doing this 8x scaling when ninja is enabled with Icecream -# however since the ninja tool reads num_jobs to build local pools for -# execution. So only do the scaling if Scons is driving the icecream -# build. -if cpu_count is not None and 'ICECC' in env and get_option('ninja') != 'true': - env.SetOption('num_jobs', 8 * cpu_count) -elif cpu_count is not None: - env.SetOption('num_jobs', cpu_count) +if psutil.cpu_count() is not None and 'ICECC' not in env: + env.SetOption('num_jobs', psutil.cpu_count()) +elif psutil.cpu_count() and 'ICECC' in env: + env.SetOption('num_jobs', 8 * psutil.cpu_count()) # Do this as close to last as possible before reading SConscripts, so |