mirror of
https://github.com/dlang/dmd.git
synced 2025-04-25 20:50:41 +03:00
Always accept .o and .obj files (#20609)
This commit is contained in:
parent
9b94878c85
commit
439e068588
2 changed files with 7 additions and 1 deletions
6
changelog/dmd.obj_extensions.dd
Normal file
6
changelog/dmd.obj_extensions.dd
Normal file
|
@ -0,0 +1,6 @@
|
|||
Object file extensions `.o` and `.obj` are now accepted on all platforms
|
||||
|
||||
Accepting .o and .obj file extensions on all platforms makes DMD behave
|
||||
the same as Clang and other modern compilers. There is no point in
|
||||
discarding *.o or *.obj depending on the current OS, as both extensions
|
||||
indicate that this is an object file.
|
|
@ -1836,7 +1836,7 @@ bool createModule(const(char)* file, ref Strings libmodules, const ref Target ta
|
|||
|
||||
/* Deduce what to do with a file based on its extension
|
||||
*/
|
||||
if (FileName.equals(ext, target.obj_ext))
|
||||
if (FileName.equals(ext, "obj") || FileName.equals(ext, "o"))
|
||||
{
|
||||
global.params.objfiles.push(file);
|
||||
libmodules.push(file);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue