From 03c7bebae111041e1d4de1db7741b5d506d9c8f0 Mon Sep 17 00:00:00 2001 From: Alexander Piskun <13381981+bigcat88@users.noreply.github.com> Date: Sat, 2 Nov 2024 13:19:20 +0200 Subject: [PATCH] replaced deprecated `-OFast` compiler flag with `-O3` (#305) Signed-off-by: Alexander Piskun --- setup.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/setup.py b/setup.py index 0cfe105c..68945e4d 100644 --- a/setup.py +++ b/setup.py @@ -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"] @@ -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") @@ -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