Building from source on Windows
forkit
forkit at gmail.com
Sun Jan 30 00:16:41 UTC 2022
On Saturday, 29 January 2022 at 12:50:40 UTC, MoonlightSentinel
wrote:
>
> You apparently built dmd with unittests enabled. D applications
> build with `-unittest` do snot execute the actual main unless
> explicitly requested via a Druntime option. So the targets of
> the make rule are never built, causing the cascading error
> later on for `copydir`.
>
> Not sure how you build that dmd since `make` / `build.d`
> explicitly use a different name for the unittest executable.
so I just did this:
c:\source\D\dmd>make -f win64.mak
(output from above command is below - and yes, it seems something
is defaulting to "ENABLE_UNITTEST=1)
(this is the output below, from the command above)
cd src
make -f win64.mak
dmd -g -ofvcbuild\msvc-lib.exe vcbuild\msvc-lib.d
if not exist "..\generated\windows\release\64" mkdir
..\generated\windows\release\64
make -f win32.mak "OS=windows" "BUILD=release" "MODEL=64"
"HOST_DMD=" "HOST_DC=dmd" "MAKE=make" "VERBOSE="
"ENABLE_RELEASE=" "ENABLE_DEBUG=" "ENABLE_ASSERTS="
"ENABLE_UNITTEST=" "ENABLE_PROFILE=" "ENABLE_COVERAGE=" "DFLAGS="
"GEN=..\generated" "G=..\generated\windows\release\64"
"LIB=vcbuild\msvc-lib" defaulttarget
if not exist "..\generated\windows\release\64" mkdir
..\generated\windows\release\64
make -fwin32.mak MAKE="make" HOST_DC="dmd" MODEL=64 CC=""
VERBOSE= "ENABLE_DEBUG=1" "ENABLE_UNITTEST=1"
..\generated\windows\release\64\dmd.exe
echo "===== DEPRECATION NOTICE ====="
"===== DEPRECATION NOTICE ====="
echo "===== DEPRECATION: win32.mak is deprecated. Please use
src\build.d instead."
"===== DEPRECATION: win32.mak is deprecated. Please use
src\build.d instead."
echo "=============================="
"=============================="
dmd -m64 -of..\generated\build.exe -g build.d
..\generated\build.exe --called-from-make "OS=windows"
"BUILD=release" "MODEL=64" "HOST_DMD=" "HOST_DC=dmd" "MAKE=make"
"VERBOSE=" "ENABLE_RELEASE=" "ENABLE_DEBUG=1" "ENABLE_ASSERTS="
"ENABLE_UNITTEST=1" "ENABLE_PROFILE=" "ENABLE_COVERAGE="
"DFLAGS=" ..\generated\windows\release\64\dmd.exe
(TX) VERSION
(TX) SYSCONFDIR
(DC) COMMON
(DC) LEXER
(DC) BACKEND
(DC) DMD
Success
copy ..\generated\windows\release\64\dmd.exe .
1 file(s) copied.
More information about the Digitalmars-d
mailing list