Skip to content

Commit

Permalink
Merge pull request cupy#8967 from chainer-ci/bp-8962-v13-use-bigobj
Browse files Browse the repository at this point in the history
[backport] Use `/bigobj` on Windows build
  • Loading branch information
kmaehashi authored Feb 18, 2025
2 parents f41aad4 + 4635a67 commit f5e36bf
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion install/cupy_builder/_compiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,9 @@ def compile(self, obj: str, src: str, ext: Extension) -> None:
# to build CuPy because some Python versions were built using it.
# REF: https://wiki.python.org/moin/WindowsCompilers
postargs += ['-allow-unsupported-compiler']
postargs += ['-Xcompiler', '/MD', '-D_USE_MATH_DEFINES']
# "/bigobj" to silence `fatal error C1128: number of sections exceeded
# object file format limit`
postargs += ['-Xcompiler', '/MD /bigobj', '-D_USE_MATH_DEFINES']
# Bumping C++ standard from C++14 to C++17 for "if constexpr"
num_threads = int(os.environ.get('CUPY_NUM_NVCC_THREADS', '2'))
postargs += ['--std=c++17',
Expand Down

0 comments on commit f5e36bf

Please sign in to comment.