Bug 22248 – ImportC: Specify C compiler when multiple options are available
Status
RESOLVED
Resolution
WORKSFORME
Severity
enhancement
Priority
P1
Component
dlang.org
Product
D
Version
D2
Platform
All
OS
All
Creation time
2021-08-29T00:15:25Z
Last change time
2022-01-27T01:44:17Z
Keywords
ImportC, spec
Assigned to
No Owner
Creator
Steven Schveighoffer
Comments
Comment #0 by schveiguy — 2021-08-29T00:15:25Z
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.
Comment #1 by bugzilla — 2022-01-27T01:44:17Z
This is already taken care of by the target options.