[Issue 20016] New: JSON (-X) compilerInfo.platforms generation depends on params.isXXX for platform detection

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sun Jun 30 21:49:42 UTC 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 at puremagic.com
          Reporter: ibuclaw at 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");
    }
}

--


More information about the Digitalmars-d-bugs mailing list