compilation_command_files.txt 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. Raptor now supplies a variant, for optional use in e32 and emulator builds,
  2. that puts lengthy elements of compiler calls into a command file, thus
  3. shortening the overall compilation command line length presented within the
  4. shell.
  5. The new variant, 'use_compilation_command_file', can be used as part of the
  6. build configuration e.g.:
  7. sbs -c arm.v5.urel.rvct4_0.use_compilation_command_file
  8. ...or, at a more specific level, via the APPLY keyword in .mmp files e.g.:
  9. TARGET somebin.exe
  10. TARGETTYPE exe
  11. UID 0x100039ce 0x00000001
  12. LIBRARY somelib.lib
  13. SOURCE somesrc.cpp
  14. SYSTEMINCLUDE /epoc32/include
  15. APPLY use_compilation_command_file
  16. The variant is useful in situations where the expanded compilation command
  17. line length exceeds shell limits with the tools in use. There is currently
  18. a known situation where this occurs using Cygwin and Bash in Windows builds;
  19. command lines over ~16380 chars can lead to cryptic EOF and syntax errors
  20. like the following:
  21. compile : src\somesrc.cpp [arm.v5.urel.gcce4_4_1]
  22. /bin/sh: -c: line 0: unexpected EOF while looking for matching `"'
  23. /bin/sh: -c: line 1: syntax error: unexpected end of file
  24. In the above situations, Raptor now generates the following warning to
  25. accompany the error:
  26. sbs: warning: Command line length '*****' exceeds the shell limit on this
  27. system of '16380'. If this recipe is a compile, try using the
  28. '.use_compilation_command_file' variant to reduce overall command line
  29. length.
  30. The current implementation of the 'use_compilation_command_file' variant can
  31. help alleviate command line length failures for compiler calls by dumping all
  32. include paths into a temporary command file and referencing that instead.
  33. As include paths are what usually swell the typical compiler call, this should
  34. address the problem.
  35. Note: As this variant leads to the creation of a new file as part of the build,
  36. there will doubtless be at least some performance impact. In addition, the
  37. include paths referenced in the build are no longer directly visible in the
  38. log. As a result, it is recommended that this variant is used sparingly, and
  39. only when required to fix a build issue.