June 30, 2019
https://issues.dlang.org/show_bug.cgi?id=20016

          Issue ID: 20016
           Summary: JSON (-X) compilerInfo.platforms generation depends on
                    params.isXXX for platform detection
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P1
         Component: dmd
          Assignee: nobody@puremagic.com
          Reporter: ibuclaw@gdcproject.org

These parameters will eventually become private to dmd/target.d, there is also no way for an interfacing compiler backend to their own platforms.

if (global.params.isWindows)
{
    item("windows");
}
else
{
    item("posix");
    if (global.params.isLinux)
        item("linux");
    else if (global.params.isOSX)
        item("osx");
    else if (global.params.isFreeBSD)
    {
        item("freebsd");
        item("bsd");
    }
    else if (global.params.isOpenBSD)
    {
        item("openbsd");
        item("bsd");
    }
    else if (global.params.isSolaris)
    {
        item("solaris");
        item("bsd");
    }
}

--