[libcxx-commits] [libcxx] [libc++] Add code size benchmarks (PR #226152)

Louis Dionne via libcxx-commits libcxx-commits at lists.llvm.org
Thu Sep 24 07:18:05 PDT 2026


================
@@ -367,6 +368,10 @@ def execute(self, test, litConfig):
                 parse_results = os.path.join(LIBCXX_UTILS, 'parse-google-benchmark-results')
                 steps += [f"{parse_results} %{{temp}}/benchmark-result.json --output-format=lnt > %{{temp}}/results.lnt"]
             return self._executeShTest(test, litConfig, steps)
+        elif filename.endswith(".codesize.cpp"):
+            steps = ["%dbg(COMPILED WITH) %{cxx} %s %{flags} %{compile_flags} -c -ffunction-sections -o %t.o",
----------------
ldionne wrote:

We also need to produce the text file containing function breakdowns as a result of running the tests. Then if you want you can do something like `cat <file>.txt` so it is included in `--show-all` output.

https://github.com/llvm/llvm-project/pull/226152


More information about the libcxx-commits mailing list