Skip to content

Commit

Permalink
Update build bat
Browse files Browse the repository at this point in the history
  • Loading branch information
edi33416 committed Feb 12, 2024
1 parent 50175ae commit aace2e9
Showing 1 changed file with 43 additions and 13 deletions.
56 changes: 43 additions & 13 deletions build.bat
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ if %githashsize% == 0 (
move /y bin\githash_.txt bin\githash.txt
)

set DFLAGS=-O -release -version=StdLoggerDisableWarning -version=CallbackAPI -version=DMDLIB -version=MARS -Jbin -Jdmd -Jdmd\compiler\src\dmd\res %MFLAGS%
set TESTFLAGS=-g -w -version=StdLoggerDisableWarning -version=CallbackAPI -version=DMDLIB -version=MARS -Jbin -Jdmd -Jdmd\compiler\src\dmd\res
set DFLAGS=-O -release -version=StdLoggerDisableWarning -version=CallbackAPI -version=DMDLIB -version=MARS -version=NoBackend -version=NoMain -Jbin -Jdmd -Jdmd\compiler\src\dmd\res %MFLAGS%
set TESTFLAGS=-g -w -version=StdLoggerDisableWarning -version=CallbackAPI -version=DMDLIB -version=MARS -version=NoBackend -version=NoMain -Jbin -Jdmd -Jdmd\compiler\src\dmd\res
set CORE=
set LIBDPARSE=
set STD=
Expand All @@ -29,7 +29,45 @@ set DSYMBOL=
set CONTAINERS=
set LIBDDOC=

SET DMD_FRONTEND_SRC=objc_glue.obj clone.obj transitivevisitor.obj iasm.obj iasmdmd.obj canthrow.obj tokens.obj optimize.obj func.obj semantic2.obj dvarstats.obj ph2.obj code.obj cdef.obj xmm.obj out.obj elfobj.obj glocal.obj dvec.obj code_x86.obj iasm2.obj string2.obj file2.obj obj.obj go.obj inliner.obj cc.obj bcomplex.obj mscoffobj.obj ptrntab.obj dlist.obj pdata.obj fp.obj cod3.obj os.obj cgelem.obj dcode.obj disasm86.obj exh.obj blockopt.obj aarray.obj cg.obj newman.obj dwarfdbginf.obj codebuilder.obj var.obj cod2.obj machobj.obj cgobj.obj cod4.obj dtype.obj cv4.obj backend.obj el.obj cgcod.obj cv8.obj dwarf.obj evalu8.obj ty.obj mem.obj cgxmm.obj gdag.obj gother.obj goh.obj cgcv.obj debugprint.obj cgsched.obj dwarfeh.obj cgreg.obj backconfig.obj gloop.obj divcoeff.obj cod5.obj dwarf2.obj cg87.obj nteh.obj dcgcv.obj util2.obj compress.obj type.obj elpicpie.obj gsroa.obj cgcs.obj ee.obj symbol.obj barray.obj melf.obj oper.obj cgcse.obj rtlsym.obj mscoff.obj drtlsym.obj symtab.obj dt.obj mach.obj cod1.obj global.obj filespec.obj gflow.obj elem.obj cgen.obj md5.obj chkformat.obj argtypes_sysv_x64.obj sideeffect.obj denum.obj apply.obj e2ir.obj typinf.obj statement.obj arraytypes.obj blockexit.obj init.obj scanomf.obj utils.obj parsetimevisitor.obj errorsink.obj scanmscoff.obj initsem.obj arrayop.obj nogc.obj dsymbol.obj hdrgen.obj dmangle.obj astenums.obj libmscoff.obj compiler.obj foreachvar.obj scanmach.obj dcast.obj tocsym.obj tocvdebug.obj semantic3.obj builtin.obj sapply.obj printast.obj dtemplate.obj importc.obj file_manager.obj dclass.obj argtypes_x86.obj glue.obj statement_rewrite_walker.obj target.obj aggregate.obj stringtable.obj ctfloat.obj response.obj strtold.obj port.obj aav.obj env.obj optional.obj filename.obj man.obj rootobject.obj complex.obj hash.obj region.obj utf.obj speller.obj rmem.obj array.obj longdouble.obj bitarray.obj eh.obj strictvisitor.obj permissivevisitor.obj lambdacomp.obj ctfeexpr.obj cparse.obj imphint.obj delegatize.obj access.obj identifier.obj todt.obj dmsc.obj entity.obj impcnvtab.obj dimport.obj lexer.obj dinifile.obj libomf.obj vsoptions.obj dstruct.obj aliasthis.obj ctorflow.obj errors.obj astcodegen.obj mtype.obj dtoh.obj argtypes_aarch64.obj cpreprocess.obj dmdparams.obj lib.obj id.obj parse.obj doc.obj scanelf.obj iasmgcc.obj cppmanglewin.obj stmtstate.obj ob.obj expression.obj declaration.obj location.obj dinterpret.obj inline.obj bitfields.obj string.obj int128.obj file.obj outbuffer.obj nspace.obj gluelayer.obj json.obj toir.obj intrange.obj cond.obj constfold.obj dversion.obj staticassert.obj dmodule.obj traits.obj opover.obj link.obj toctype.obj staticcond.obj statementsem.obj globals.obj libmach.obj toobj.obj s2ir.obj inlinecost.obj objc.obj visitor.obj asttypename.obj mustuse.obj dsymbolsem.obj frontend.obj safe.obj dscope.obj attrib.obj ast_node.obj escape.obj cli.obj templateparamsem.obj libelf.obj console.obj cppmangle.obj astbase.obj dmacro.obj typesem.obj expressionsem.obj
set "DMD_FRONTEND_DENYLIST=^
dmd\compiler\src\dmd\mars.d^
dmd\compiler\src\dmd\dmsc.d^
dmd\compiler\src\dmd\e2ir.d^
dmd\compiler\src\dmd\eh.d^
dmd\compiler\src\dmd\glue.d^
dmd\compiler\src\dmd\iasm.d^
dmd\compiler\src\dmd\iasmdmd.d^
dmd\compiler\src\dmd\iasmgcc.d^
dmd\compiler\src\dmd\irstate.d^
dmd\compiler\src\dmd\lib.d^
dmd\compiler\src\dmd\libelf.d^
dmd\compiler\src\dmd\libmach.d^
dmd\compiler\src\dmd\libmscoff.d^
dmd\compiler\src\dmd\libomf.d^
dmd\compiler\src\dmd\objc_glue.d^
dmd\compiler\src\dmd\s2ir.d^
dmd\compiler\src\dmd\scanelf.d^
dmd\compiler\src\dmd\scanmach.d^
dmd\compiler\src\dmd\scanmscoff.d^
dmd\compiler\src\dmd\scanomf.d^
dmd\compiler\src\dmd\tocsym.d^
dmd\compiler\src\dmd\toctype.d^
dmd\compiler\src\dmd\tocvdebug.d^
dmd\compiler\src\dmd\toobj.d^
dmd\compiler\src\dmd\todt.d^
dmd\compiler\src\dmd\toir.d"

set DMD_FRONTEND_SRC=
for %%x in (dmd\compiler\src\dmd\common\*.d) do set DMD_FRONTEND_SRC=!DMD_FRONTEND_SRC! %%x
for %%x in (dmd\compiler\src\dmd\root\*.d) do set DMD_FRONTEND_SRC=!DMD_FRONTEND_SRC! %%x
for %%x in (dmd\compiler\src\dmd\*.d) do (
echo %%x
echo "!DMD_FRONTEND_DENYLIST!" | findstr /i /c:" %%x " >nul
if errorlevel 1 (
echo "Adding %%x"
set "DMD_FRONTEND_SRC=!DMD_FRONTEND_SRC! %%x"
)
)

set DMD_ROOT_SRC=
for %%x in (dmd\compiler\src\dmd\common\*.d) do set DMD_ROOT_SRC=!DMD_ROOT_SRC! %%x
Expand Down Expand Up @@ -69,15 +107,6 @@ for %%x in (DCD\dsymbol\src\dsymbol\conversion\*.d) do set DSYMBOL=!DSYMBOL! %%x
for %%x in (containers\src\containers\*.d) do set CONTAINERS=!CONTAINERS! %%x
for %%x in (containers\src\containers\internal\*.d) do set CONTAINERS=!CONTAINERS! %%x

for %%x in (dmd\compiler\src\dmd\common\*.d) do %DC% %DFLAGS% -c %%x -od. -I"dmd\compiler\src"
for %%x in (dmd\compiler\src\dmd\root\*.d) do %DC% %DFLAGS% -c %%x -od. -I"dmd\compiler\src"
for %%x in (dmd\compiler\src\dmd\backend\*.d) do %DC% %DFLAGS% -c %%x -od. -I"dmd\compiler\src"
for %%x in (dmd\compiler\src\dmd\*.d) do %DC% %DFLAGS% -c %%x -od. -I"dmd\compiler\src"

%DC% %DFLAGS% -c dmd\compiler\src\dmd\backend\iasm.d -od. -ofiasm2.obj -I"dmd\compiler\src"
%DC% %DFLAGS% -c dmd\compiler\src\dmd\common\string.d -od. -ofstring2.obj -I"dmd\compiler\src"
%DC% %DFLAGS% -c dmd\compiler\src\dmd\common\file.d -od. -offile2.obj -I"dmd\compiler\src"

if "%1" == "test" goto test_cmd

@echo on
Expand Down Expand Up @@ -121,7 +150,8 @@ set TESTNAME="bin\dscanner-unittest"
-I"libddoc\src"^
-I"dmd\compiler\src"^
-I"dmd\compiler\src\dmd\res"^
-lib %TESTFLAGS%^
%TESTFLAGS%^
-lib^
-of%TESTNAME%.lib
if exist %TESTNAME%.lib %DC% %MFLAGS%^
%CORE%^
Expand Down

0 comments on commit aace2e9

Please sign in to comment.