[Issue 22248] New: ImportC: Specify C compiler when multiple options are available

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sun Aug 29 00:15:25 UTC 2021


https://issues.dlang.org/show_bug.cgi?id=22248

          Issue ID: 22248
           Summary: ImportC: Specify C compiler when multiple options are
                    available
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Keywords: ImportC, spec
          Severity: enhancement
          Priority: P1
         Component: dlang.org
          Assignee: nobody at puremagic.com
          Reporter: schveiguy at gmail.com

For instance, on Linux, dmd can link with code built with both gcc and clang
(and likely others). If D will compile C code, and there may be differences
between the various compilers (e.g. bitfield handling), the ImportC compiler
should select a default compiler for that platform.

Obviously, ldc should match llvm, and gdc should match gcc. But DMD doesn't
always have an equivalent C compiler.

Optionally, it may be useful (if all the code is going to be inside the front
end anyway) to specify an expected compatible compiler.

--


More information about the Digitalmars-d-bugs mailing list