BinaryBuilder: Support splitting output into multiple .cpp files to fix MSVC compilation limits#1646
Open
dylanruddy wants to merge 2 commits intojuce-framework:masterfrom
Open
BinaryBuilder: Support splitting output into multiple .cpp files to fix MSVC compilation limits#1646dylanruddy wants to merge 2 commits intojuce-framework:masterfrom
dylanruddy wants to merge 2 commits intojuce-framework:masterfrom
Conversation
User can optimally split files per cpp file using BinaryBuilder command: "PATH TO BINARY BUILDER" \ "PATH TO FILES" \ "PATH TO OUTPUT" \ "BinaryData" \ --split
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
When embedding large numbers of binary resources (e.g. 87 audio samples),
BinaryData.cppcan exceed Visual Studio's translation unit limits, causing:
This makes cross-platform builds that work on macOS fail to compile on Windows with MSVC.
Solution
Add an optional
--splitflag toBinaryBuilderthat generates oneBinaryData_N.cppfileper resource instead of a single monolithic
.cppfile. A single sharedBinaryData.hisstill generated as before, so consuming code requires no changes.
Usage
Default (unchanged behavior):
Split mode:
Output files:
BinaryData.h,BinaryData_0.cpp,BinaryData_1.cpp, ...Notes
--splitis fully opt-in; existing usage is unaffected..cppincludesBinaryData.h..cppfiles to their project manually.