Add a codesize check of the freestanding/minimal stdlib to prevent large codesize regressions (#40653)

This commit is contained in:
Kuba (Brecka) Mracek
2022-01-05 15:12:02 -08:00
committed by GitHub
parent 2653b5b931
commit 5076af2ae4
7 changed files with 102 additions and 2 deletions

View File

@@ -0,0 +1,13 @@
// Check that we can LTO-optimize the freestanding/minimal stdlib against client usage of APIs, and that we don't produce unexpectedly large final binary.
// Important (!): This test is in test/stdlib/ to make sure it is actually run on the minimal/freestanding CI job, which
// filters the set of tests to test/stdlib/ only (see build-preset.ini).
// REQUIRES: freestanding
// REQUIRES: executable_test
// RUN: %empty-directory(%t)
// RUN: %target-build-swift %s -o %t/a.out
// RUN: %{python} %utils/check_freestanding_size.py --path %t/a.out --triple %module-target-triple --size-path %llvm-size
print("Hello world")