In 2adabe7 I added DC="${DMD}" to the dlang_compile_bin function. This only happens to be valid when the compiler is dmd. This is because dlang_compile_bin will pass arguments to the compiler thinking that said compiler is the actual compiler and not a wrapper script.
When compiling with ldc, so long as the user hasn't specified any LDCFLAGS, the build will work fine. For gdc however, the eclass always adds -shared-libphobos to GDCFLAGS which is a value gdmd doesn't understand and which will lead to a failure. When I tested the commit I only tested it for dmd and ldc (for which I had no flags in make.conf) and it seemed to work fine. Least to say I will try to do less such assumptions in the future.
Oh, good that you noticed it. Mostly people probably self-host or use the latest LDC2. So even if there was a bug in the commit, you fixed more than you broke. ;-)
In 2adabe7 I added
DC="${DMD}"
to thedlang_compile_bin
function. This only happens to be valid when the compiler is dmd. This is becausedlang_compile_bin
will pass arguments to the compiler thinking that said compiler is the actual compiler and not a wrapper script.When compiling with
ldc
, so long as the user hasn't specified anyLDCFLAGS
, the build will work fine. Forgdc
however, the eclass always adds-shared-libphobos
toGDCFLAGS
which is a valuegdmd
doesn't understand and which will lead to a failure. When I tested the commit I only tested it fordmd
andldc
(for which I had no flags inmake.conf
) and it seemed to work fine. Least to say I will try to do less such assumptions in the future.