opendlang / opend

Boost Software License 1.0
76 stars 17 forks source link

Add version LDC scope for LDC only code in hooks.d #29

Closed IgorDeepakM closed 5 months ago

IgorDeepakM commented 5 months ago

A small fix in order for DMD to compile with Visual Studio.

The Visual Studio solution in opend\compiler\src\vcbuild seems to be working in order to compile dmd and can offer an alternative for those who wants to work with VS and quickly compile dmd.

I got an error as it doesn't find LDC specific files when it is only supposed to compile dmd.

adamdruppe commented 5 months ago

Yeah, looks like another oversight on my end. Thanks for the fix!

adamdruppe commented 5 months ago

After testing a bit more an irc user pointed out this broke building ldc with dmd, it should have been version (IN_LLVM) to apply to only when building llvm; version (LDC) only applies when the host compiler is ldc. so oops again but fixed now

IgorDeepakM commented 5 months ago

I didn't know about the IN_LLVM flag for compiling the LLVM version. Good to know for future reference. Thanks.