Repository navigation
Turn on response files in cmake toolchain file(2) - #2386
Merged
Merged
Conversation
Collaborator
|
Sorry for the delay, I was attending a work week last week, so my attention was taken. The test looks good, thanks! |
Contributor
Author
|
Thanks for merging. I think I'm in the authors file twice now. I didn't notice I was in there already. Feel free to remove the duplicate. :-) |
Collaborator
|
I noticed the duplication and removed it during the merge, so should be good. |
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.
This fixes issue #2295
I think the individual CMAKE_C/CXX_ARCHIVE_CREATE and CMAKE_C/CXX_ARCHIVE_APPEND directives are not necessary anymore. They might have been necessary in the past because CMAKE_AR was not set correctly as a cache variable before.
The CMAKE_C/CXX_CREATE_STATIC_LIBRARY calls are required to force cmake to use response files for objects. This is necessary because cmake has a hard coded limit for the command line which does not work well for windows because emscripten uses bat files to call the compiler. Bat files have a maximum command line length that is smaller than the general limit for windows executables.
I added a test for building shared and static libraries with cmake. The tests generate 60 source files to trigger the bug in #2295. Because all tests are being run in debug and release configs for all available build systems this might increase the time cmakes tests run quite a bit. Running it on mingw and MSVC takes about 4 minutes on my machine. Only testing with 2 source files takes about one minute. Is this a problem?
This pull request replaces #2359. I didn't know that a pull request should have a dedicated branch as source. I'm not used to git(hub) so please bear with me.