Skip to content

Commit

Permalink
[mypyc] Make C unit tests faster by compiling with -O0 (#17884)
Browse files Browse the repository at this point in the history
Most time is spent in compilation, so runtime performance doesn't really
matter.
  • Loading branch information
JukkaL authored Oct 6, 2024
1 parent 13d6738 commit 4da779b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion mypyc/test/test_external.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@ def test_c_unit_test(self) -> None:
cppflags: list[str] = []
env = os.environ.copy()
if sys.platform == "darwin":
cppflags += ["-mmacosx-version-min=10.10", "-stdlib=libc++"]
cppflags += ["-O0", "-mmacosx-version-min=10.10", "-stdlib=libc++"]
elif sys.platform == "linux":
cppflags += ["-O0"]
env["CPPFLAGS"] = " ".join(cppflags)
# Build Python wrapper for C unit tests.

Expand Down

0 comments on commit 4da779b

Please sign in to comment.