@@ -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);
@@ -307,11 +307,12 @@ Params:
307307*/
308308alias dmdExe = memoize! (function (string targetSuffix, string [] extraFlags... ) {
309309 // Main DMD build dependency
310+ const dmdSources = sources.dmd.chain(sources.root).array;
310311 Dependency dependency = {
311312 // newdelete.o + lexer.a + backend.a
312- sources: sources.dmd. chain(sources.root, lexer.targets, backend.targets).array,
313+ sources: dmdSources. chain(lexer.targets, backend.targets).array,
313314 target: env[" DMD_PATH" ] ~ targetSuffix,
314- msg: " (DC) DMD%s %-(%s, %)" .format(targetSuffix, sources.dmd .map! (e => e.baseName).array),
315+ msg: " (DC) DMD%s %-(%s, %)" .format(targetSuffix, dmdSources .map! (e => e.baseName).array),
315316 deps: [versionFile, sysconfDirFile, lexer, backend],
316317 command: [
317318 env[" HOST_DMD_RUN" ],
@@ -368,6 +369,7 @@ alias clean = memoize!(function() {
368369 return new DependencyRef(dependency);
369370});
370371
372+
371373/**
372374Goes through the target list and replaces short-hand targets with their expanded version.
373375Special targets:
@@ -492,6 +494,31 @@ struct DependencyRange
492494// / Sets the environment variables
493495void parseEnvironment ()
494496{
497+ // This block is temporary until we can remove the windows make files
498+ {
499+ const ddebug = env.get (" DDEBUG" , null );
500+ if (ddebug.length)
501+ {
502+ writefln(" WARNING: the DDEBUG variable is deprecated" );
503+ if (ddebug == " -debug -g -unittest -cov" )
504+ {
505+ environment[" ENABLE_DEBUG" ] = " 1" ;
506+ environment[" ENABLE_UNITTEST" ] = " 1" ;
507+ environment[" ENABLE_COVERAGE" ] = " 1" ;
508+ }
509+ else if (ddebug == " -debug -g -unittest" )
510+ {
511+ environment[" ENABLE_DEBUG" ] = " 1" ;
512+ environment[" ENABLE_UNITTEST" ] = " 1" ;
513+ }
514+ else
515+ {
516+ writefln(" Error: DDEBUG is not an expected value '%s'" , ddebug);
517+ exit(1 );
518+ }
519+ }
520+ }
521+
495522 env.getDefault(" TARGET_CPU" , " X86" );
496523 version (Windows )
497524 {
@@ -726,16 +753,23 @@ auto sourceFiles()
726753 .map! (e => e.name)
727754 .filter! (e => ! lexerRootFiles.canFind(e.baseName.stripExtension))
728755 .array,
729- backend:
730- dirEntries(env[" C" ], " *.d" , SpanMode.shallow)
731- .map! (e => e.name)
732- .filter! (e => ! e.baseName.among(" dt.d" , " obj.d" ))
733- .array,
734- backendHeaders: [
735- // can't be built with -betterC
736- " dt" ,
737- " obj" ,
738- ].map! (e => env[" C" ].buildPath(e ~ " .d" )).array,
756+ backend: ("
757+ bcomplex.d evalu8.d divcoeff.d dvec.d go.d gsroa.d glocal.d gdag.d gother.d gflow.d
758+ out.d
759+ gloop.d compress.d cgelem.d cgcs.d ee.d cod4.d cod5.d nteh.d blockopt.d mem.d cg.d cgreg.d
760+ dtype.d debugprint.d fp.d symbol.d elem.d dcode.d cgsched.d cg87.d cgxmm.d cgcod.d cod1.d cod2.d
761+ cod3.d cv8.d dcgcv.d pdata.d util2.d var.d md5.d backconfig.d ph2.d drtlsym.d dwarfeh.d ptrntab.d
762+ dvarstats.d dwarfdbginf.d cgen.d os.d goh.d barray.d cgcse.d elpicpie.d
763+ " .split
764+ ~ ( (env[" OS" ] == " osx" ) ? [" machobj.d" ] : [" elfobj.d" ] )
765+ ~ ( (env[" OS" ] == " windows" ) ? " cgobj.d filespec.d mscoffobj.d newman.d" .split : [" aarray.d" ] )
766+ ).map! (e => env[" C" ].buildPath(e)).array,
767+ backendHeaders: "
768+ cc.d cdef.d cgcv.d code.d cv4.d dt.d el.d global.d
769+ obj.d oper.d outbuf.d rtlsym.d code_x86.d iasm.d codebuilder.d
770+ ty.d type.d exh.d mach.d mscoff.d dwarf.d dwarf2.d xmm.d
771+ dlist.d melf.d varstats.di
772+ " .split.map! (e => env[" C" ].buildPath(e)).array,
739773 };
740774 sources.dmd = sources.frontend ~ sources.backendHeaders;
741775
0 commit comments