Ldc ImportC preprocessor failure (wrong option syntax) on Windows

Bastiaan Veelo Bastiaan at Veelo.net
Tue Feb 4 09:50:13 UTC 2025


Hi,

On my personal machine everything works fine, but our CI build 
machine suffers from this error:
```
clang-cl.exe: warning: unknown argument ignored in clang-cl 
'-target' (did you mean '--target='?) [-Wunknown-argument]
clang-cl.exe: error: no such file or directory: 
'x86_64-pc-windows-msvc'
```

I have the impression that options are given as the Microsoft 
preprocessor expects them, but that the clang preprocessor is 
called instead. I think that on my personal machine the Microsoft 
preprocessor is called, which is also what I would expect, but I 
don't know of a way to verify that; the workings of ImportC are 
rather opaque.

My hunch is that LDC doesn't detect the presence of the Microsoft 
toolchain correctly. I do call `vcvarsall.bat x64` prior to 
invoking ldc. Could there be a global configuration in effect on 
my personal machine, but not on the CI build machine? One 
difference is that, although we currently install compilers by 
unzipping archives and adding to PATH, on my personal machine I 
have used the Windows Installer in the past, which may have done 
additional things to configure my system.

Any help is appreciated!

-- Bastiaan.


More information about the Digitalmars-d-learn mailing list