Disable -Werror for s390x test module compilation (#150413)

This change should make nightly testsuite green again for s390x.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/150413
Approved by: https://github.com/seemethere
This commit is contained in:
Aleksei Nikiforov 2025-04-16 02:15:13 +00:00 committed by PyTorch MergeBot
parent aacac88bee
commit 067a7b1d4a

View File

@ -1,5 +1,6 @@
import distutils.command.clean
import os
import platform
import shutil
import sys
from pathlib import Path
@ -40,6 +41,9 @@ if __name__ == "__main__":
CXX_FLAGS = ["/sdl"]
else:
CXX_FLAGS = ["/sdl", "/permissive-"]
elif platform.machine() == "s390x":
# no -Werror on s390x due to newer compiler
CXX_FLAGS = {"cxx": ["-g", "-Wall"]}
else:
CXX_FLAGS = {"cxx": ["-g", "-Wall", "-Werror"]}