Skip to content

Commit

Permalink
Merge pull request #442 from MoonlightSentinel/default-versions
Browse files Browse the repository at this point in the history
rdmd: Allow selection of default compiler independent from the host one
  • Loading branch information
CyberShadow authored Feb 8, 2022
2 parents 9bb1a41 + 75a5fe5 commit c46aebf
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion rdmd.d
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,16 @@ immutable string[] defaultExclusions = ["std", "etc", "core"];
private string[] exclusions = defaultExclusions; // packages that are to be excluded
private string[] extraFiles = [];

version (DigitalMars)
// Override compiler at build time
version (DefaultCompiler_DMD)
private enum defaultCompiler = "dmd";
else version (DefaultCompiler_GDC)
private enum defaultCompiler = "gdmd";
else version (DefaultCompiler_LDC)
private enum defaultCompiler = "ldmd2";

// Default to the current host compiler if no default was specified
else version (DigitalMars)
private enum defaultCompiler = "dmd";
else version (GNU)
private enum defaultCompiler = "gdmd";
Expand Down

0 comments on commit c46aebf

Please sign in to comment.