mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-02-10 08:30:49 +03:00
Merge pull request #5199 from wiredfool/oss-fuzz-link
Link OSS-Fuzz in setup.py
This commit is contained in:
commit
8dc5f692db
9
setup.py
9
setup.py
|
@ -35,7 +35,7 @@ JPEG_ROOT = None
|
||||||
LCMS_ROOT = None
|
LCMS_ROOT = None
|
||||||
TIFF_ROOT = None
|
TIFF_ROOT = None
|
||||||
ZLIB_ROOT = None
|
ZLIB_ROOT = None
|
||||||
|
FUZZING_BUILD = "LIB_FUZZING_ENGINE" in os.environ
|
||||||
|
|
||||||
if sys.platform == "win32" and sys.version_info >= (3, 10):
|
if sys.platform == "win32" and sys.version_info >= (3, 10):
|
||||||
import atexit
|
import atexit
|
||||||
|
@ -346,6 +346,9 @@ class pil_build_ext(build_ext):
|
||||||
extension.define_macros += define_macros
|
extension.define_macros += define_macros
|
||||||
if include_dirs is not None:
|
if include_dirs is not None:
|
||||||
extension.include_dirs += include_dirs
|
extension.include_dirs += include_dirs
|
||||||
|
if FUZZING_BUILD:
|
||||||
|
extension.language = "c++"
|
||||||
|
extension.extra_link_args = ["--stdlib=libc++"]
|
||||||
break
|
break
|
||||||
|
|
||||||
def _remove_extension(self, name):
|
def _remove_extension(self, name):
|
||||||
|
@ -840,9 +843,7 @@ class pil_build_ext(build_ext):
|
||||||
|
|
||||||
|
|
||||||
def debug_build():
|
def debug_build():
|
||||||
return hasattr(sys, "gettotalrefcount") or os.environ.get(
|
return hasattr(sys, "gettotalrefcount") or FUZZING_BUILD
|
||||||
"LIB_FUZZING_ENGINE", None
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
files = ["src/_imaging.c"]
|
files = ["src/_imaging.c"]
|
||||||
|
|
Loading…
Reference in New Issue
Block a user