Merge pull request #2919 from dgovil/boost_python_clang15_fixes
authorpixar-oss <pixar-oss@users.noreply.github.com>
Wed, 21 Feb 2024 17:22:33 +0000 (09:22 -0800)
committerpixar-oss <pixar-oss@users.noreply.github.com>
Thu, 22 Feb 2024 21:47:52 +0000 (13:47 -0800)
Disable BOOST_UNORDERED_HAVE_PIECEWISE_CONSTRUCT for MacOS builds

(Internal change: 2317210)

1  2 
build_scripts/build_usd.py

index 21281371cdcae5a959668010036f22dcd4c045a9,bc331568ac90a561290413df44633063fe496d61..f2073e70ba1e016f30d03c5ea65f356600812751
@@@ -895,7 -890,7 +895,14 @@@ def InstallBoost_Helper(context, force
              # Must specify toolset=clang to ensure install_name for boost
              # libraries includes @rpath
              b2_settings.append("toolset=clang")
++            #
++            # Xcode 15.3 (and hence Apple Clang 15) removed the global
++            # declaration of std::piecewise_construct which causes boost build
++            # to fail.
++            # https://developer.apple.com/documentation/xcode-release-notes/xcode-15_3-release-notes.
++            # A fix for the same is also available in boost 1.84:
++            # https://github.com/boostorg/container/commit/79a75f470e75f35f5f2a91e10fcc67d03b0a2160
+             b2_settings.append(f"define=BOOST_UNORDERED_HAVE_PIECEWISE_CONSTRUCT=0")
              if macOSArch:
                  b2_settings.append("cxxflags=\"{0}\"".format(macOSArch))
                  b2_settings.append("cflags=\"{0}\"".format(macOSArch))