py-torchvision: fix build with Apple Clang 16 (#46462)
This commit is contained in:
parent
a9e9b901d1
commit
1a965e9ec2
@ -152,6 +152,13 @@ class PyTorchvision(PythonPackage):
|
|||||||
# Many of the datasets require additional dependencies to use.
|
# Many of the datasets require additional dependencies to use.
|
||||||
# These can be installed after the fact.
|
# These can be installed after the fact.
|
||||||
|
|
||||||
|
def flag_handler(self, name, flags):
|
||||||
|
# https://github.com/pytorch/vision/issues/8653
|
||||||
|
if name == "ldflags":
|
||||||
|
if self.spec.satisfies("%apple-clang@15:"):
|
||||||
|
flags.append("-Wl,-ld_classic")
|
||||||
|
return (flags, None, None)
|
||||||
|
|
||||||
def setup_build_environment(self, env):
|
def setup_build_environment(self, env):
|
||||||
# The only documentation on building is what is found in setup.py and:
|
# The only documentation on building is what is found in setup.py and:
|
||||||
# https://github.com/pytorch/vision/blob/main/CONTRIBUTING.md#development-installation
|
# https://github.com/pytorch/vision/blob/main/CONTRIBUTING.md#development-installation
|
||||||
|
Loading…
Reference in New Issue
Block a user