Skip to content

Commit

Permalink
Merge pull request cupy#8962 from kmaehashi/use-bigobj
Browse files Browse the repository at this point in the history
Use `/bigobj` on Windows build
  • Loading branch information
asi1024 authored and chainer-ci committed Feb 18, 2025
1 parent 59af44a commit 4635a67
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 4635a67

Please sign in to comment.