Newer
Older
dub_jkp / source / app.d
@Mathias Lang Mathias Lang on 23 Jun 1015 bytes Drop support for LDC v1.26.0
  1. /**
  2. Application entry point.
  3.  
  4. Copyright: © 2013 rejectedsoftware e.K.
  5. License: Subject to the terms of the MIT license, as written in the included LICENSE.txt file.
  6. Authors: Sönke Ludwig
  7. */
  8. module app;
  9.  
  10. import dub.commandline;
  11.  
  12. // Set output path and options for coverage reports
  13. version (DigitalMars) version (D_Coverage)
  14. {
  15. shared static this()
  16. {
  17. import core.runtime, std.file, std.path, std.stdio;
  18. dmd_coverSetMerge(true);
  19. auto path = buildPath(dirName(thisExePath()), "../cov");
  20. if (!path.exists)
  21. mkdir(path);
  22. dmd_coverDestPath(path);
  23. }
  24. }
  25.  
  26. /**
  27. * Workaround https://github.com/dlang/dub/issues/1812
  28. *
  29. * On Linux, a segmentation fault happens when dub is compiled with a recent
  30. * compiler. While not confirmed, the logs seem to point to parallel marking
  31. * done by the GC. Hence this disables it.
  32. *
  33. * https://dlang.org/changelog/2.087.0.html#gc_parallel
  34. */
  35. extern(C) __gshared string[] rt_options = [ "gcopt=parallel:0" ];
  36.  
  37. int main(string[] args)
  38. {
  39. return runDubCommandLine(args);
  40. }