@@ -236,10 +236,10 @@ DFLAGS=-I%@P%/../../../../../druntime/import -I%@P%/../../../../../phobos -L-L%@
236236});
237237
238238// / Returns: the dependencies that build the D backend
239- alias dBackend = memoize! (function () {
239+ alias backendObj = memoize! (function () {
240240 Dependency dependency = {
241- name: " dbackend " ,
242- target: env[" G" ].buildPath(" dbackend " ).objName,
241+ name: " backendObj " ,
242+ target: env[" G" ].buildPath(" backend " ).objName,
243243 sources: sources.backend,
244244 msg: " (DC) D_BACK_OBJS %-(%s, %)" .format(sources.backend.map! (e => e.baseName).array),
245245 command: [
@@ -258,9 +258,9 @@ alias backend = memoize!(function() {
258258 Dependency dependency = {
259259 name: " backend" ,
260260 msg: " (LIB) %s" .format(" BACKEND" .libName),
261- sources: [ env[" G" ].buildPath(" dbackend " ).objName ],
261+ sources: [ env[" G" ].buildPath(" backend " ).objName ],
262262 target: env[" G" ].buildPath(" backend" ).libName,
263- deps: [dBackend ],
263+ deps: [backendObj ],
264264 command: [env[" HOST_DMD_RUN" ], env[" MODEL_FLAG" ], " -lib" , " -of$@" , " $<" ]
265265 };
266266 return new DependencyRef(dependency);
@@ -312,11 +312,12 @@ Params:
312312*/
313313alias dmdExe = memoize! (function (string targetSuffix, string [] extraFlags... ) {
314314 // Main DMD build dependency
315+ const dmdSources = sources.dmd.chain(sources.root).array;
315316 Dependency dependency = {
316317 // newdelete.o + lexer.a + backend.a
317- sources: sources.dmd. chain(sources.root, lexer.targets, backend.targets).array,
318+ sources: dmdSources. chain(lexer.targets, backend.targets).array,
318319 target: env[" DMD_PATH" ] ~ targetSuffix,
319- msg: " (DC) DMD%s %-(%s, %)" .format(targetSuffix, sources.dmd .map! (e => e.baseName).array),
320+ msg: " (DC) DMD%s %-(%s, %)" .format(targetSuffix, dmdSources .map! (e => e.baseName).array),
320321 deps: [versionFile, sysconfDirFile, lexer, backend],
321322 command: [
322323 env[" HOST_DMD_RUN" ],
@@ -497,6 +498,31 @@ struct DependencyRange
497498// / Sets the environment variables
498499void parseEnvironment ()
499500{
501+ // This block is temporary until we can remove the windows make files
502+ {
503+ const ddebug = env.get (" DDEBUG" , null );
504+ if (ddebug.length)
505+ {
506+ writefln(" WARNING: the DDEBUG variable is deprecated" );
507+ if (ddebug == " -debug -g -unittest -cov" )
508+ {
509+ environment[" ENABLE_DEBUG" ] = " 1" ;
510+ environment[" ENABLE_UNITTEST" ] = " 1" ;
511+ environment[" ENABLE_COVERAGE" ] = " 1" ;
512+ }
513+ else if (ddebug == " -debug -g -unittest" )
514+ {
515+ environment[" ENABLE_DEBUG" ] = " 1" ;
516+ environment[" ENABLE_UNITTEST" ] = " 1" ;
517+ }
518+ else
519+ {
520+ writefln(" Error: DDEBUG is not an expected value '%s'" , ddebug);
521+ exit(1 );
522+ }
523+ }
524+ }
525+
500526 env.getDefault(" TARGET_CPU" , " X86" );
501527 version (Windows )
502528 {
@@ -729,16 +755,23 @@ auto sourceFiles()
729755 .map! (e => e.name)
730756 .filter! (e => ! lexerRootFiles.canFind(e.baseName.stripExtension))
731757 .array,
732- backend:
733- dirEntries(env[" C" ], " *.d" , SpanMode.shallow)
734- .map! (e => e.name)
735- .filter! (e => ! e.baseName.among(" dt.d" , " obj.d" ))
736- .array,
737- backendHeaders: [
738- // can't be built with -betterC
739- " dt" ,
740- " obj" ,
741- ].map! (e => env[" C" ].buildPath(e ~ " .d" )).array,
758+ backend: ("
759+ bcomplex.d evalu8.d divcoeff.d dvec.d go.d gsroa.d glocal.d gdag.d gother.d gflow.d
760+ out.d
761+ gloop.d compress.d cgelem.d cgcs.d ee.d cod4.d cod5.d nteh.d blockopt.d mem.d cg.d cgreg.d
762+ dtype.d debugprint.d fp.d symbol.d elem.d dcode.d cgsched.d cg87.d cgxmm.d cgcod.d cod1.d cod2.d
763+ cod3.d cv8.d dcgcv.d pdata.d util2.d var.d md5.d backconfig.d ph2.d drtlsym.d dwarfeh.d ptrntab.d
764+ dvarstats.d dwarfdbginf.d cgen.d os.d goh.d barray.d cgcse.d elpicpie.d
765+ machobj.d elfobj.d
766+ " .split
767+ ~ ( (env[" OS" ] == " windows" ) ? " cgobj.d filespec.d mscoffobj.d newman.d" .split : [" aarray.d" ] )
768+ ).map! (e => env[" C" ].buildPath(e)).array,
769+ backendHeaders: "
770+ cc.d cdef.d cgcv.d code.d cv4.d dt.d el.d global.d
771+ obj.d oper.d outbuf.d rtlsym.d code_x86.d iasm.d codebuilder.d
772+ ty.d type.d exh.d mach.d mscoff.d dwarf.d dwarf2.d xmm.d
773+ dlist.d melf.d varstats.di
774+ " .split.map! (e => env[" C" ].buildPath(e)).array,
742775 };
743776 sources.dmd = sources.frontend ~ sources.backendHeaders;
744777
0 commit comments