[libcxx-commits] [libcxx] [libc++] Run the test suite with optimizations by default (PR #118006)
via libcxx-commits
libcxx-commits at lists.llvm.org
Thu Nov 28 05:50:44 PST 2024
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-libcxx
Author: Louis Dionne (ldionne)
<details>
<summary>Changes</summary>
In production, libc++ is used with optimizations enabled 99.9% of the time. Therefore, I think it makes sense to run our tests with optimizations enabled by default, to be closer to what people actually use in production. It's still possible to disable optimizations for debugging purposes or other reasons.
This also removes the pitfall of trying to run the benchmarks but forgetting to set the optimization level.
---
Full diff: https://github.com/llvm/llvm-project/pull/118006.diff
1 Files Affected:
- (modified) libcxx/utils/libcxx/test/params.py (+1-1)
``````````diff
diff --git a/libcxx/utils/libcxx/test/params.py b/libcxx/utils/libcxx/test/params.py
index 2c5cb169c0a9a3..8ecd1a32799a31 100644
--- a/libcxx/utils/libcxx/test/params.py
+++ b/libcxx/utils/libcxx/test/params.py
@@ -193,7 +193,7 @@ def getSuitableClangTidy(cfg):
choices=["none", "speed", "size"],
type=str,
help="The optimization level to use when compiling the test suite.",
- default="none",
+ default="speed",
actions=lambda opt: filter(None, [
AddCompileFlag(lambda cfg: getSpeedOptimizationFlag(cfg)) if opt == "speed" else None,
AddCompileFlag(lambda cfg: getSizeOptimizationFlag(cfg)) if opt == "size" else None,
``````````
</details>
https://github.com/llvm/llvm-project/pull/118006
More information about the libcxx-commits
mailing list