Hi all,
I am working a project which has its own Waf-based build system on Win7. It supports GCC compiler of NDK now.
Now I am trying to incorporate Clang into the build system. The NDK version is r10e.
This build system use a "read-options-from-file" technique to work around the max command-line length limitation of the shell in Win7.
It means that it create a temporary file and put options/parameters into it, and then call gcc/g++ like this:
arm-linux-androideabi-g++.exe @c:\\users\\username\\appdata\\local\\temp\\tmpms48hj
P.S. tmpms48hj is that temp file. It contains a lot of compiler options and object files when linking. One item per line.
I tried to use the same technique for Clang.exe/Clang++.exe. It works for clang-3.5 for compiling. (doesn't work for clang-3.6, but this is another problem)
But, it doesn't work for linking. I got the following error message:
clang++.exe @c:\\users\\username\\appdata\\local\\temp\\tmpix_rry
clang++.exe: error: unable to execute command: Couldn't execute program 'P:\android\android-ndk-r10e\toolchains\arm-linux-androideabi-4.8\prebuilt\windows-x86_64/lib/gcc/arm-linux-androideabi/4.8/../../../../arm-linux-androideabi/bin\ld.exe'The filename or extension is too long.
I believe that NDK has its own technique to overcome the problem of command-line length limitation. Otherwise it can't build large/complex project.
Can someone tell me how NDK achieve that? Which file I should look into?
Besides, since the same technique works for GCC but not Clang, I suppose that Clang has something different, need to be treated differently. Does anyone have clue?
What should I do to let clang++.exe link a lot of object files?
Thank you very much.