forked from flutter/engine
-
Notifications
You must be signed in to change notification settings - Fork 0
/
BUILD.gn
31 lines (27 loc) · 953 Bytes
/
BUILD.gn
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# Copyright 2013 The Flutter Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import("//build/compiled_action.gni")
import("//flutter/common/config.gni")
import("//flutter/impeller/tools/malioc.gni")
import("//flutter/testing/testing.gni")
declare_args() {
# Maximum number of malioc processes to run in parallel.
#
# To avoid out-of-memory errors we explicitly reduce the number of jobs.
impeller_concurrent_malioc_jobs = -1
}
if (impeller_concurrent_malioc_jobs == -1) {
_script = "//flutter/build/get_concurrent_jobs.py"
_args = [
"--reserve-memory=1GB",
"--memory-per-job",
"malioc=100MB",
]
_concurrent_jobs = exec_script(_script, _args, "json", [ _script ])
impeller_concurrent_malioc_jobs = _concurrent_jobs.malioc
assert(impeller_concurrent_malioc_jobs > 0)
}
pool("malioc_pool") {
depth = impeller_concurrent_malioc_jobs
}