aboutsummaryrefslogtreecommitdiff
path: root/libbuild2/cc/common.hxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2024-02-26 09:21:47 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2024-02-26 09:21:47 +0200
commit82ff2e7df2243b679aadbc6cc120a2b5f7ee73b3 (patch)
tree616e33051cf012f9790641f0127901f0c7d6ed38 /libbuild2/cc/common.hxx
parent4a2a3bd5033744c31377d31ca54be00622280a1b (diff)
Add ability to serialize compilation/linking in cc rules
Specifically, both the C/C++ compiler and link rules now recognize the cc.serialize boolean variable which instructs them to compiler/link serially with regards to any other recipe. This is primarily useful when compiling large translation units or linking large binaries that require so much memory that doing that in parallel with other compilation/linking jobs is likely to summon the OOM killer. For example: obj{memory-hog}: cc.serialize = true
Diffstat (limited to 'libbuild2/cc/common.hxx')
-rw-r--r--libbuild2/cc/common.hxx1
1 files changed, 1 insertions, 0 deletions
diff --git a/libbuild2/cc/common.hxx b/libbuild2/cc/common.hxx
index 6347005..cb85632 100644
--- a/libbuild2/cc/common.hxx
+++ b/libbuild2/cc/common.hxx
@@ -117,6 +117,7 @@ namespace build2
const variable& c_module_name; // cc.module_name
const variable& c_importable; // cc.importable
const variable& c_reprocess; // cc.reprocess
+ const variable& c_serialize; // cc.serialize
const variable& x_preprocessed; // x.preprocessed
const variable* x_symexport; // x.features.symexport