Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

replaced deprecated -OFast compiler flag with -O3 #305

Merged
merged 1 commit into from
Nov 2, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ def build_extensions(self) -> None: # noqa
self.compiler.include_dirs.append(os.path.dirname(os.path.abspath(__file__)))

if PLATFORM_MINGW:
self._update_extension("_pillow_heif", ["heif"], extra_compile_args=["-Ofast", "-Werror"])
self._update_extension("_pillow_heif", ["heif"], extra_compile_args=["-O3", "-Werror"])
else:
self._update_extension(
"_pillow_heif", ["libheif"], extra_compile_args=["/d2FH4-", "/WX"], extra_link_args=["/WX"]
Expand All @@ -196,7 +196,7 @@ def build_extensions(self) -> None: # noqa
self._add_directory(library_dirs, os.path.join(sdk_path, "usr", "lib"))
self._add_directory(include_dirs, os.path.join(sdk_path, "usr", "include"))

self._update_extension("_pillow_heif", ["heif"], extra_compile_args=["-Ofast", "-Werror"])
self._update_extension("_pillow_heif", ["heif"], extra_compile_args=["-O3", "-Werror"])
else: # let's assume it's some kind of linux
# this old code waiting for refactoring, when time comes.
self._add_directory(include_dirs, "/usr/local/include")
Expand All @@ -206,7 +206,7 @@ def build_extensions(self) -> None: # noqa
self._add_directory(library_dirs, "/usr/lib")
self._add_directory(library_dirs, "/lib")

self._update_extension("_pillow_heif", ["heif"], extra_compile_args=["-Ofast", "-Werror"])
self._update_extension("_pillow_heif", ["heif"], extra_compile_args=["-O3", "-Werror"])

self.compiler.library_dirs = library_dirs + self.compiler.library_dirs
self.compiler.include_dirs = include_dirs + self.compiler.include_dirs
Expand Down
Loading