From 82ff2e7df2243b679aadbc6cc120a2b5f7ee73b3 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Mon, 26 Feb 2024 09:21:47 +0200 Subject: 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 --- libbuild2/c/init.cxx | 1 + 1 file changed, 1 insertion(+) (limited to 'libbuild2/c') diff --git a/libbuild2/c/init.cxx b/libbuild2/c/init.cxx index 10b3d6a..8bc2f7d 100644 --- a/libbuild2/c/init.cxx +++ b/libbuild2/c/init.cxx @@ -345,6 +345,7 @@ namespace build2 vp["cc.module_name"], vp["cc.importable"], vp["cc.reprocess"], + vp["cc.serialize"], vp.insert ("c.preprocessed"), // See cxx.preprocessed. nullptr, // No __symexport (no modules). -- cgit v1.1