mirror of
https://github.com/zebrajr/pytorch.git
synced 2025-12-06 12:20:52 +01:00
adding static linking on binary builds
This commit is contained in:
parent
1f2695e875
commit
65d4055366
4
setup.py
4
setup.py
|
|
@ -118,6 +118,10 @@ class clean(distutils.command.clean.clean):
|
|||
include_dirs = []
|
||||
extra_link_args = []
|
||||
extra_compile_args = ['-std=c++11', '-Wno-write-strings']
|
||||
if os.getenv('PYTORCH_BINARY_BUILD') and platform.system() == 'Linux':
|
||||
print('PYTORCH_BINARY_BUILD found. Static linking libstdc++ on Linux')
|
||||
extra_compile_args += ['-static-libstdc++']
|
||||
extra_link_args += ['-static-libstdc++']
|
||||
|
||||
cwd = os.path.dirname(os.path.abspath(__file__))
|
||||
lib_path = os.path.join(cwd, "torch", "lib")
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user