Skip to content

Turn on response files in cmake toolchain file(2) - #2386

Merged
juj merged 3 commits into
emscripten-core:incomingfrom
mhenschel:cmake_response_files
Jun 4, 2014
Merged

juj merged 3 commits into
emscripten-core:incomingfrom
mhenschel:cmake_response_files

Conversation

@mhenschel

Copy link
Copy Markdown
Contributor

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.

@juj
juj merged commit a408ad0 into emscripten-core:incoming Jun 4, 2014
@juj

juj commented Jun 4, 2014

Copy link
Copy Markdown
Collaborator

Sorry for the delay, I was attending a work week last week, so my attention was taken. The test looks good, thanks!

@mhenschel

Copy link
Copy Markdown
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. :-)

@juj

juj commented Jun 5, 2014

Copy link
Copy Markdown
Collaborator

I noticed the duplication and removed it during the merge, so should be good.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants