mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 21:14:14 +08:00
Make a deep copy of extra_compile_flag dictionnary (#20221)
Summary: See issue #20169 Pull Request resolved: https://github.com/pytorch/pytorch/pull/20221 Differential Revision: D15317126 Pulled By: ezyang fbshipit-source-id: 0a12932db4f6ba15ea1d558fa329ce23fe2baef6
This commit is contained in:
committed by
Facebook Github Bot
parent
30bdb8c0d7
commit
f8aa6a8f44
@ -370,7 +370,7 @@ class BuildExtension(build_ext, object):
|
||||
check_compiler_abi_compatibility(compiler)
|
||||
|
||||
def _add_compile_flag(self, extension, flag):
|
||||
extension.extra_compile_args = copy.copy(extension.extra_compile_args)
|
||||
extension.extra_compile_args = copy.deepcopy(extension.extra_compile_args)
|
||||
if isinstance(extension.extra_compile_args, dict):
|
||||
for args in extension.extra_compile_args.values():
|
||||
args.append(flag)
|
||||
|
Reference in New Issue
Block a user