mirror of
https://github.com/dlang/dmd.git
synced 2025-04-26 05:00:16 +03:00
Fix build script paths to work with new merged repository structure
Co-Authored-By: Geod24 <pro.mathias.lang@gmail.com> Co-Authored-By: Martin Kinkelin <noone@nowhere.com> Co-Authored-By: Vladimir Panteleev <git@cy.md>
This commit is contained in:
parent
69ab16a7e8
commit
09d04945bd
56 changed files with 499 additions and 209 deletions
|
@ -89,7 +89,7 @@ clone_repos() {
|
|||
local REPO_BRANCH="$SYSTEM_PULLREQUEST_TARGETBRANCH"
|
||||
fi
|
||||
|
||||
for proj in druntime phobos; do
|
||||
for proj in phobos; do
|
||||
if [ "$REPO_BRANCH" != master ] && [ "$REPO_BRANCH" != stable ] &&
|
||||
! git ls-remote --exit-code --heads "https://github.com/dlang/$proj.git" "$REPO_BRANCH" > /dev/null; then
|
||||
# use master as fallback for other repos to test feature branches
|
||||
|
|
|
@ -37,22 +37,22 @@ REM configure LDC path
|
|||
if "%D_COMPILER%" == "ldc" reg add "HKLM\SOFTWARE\LDC" /v InstallationFolder /t REG_SZ /d "%LDC_DIR%" /reg:32 /f
|
||||
|
||||
echo [STEP]: Building DMD via VS projects
|
||||
cd src
|
||||
cd compiler\src
|
||||
if "%D_COMPILER%" == "ldc" set LDC_ARGS=%LDC_ARGS% /p:DCompiler=LDC
|
||||
msbuild /target:dmd /p:Configuration=%CONFIGURATION% /p:Platform=%PLATFORM% %LDC_ARGS% vcbuild\dmd.sln || exit /B 1
|
||||
%DMD% --version
|
||||
|
||||
echo [STEP]: Building druntime
|
||||
cd "%DMD_DIR%\..\druntime"
|
||||
cd "%DMD_DIR%\druntime"
|
||||
"%DM_MAKE%" -f win64.mak MODEL=%MODEL% "DMD=%DMD%" "VCDIR=%VCINSTALLDIR%." "CC=%MSVC_CC%" "MAKE=%DM_MAKE%" "HOST_DMD=%HOST_DMD%" target || exit /B 2
|
||||
|
||||
echo [STEP]: Building phobos
|
||||
cd "%DMD_DIR%\..\phobos"
|
||||
"%DM_MAKE%" -f win64.mak MODEL=%MODEL% "DMD=%DMD%" "VCDIR=%VCINSTALLDIR%." "CC=%MSVC_CC%" "AR=%MSVC_AR%" "MAKE=%DM_MAKE%" || exit /B 3
|
||||
"%DM_MAKE%" -f win64.mak MODEL=%MODEL% "DMD=%DMD%" "VCDIR=%VCINSTALLDIR%." "CC=%MSVC_CC%" "AR=%MSVC_AR%" "MAKE=%DM_MAKE%" "DRUNTIME=%DMD_DIR%\druntime" || exit /B 3
|
||||
|
||||
echo [STEP]: Building run.d testrunner and its tools
|
||||
REM needs to be done before tampering with LIB and DFLAGS env variables (affecting the ldmd2 host compiler too)
|
||||
cd "%DMD_DIR%\test"
|
||||
cd "%DMD_DIR%\compiler\test"
|
||||
"%HOST_DMD%" -m%MODEL% -g -i run.d || exit /B 4
|
||||
run.exe tools "BUILD=%CONFIGURATION%" "DMD_MODEL=%PLATFORM%" || exit /B 4
|
||||
|
||||
|
@ -77,17 +77,17 @@ if not "%C_RUNTIME%" == "mingw" goto not_mingw
|
|||
rem skip runnable_cxx tests (incompatible MSVC runtime versions - 2017 (cl.exe) vs. 2013)
|
||||
set DMD_TESTS=runnable compilable fail_compilation dshell unit_tests
|
||||
rem FIXME: debug info incomplete when linking through lld-link
|
||||
del test\runnable\testpdb.d
|
||||
del compiler\test\runnable\testpdb.d
|
||||
|
||||
set DRUNTIME_TESTS=test_mingw
|
||||
:not_mingw
|
||||
|
||||
echo [STEP]: Building and running druntime tests
|
||||
cd "%DMD_DIR%\..\druntime"
|
||||
cd "%DMD_DIR%\druntime"
|
||||
"%DM_MAKE%" -f win64.mak MODEL=%MODEL% "DMD=%DMD%" "VCDIR=%VCINSTALLDIR%." "CC=%MSVC_CC%" "MAKE=%DM_MAKE%" unittest %DRUNTIME_TESTS% || exit /B 5
|
||||
|
||||
echo [STEP]: Running DMD testsuite
|
||||
cd "%DMD_DIR%\test"
|
||||
cd "%DMD_DIR%\compiler\test"
|
||||
set CC=%MSVC_CC%
|
||||
run.exe --environment --jobs=%N% %DMD_TESTS% "ARGS=-O -inline -g" "BUILD=%CONFIGURATION%" "DMD_MODEL=%PLATFORM%" || exit /B 6
|
||||
|
||||
|
@ -99,4 +99,4 @@ if "%D_COMPILER%_%MODEL%" == "ldc_64" copy %LDC_DIR%\lib64\libcurl.dll .
|
|||
if "%D_COMPILER%_%MODEL%" == "ldc_32mscoff" copy %LDC_DIR%\lib32\libcurl.dll .
|
||||
if "%D_COMPILER%_%MODEL%" == "dmd_64" copy %DMD_DIR%\dmd2\windows\bin64\libcurl.dll .
|
||||
if "%D_COMPILER%_%MODEL%" == "dmd_32mscoff" copy %DMD_DIR%\dmd2\windows\bin\libcurl.dll .
|
||||
"%DM_MAKE%" -f win64.mak MODEL=%MODEL% "DMD=%DMD%" "VCDIR=%VCINSTALLDIR%." "CC=%MSVC_CC%" "MAKE=%DM_MAKE%" unittest || exit /B 7
|
||||
"%DM_MAKE%" -f win64.mak MODEL=%MODEL% "DMD=%DMD%" "VCDIR=%VCINSTALLDIR%." "CC=%MSVC_CC%" "MAKE=%DM_MAKE%" "DRUNTIME=%DMD_DIR%\druntime" unittest || exit /B 7
|
||||
|
|
|
@ -80,9 +80,9 @@ else
|
|||
DMD_BIN_PATH="$DMD_DIR/generated/windows/release/$MODEL/dmd"
|
||||
fi
|
||||
|
||||
cd "$DMD_DIR/src"
|
||||
cd "$DMD_DIR/compiler/src"
|
||||
"$DM_MAKE" -f "$MAKE_FILE" MAKE="$DM_MAKE" BUILD=debug unittest
|
||||
DFLAGS="-L-LARGEADDRESSAWARE" "$DM_MAKE" -f "$MAKE_FILE" MAKE="$DM_MAKE" reldmd-asserts
|
||||
DFLAGS="-L-LARGEADDRESSAWARE" "$DM_MAKE" -f "$MAKE_FILE" MAKE="$DM_MAKE" GEN="$DMD_DIR\generated" reldmd-asserts
|
||||
|
||||
################################################################################
|
||||
# Build Druntime and Phobos
|
||||
|
@ -90,20 +90,19 @@ DFLAGS="-L-LARGEADDRESSAWARE" "$DM_MAKE" -f "$MAKE_FILE" MAKE="$DM_MAKE" reldmd-
|
|||
|
||||
LIBS_MAKE_ARGS=(-f "$MAKE_FILE" MODEL=$MODEL DMD="$DMD_BIN_PATH" VCDIR=. CC="$CC" AR="$AR" MAKE="$DM_MAKE")
|
||||
|
||||
for proj in druntime phobos; do
|
||||
cd "$DMD_DIR/../$proj"
|
||||
"$DM_MAKE" "${LIBS_MAKE_ARGS[@]}"
|
||||
done
|
||||
cd "$DMD_DIR/druntime"
|
||||
"$DM_MAKE" "${LIBS_MAKE_ARGS[@]}"
|
||||
|
||||
cd "$DMD_DIR/../phobos"
|
||||
"$DM_MAKE" "${LIBS_MAKE_ARGS[@]}" DRUNTIME="$DMD_DIR\druntime"
|
||||
|
||||
################################################################################
|
||||
# Run DMD testsuite
|
||||
################################################################################
|
||||
|
||||
cd "$DMD_DIR/test"
|
||||
cd "$DMD_DIR/compiler/test"
|
||||
|
||||
# build run.d testrunner and its tools while host compiler is untampered
|
||||
cd ../test
|
||||
|
||||
if [ "$MODEL" == "32omf" ] ; then
|
||||
TOOL_MODEL=32;
|
||||
else
|
||||
|
@ -118,8 +117,8 @@ if [ "${DMD_TEST_COVERAGE:-0}" = "1" ] ; then
|
|||
|
||||
# Recompile debug dmd + unittests
|
||||
rm -rf "$DMD_DIR/generated/windows"
|
||||
DFLAGS="-L-LARGEADDRESSAWARE" ../generated/build.exe --jobs=$N ENABLE_DEBUG=1 ENABLE_COVERAGE=1 dmd
|
||||
DFLAGS="-L-LARGEADDRESSAWARE" ../generated/build.exe --jobs=$N ENABLE_DEBUG=1 ENABLE_COVERAGE=1 unittest
|
||||
DFLAGS="-L-LARGEADDRESSAWARE" ../../generated/build.exe --jobs=$N ENABLE_DEBUG=1 ENABLE_COVERAGE=1 dmd
|
||||
DFLAGS="-L-LARGEADDRESSAWARE" ../../generated/build.exe --jobs=$N ENABLE_DEBUG=1 ENABLE_COVERAGE=1 unittest
|
||||
fi
|
||||
|
||||
if [ "$MODEL" == "32omf" ] ; then
|
||||
|
@ -152,7 +151,7 @@ fi
|
|||
# Build and run druntime tests
|
||||
################################################################################
|
||||
|
||||
cd "$DMD_DIR/../druntime"
|
||||
cd "$DMD_DIR/druntime"
|
||||
"$DM_MAKE" "${LIBS_MAKE_ARGS[@]}" unittest test_all
|
||||
|
||||
################################################################################
|
||||
|
@ -168,7 +167,7 @@ else
|
|||
else
|
||||
cp "$DMD_DIR/tools/dmd2/windows/bin/libcurl.dll" .
|
||||
fi
|
||||
"$DM_MAKE" "${LIBS_MAKE_ARGS[@]}" unittest
|
||||
"$DM_MAKE" "${LIBS_MAKE_ARGS[@]}" DRUNTIME="$DMD_DIR\druntime" unittest
|
||||
fi
|
||||
|
||||
################################################################################
|
||||
|
|
|
@ -95,7 +95,7 @@ setup_repos() {
|
|||
git checkout -f FETCH_HEAD
|
||||
fi
|
||||
|
||||
for proj in druntime phobos; do
|
||||
for proj in phobos; do
|
||||
if [ $base_branch != master ] && [ $base_branch != stable ] &&
|
||||
! git ls-remote --exit-code --heads https://github.com/dlang/$proj.git $base_branch > /dev/null; then
|
||||
# use master as fallback for other repos to test feature branches
|
||||
|
@ -114,10 +114,10 @@ coverage()
|
|||
local build_path=generated/linux/$BUILD/$MODEL
|
||||
local builder=generated/build
|
||||
|
||||
dmd -g -od=generated -of=$builder src/build
|
||||
dmd -g -od=generated -of=$builder compiler/src/build
|
||||
# build dmd, druntime, and phobos
|
||||
$builder MODEL=$MODEL HOST_DMD=$DMD BUILD=$BUILD all
|
||||
make -j$N -C ../druntime -f posix.mak MODEL=$MODEL BUILD=$BUILD
|
||||
make -j$N -C druntime -f posix.mak MODEL=$MODEL BUILD=$BUILD
|
||||
make -j$N -C ../phobos -f posix.mak MODEL=$MODEL BUILD=$BUILD
|
||||
|
||||
# save the built dmd as host compiler this time
|
||||
|
@ -134,14 +134,14 @@ coverage()
|
|||
|
||||
# FIXME
|
||||
# Temporarily the failing long file name test has been removed
|
||||
rm -rf test/compilable/issue17167.sh
|
||||
rm -rf compiler/test/compilable/issue17167.sh
|
||||
|
||||
# rebuild dmd with coverage enabled
|
||||
$builder MODEL=$MODEL BUILD=$BUILD HOST_DMD=$PWD/_${build_path}/host_dmd ENABLE_COVERAGE=1
|
||||
|
||||
cp $build_path/dmd _${build_path}/host_dmd_cov
|
||||
$builder MODEL=$MODEL BUILD=$BUILD HOST_DMD=$PWD/_${build_path}/host_dmd ENABLE_COVERAGE=1 unittest
|
||||
_${build_path}/host_dmd -Itest -i -run ./test/run.d -j$N MODEL=$MODEL BUILD=$BUILD ARGS="-O -inline -release" DMD_TEST_COVERAGE=1 HOST_DMD=$PWD/_${build_path}/host_dmd
|
||||
_${build_path}/host_dmd -Icompiler/test -i -run ./compiler/test/run.d -j$N MODEL=$MODEL BUILD=$BUILD ARGS="-O -inline -release" DMD_TEST_COVERAGE=1 HOST_DMD=$PWD/_${build_path}/host_dmd
|
||||
}
|
||||
|
||||
# Checks that all files have been committed and no temporary, untracked files exist.
|
||||
|
@ -149,13 +149,13 @@ coverage()
|
|||
check_clean_git()
|
||||
{
|
||||
# Restore temporarily removed files
|
||||
git checkout test/compilable/issue17167.sh
|
||||
git checkout compiler/test/compilable/issue17167.sh
|
||||
# Remove temporary directory + install script
|
||||
rm -rf _generated
|
||||
rm -f install.sh
|
||||
# auto-removal of these files doesn't work on CirleCi
|
||||
rm -f test/compilable/vcg-ast.d.cg
|
||||
rm -f test/compilable/vcg-ast-arraylength.d.cg
|
||||
rm -f compiler/test/compilable/vcg-ast.d.cg
|
||||
rm -f compiler/test/compilable/vcg-ast-arraylength.d.cg
|
||||
# Ensure that there are no untracked changes
|
||||
make -f posix.mak check-clean-git
|
||||
}
|
||||
|
@ -164,7 +164,7 @@ check_clean_git()
|
|||
check_run_individual()
|
||||
{
|
||||
local build_path=generated/linux/$BUILD/$MODEL
|
||||
"${build_path}/dmd" -I./test -i -run ./test/run.d "BUILD=$BUILD" "MODEL=$MODEL" test/runnable/template2962.d ./test/compilable/test14275.d
|
||||
"${build_path}/dmd" -Icompiler/test -i -run ./compiler/test/run.d "BUILD=$BUILD" "MODEL=$MODEL" compiler/test/runnable/template2962.d ./compiler/test/compilable/test14275.d
|
||||
}
|
||||
|
||||
# Checks the D build.d script
|
||||
|
@ -173,12 +173,12 @@ check_d_builder()
|
|||
echo "Testing D build"
|
||||
# load environment for bootstrap compiler
|
||||
source "$(CURL_USER_AGENT=\"$CURL_USER_AGENT\" bash ~/dlang/install.sh dmd-$HOST_DMD_VER --activate)"
|
||||
./src/build.d clean
|
||||
./compiler/src/build.d clean
|
||||
rm -rf generated # just to be sure
|
||||
# TODO: add support for 32-bit builds
|
||||
./src/build.d MODEL=64
|
||||
./compiler/src/build.d MODEL=64
|
||||
./generated/linux/release/64/dmd --version | grep -v "dirty"
|
||||
./src/build.d clean
|
||||
./compiler/src/build.d clean
|
||||
deactivate
|
||||
}
|
||||
|
||||
|
@ -188,10 +188,10 @@ test_cxx()
|
|||
# load environment for bootstrap compiler
|
||||
source "$(CURL_USER_AGENT=\"$CURL_USER_AGENT\" bash ~/dlang/install.sh dmd-$HOST_DMD_VER --activate)"
|
||||
echo "Test CXX frontend.h header generation"
|
||||
./src/build.d
|
||||
make -j$N -C ../druntime -f posix.mak MODEL=$MODEL BUILD=$BUILD
|
||||
./compiler/src/build.d
|
||||
make -j$N -C druntime -f posix.mak MODEL=$MODEL BUILD=$BUILD
|
||||
make -j$N -C ../phobos -f posix.mak MODEL=$MODEL BUILD=$BUILD
|
||||
./src/build.d cxx-headers-test
|
||||
./compiler/src/build.d cxx-headers-test
|
||||
deactivate
|
||||
}
|
||||
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# Test
|
||||
common_steps_template: &COMMON_STEPS_TEMPLATE
|
||||
install_prerequisites_script: ./ci/cirrusci.sh
|
||||
install_host_compiler_script: ./ci/run.sh install_host_compiler
|
||||
|
|
4
.gitattributes
vendored
4
.gitattributes
vendored
|
@ -1,3 +1,3 @@
|
|||
# The following text files requires strict end of line rules
|
||||
test/compilable/extra-files/makedeps-import.txt text eol=lf
|
||||
test/fail_compilation/extra-files/makedeps-import.txt text eol=lf
|
||||
compiler/test/compilable/extra-files/makedeps-import.txt text eol=lf
|
||||
compiler/test/fail_compilation/extra-files/makedeps-import.txt text eol=lf
|
||||
|
|
114
.github/workflows/runnable_cxx.yml
vendored
114
.github/workflows/runnable_cxx.yml
vendored
|
@ -119,9 +119,21 @@ jobs:
|
|||
- { os: windows-2019, target: g++-6 }
|
||||
- { os: windows-2019, target: g++-5 }
|
||||
|
||||
# TODO: Implement support for clang and MSVC on Windows
|
||||
# TODO: Implement support for clang and MSVC2017 on Windows
|
||||
# Currently those are still being run by the auto-tester
|
||||
- os: windows-2019
|
||||
# We can hardly test below 2017 in the CI because there's
|
||||
# no way to install it via command line
|
||||
# (TODO: Test with 2015 as the blog post is slightly ambiguous)
|
||||
# https://devblogs.microsoft.com/cppblog/introducing-the-visual-studio-build-tools/
|
||||
- { os: windows-2019, target: msvc-2017 }
|
||||
- { os: windows-2019, target: msvc-2015 }
|
||||
- { os: windows-2019, target: msvc-2013 }
|
||||
- { os: windows-2019, target: clang-13.0.0 }
|
||||
- { os: windows-2019, target: clang-12.0.0 }
|
||||
- { os: windows-2019, target: clang-11.0.0 }
|
||||
- { os: windows-2019, target: clang-10.0.0 }
|
||||
- { os: windows-2019, target: clang-9.0.0 }
|
||||
- { os: windows-2019, target: clang-8.0.0 }
|
||||
|
||||
# This sets the configuration for each jobs
|
||||
# There's a bit of duplication involved (e.g. breaking down g++-9.3 into 2 strings),
|
||||
|
@ -191,13 +203,6 @@ jobs:
|
|||
with:
|
||||
path: dmd
|
||||
persist-credentials: false
|
||||
- name: Checkout druntime
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
path: druntime
|
||||
repository: dlang/druntime
|
||||
ref: ${{ steps.base_branch.outputs.branch }}
|
||||
persist-credentials: false
|
||||
- name: Checkout Phobos
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
|
@ -304,48 +309,115 @@ jobs:
|
|||
exit 1
|
||||
fi
|
||||
|
||||
# Restore or install dmc (and DM make)
|
||||
- name: '[Windows] Restore dmc from cache'
|
||||
id: cache-dmc
|
||||
if: runner.os == 'Windows'
|
||||
uses: actions/cache@v1
|
||||
with:
|
||||
path: ${{ github.workspace }}\tools\
|
||||
key: ${{ matrix.os }}-dmc857
|
||||
|
||||
- name: '[Windows] Install dmc'
|
||||
if: runner.os == 'Windows' && steps.cache-dmc.outputs.cache-hit != 'true'
|
||||
shell: powershell
|
||||
run: |
|
||||
$url = "http://ftp.digitalmars.com/Digital_Mars_C++/Patch/dm857c.zip"
|
||||
$sha256hash = "F51CDFEB45EAF4FFBF7ABF0FE9B3D548B202B4528401005C2C3192B00BC32367"
|
||||
Write-Host ('Downloading {0} ...' -f $url)
|
||||
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
|
||||
$ProgressPreference = 'SilentlyContinue'
|
||||
New-Item -ItemType directory -Path ${{ github.workspace }}\tools\
|
||||
Invoke-WebRequest -Uri $url -OutFile '${{ github.workspace }}\tools\dmc.zip'
|
||||
if ((Get-FileHash '${{ github.workspace }}\tools\dmc.zip' -Algorithm "SHA256").Hash -ne $sha256hash) {
|
||||
exit 1
|
||||
}
|
||||
Expand-Archive '${{ github.workspace }}\tools\dmc.zip' -DestinationPath ${{ github.workspace }}\tools\
|
||||
|
||||
- name: '[Windows] Add VC toolset to PATH'
|
||||
if: runner.os == 'Windows'
|
||||
uses: ilammy/msvc-dev-cmd@v1
|
||||
|
||||
- name: '[Windows] Set environment variables'
|
||||
if: runner.os == 'Windows'
|
||||
shell: bash
|
||||
run: |
|
||||
echo "VISUAL_STUDIO_LIB_NOT_DM=$(which lib.exe)" >> $GITHUB_ENV
|
||||
echo "HOST_DMD=${{ env.DC }}" >> $GITHUB_ENV
|
||||
echo "${{ github.workspace }}/tools/dm/bin/" >> $GITHUB_PATH
|
||||
|
||||
########################################
|
||||
# Building DMD, druntime, Phobos #
|
||||
########################################
|
||||
- name: '[Posix] Build compiler & standard library'
|
||||
if: runner.os != 'Windows'
|
||||
# By default, VMs have 2 processors available, hence the `-j2`:
|
||||
# https://help.github.com/en/actions/reference/virtual-environments-for-github-hosted-runners#supported-runners-and-hardware-resources
|
||||
run: |
|
||||
# All hosts are 64 bits but let's be explicit
|
||||
./dmd/src/build.d -j2 MODEL=64
|
||||
make -C druntime -f posix.mak -j2 MODEL=64
|
||||
./dmd/compiler/src/build.d -j2 MODEL=64
|
||||
make -C dmd/druntime -f posix.mak -j2 MODEL=64
|
||||
make -C phobos -f posix.mak -j2 MODEL=64
|
||||
# Both version can live side by side (they end up in a different directory)
|
||||
# However, since clang does not provide a multilib package, only test 32 bits with g++
|
||||
if [ ${{ matrix.compiler }} == "g++" ]; then
|
||||
./dmd/src/build.d install -j2 MODEL=32
|
||||
make -C druntime -f posix.mak install -j2 MODEL=32
|
||||
./dmd/compiler/src/build.d install -j2 MODEL=32
|
||||
make -C dmd/druntime -f posix.mak install -j2 MODEL=32
|
||||
make -C phobos -f posix.mak install -j2 MODEL=32
|
||||
fi
|
||||
|
||||
- name: '[Windows] Build compiler & standard library'
|
||||
if: runner.os == 'Windows'
|
||||
shell: bash
|
||||
run: |
|
||||
dmd -run dmd/compiler/src/build.d -j2 MODEL=64
|
||||
if [ $? -ne 0 ]; then return 1; fi
|
||||
# Note: Only CC for druntime and AR for Phobos are required ATM,
|
||||
# but providing all three to avoid surprise for future contributors
|
||||
# Those should really be in the path, though.
|
||||
cd dmd/druntime
|
||||
make -f win64.mak
|
||||
if [ $? -ne 0 ]; then return 1; fi
|
||||
cd ../../phobos/
|
||||
make -f win64.mak CC=cl.exe LD=link "AR=$VISUAL_STUDIO_LIB_NOT_DM"
|
||||
if [ $? -ne 0 ]; then return 1; fi
|
||||
cd ../
|
||||
|
||||
########################################
|
||||
# Running the test suite #
|
||||
########################################
|
||||
- name: Run C++ test suite
|
||||
- name: '[Posix] Run C++ test suite'
|
||||
if: runner.os != 'Windows'
|
||||
env:
|
||||
# Reset LD_LIBRARY_PATH when running the tests, so they use the newly built libphobos2.so.
|
||||
LD_LIBRARY_PATH: ''
|
||||
run: |
|
||||
./dmd/test/run.d --environment runnable_cxx dshell/dll_cxx.d MODEL=64
|
||||
./dmd/compiler/test/run.d --environment runnable_cxx dshell/dll_cxx.d MODEL=64
|
||||
if [ ${{ matrix.compiler }} == "g++" ]; then
|
||||
./dmd/test/run.d clean
|
||||
./dmd/test/run.d --environment runnable_cxx dshell/dll_cxx.d MODEL=32
|
||||
./dmd/compiler/test/run.d clean
|
||||
./dmd/compiler/test/run.d --environment runnable_cxx dshell/dll_cxx.d MODEL=32
|
||||
fi
|
||||
|
||||
- name: '[Windows] Run C++ test suite'
|
||||
if: runner.os == 'Windows'
|
||||
shell: bash
|
||||
run: |
|
||||
cd dmd/druntime
|
||||
make -f win64.mak test_stdcpp CC=cl.exe LD=link "AR=$VISUAL_STUDIO_LIB_NOT_DM"
|
||||
if [ $? -ne 0 ]; then return 1; fi
|
||||
|
||||
########################################
|
||||
# Run C++ frontend unittests #
|
||||
########################################
|
||||
- name: Run C++ frontend unittests
|
||||
if: matrix.compiler == 'g++'
|
||||
run: |
|
||||
./dmd/src/build.d cxx-unittest MODEL=64
|
||||
if [ ${{ matrix.compiler }} == "g++" ]; then
|
||||
./dmd/src/build.d cxx-unittest MODEL=32
|
||||
fi
|
||||
./dmd/compiler/src/build.d cxx-unittest MODEL=64
|
||||
|
||||
- name: Run C++ frontend unittests (32-bit)
|
||||
if: matrix.compiler == 'g++'
|
||||
run: |
|
||||
./dmd/compiler/src/build.d cxx-unittest MODEL=32
|
||||
|
||||
########################################
|
||||
# Store generated artifacts #
|
||||
|
|
20
.gitignore
vendored
20
.gitignore
vendored
|
@ -1,9 +1,9 @@
|
|||
*.[oa]
|
||||
*.deps
|
||||
.B*
|
||||
test/test_results
|
||||
test/trace.def
|
||||
test/trace.log
|
||||
/compiler/test/test_results
|
||||
/compiler/test/trace.def
|
||||
/compiler/test/trace.log
|
||||
generated/
|
||||
*.obj
|
||||
*.map
|
||||
|
@ -17,9 +17,9 @@ dub.selections.json
|
|||
# Visual Studio files
|
||||
*.exe
|
||||
*.pdb
|
||||
src/vcbuild/Win32
|
||||
src/vcbuild/x64
|
||||
src/vcbuild/.vs
|
||||
/compiler/src/vcbuild/Win32
|
||||
/compiler/src/vcbuild/x64
|
||||
/compiler/src/vcbuild/.vs
|
||||
*.ncb
|
||||
*.suo
|
||||
*.sdf
|
||||
|
@ -35,13 +35,13 @@ xcuserdata/
|
|||
dmd.xcodeproj/
|
||||
|
||||
# Output files
|
||||
src/*.bak
|
||||
src/*.lib
|
||||
src/*.lst
|
||||
/compiler/src/*.bak
|
||||
/compiler/src/*.lib
|
||||
/compiler/src/*.lst
|
||||
tags
|
||||
|
||||
# OSX
|
||||
src/optabgen.dSYM/
|
||||
/compiler/src/optabgen.dSYM/
|
||||
|
||||
# GCov
|
||||
*.gcno
|
||||
|
|
20
ci/run.sh
20
ci/run.sh
|
@ -59,9 +59,9 @@ clone() {
|
|||
# build dmd (incl. building and running the unittests), druntime, phobos
|
||||
build() {
|
||||
source ~/dlang/*/activate # activate host compiler, incl. setting `DMD`
|
||||
make -j$N -C src -f posix.mak MODEL=$MODEL HOST_DMD=$DMD DFLAGS="$CI_DFLAGS" BUILD=debug ENABLE_WARNINGS=1 unittest
|
||||
make -j$N -C src -f posix.mak MODEL=$MODEL HOST_DMD=$DMD DFLAGS="$CI_DFLAGS" ENABLE_RELEASE=1 ENABLE_WARNINGS=1 all
|
||||
make -j$N -C ../druntime -f posix.mak MODEL=$MODEL
|
||||
make -j$N -C compiler/src -f posix.mak MODEL=$MODEL HOST_DMD=$DMD DFLAGS="$CI_DFLAGS" BUILD=debug ENABLE_WARNINGS=1 unittest
|
||||
make -j$N -C compiler/src -f posix.mak MODEL=$MODEL HOST_DMD=$DMD DFLAGS="$CI_DFLAGS" ENABLE_RELEASE=1 ENABLE_WARNINGS=1 all
|
||||
make -j$N -C druntime -f posix.mak MODEL=$MODEL
|
||||
make -j$N -C ../phobos -f posix.mak MODEL=$MODEL
|
||||
deactivate # deactivate host compiler
|
||||
}
|
||||
|
@ -75,8 +75,8 @@ rebuild() {
|
|||
mkdir -p _${build_path}
|
||||
cp $build_path/dmd _${build_path}/host_dmd
|
||||
cp $build_path/dmd.conf _${build_path}
|
||||
make -j$N -C src -f posix.mak MODEL=$MODEL HOST_DMD=../_${build_path}/host_dmd clean
|
||||
make -j$N -C src -f posix.mak MODEL=$MODEL HOST_DMD=../_${build_path}/host_dmd DFLAGS="$CI_DFLAGS" ENABLE_RELEASE=${ENABLE_RELEASE:-1} ENABLE_WARNINGS=1 all
|
||||
make -j$N -C compiler/src -f posix.mak MODEL=$MODEL HOST_DMD=../../_${build_path}/host_dmd clean
|
||||
make -j$N -C compiler/src -f posix.mak MODEL=$MODEL HOST_DMD=../../_${build_path}/host_dmd DFLAGS="$CI_DFLAGS" ENABLE_RELEASE=${ENABLE_RELEASE:-1} ENABLE_WARNINGS=1 all
|
||||
|
||||
# compare binaries to test reproducible build
|
||||
if [ $compare -eq 1 ]; then
|
||||
|
@ -102,15 +102,15 @@ test() {
|
|||
test_dmd() {
|
||||
# test fewer compiler argument permutations for PRs to reduce CI load
|
||||
if [ "$FULL_BUILD" == "true" ] && [ "$OS_NAME" == "linux" ]; then
|
||||
make -j1 -C test MODEL=$MODEL N=$N # all ARGS by default
|
||||
make -j1 -C compiler/test MODEL=$MODEL N=$N # all ARGS by default
|
||||
else
|
||||
make -j1 -C test MODEL=$MODEL N=$N ARGS="-O -inline -release"
|
||||
make -j1 -C compiler/test MODEL=$MODEL N=$N ARGS="-O -inline -release"
|
||||
fi
|
||||
}
|
||||
|
||||
# build and run druntime unit tests
|
||||
test_druntime() {
|
||||
make -j$N -C ../druntime -f posix.mak MODEL=$MODEL unittest
|
||||
make -j$N -C druntime -f posix.mak MODEL=$MODEL unittest
|
||||
}
|
||||
|
||||
# build and run Phobos unit tests
|
||||
|
@ -145,10 +145,10 @@ test_dub_package() {
|
|||
deactivate
|
||||
}
|
||||
|
||||
# clone druntime/phobos repos if not already available
|
||||
# clone phobos repos if not already available
|
||||
setup_repos() {
|
||||
local branch="$1"
|
||||
for proj in druntime phobos; do
|
||||
for proj in phobos; do
|
||||
if [ ! -d ../$proj ]; then
|
||||
if [ $branch != master ] && [ $branch != stable ] &&
|
||||
! git ls-remote --exit-code --heads https://github.com/dlang/$proj.git $branch > /dev/null; then
|
||||
|
|
|
@ -21,8 +21,9 @@ import std.parallelism : TaskPool, totalCPUs;
|
|||
|
||||
const thisBuildScript = __FILE_FULL_PATH__.buildNormalizedPath;
|
||||
const srcDir = thisBuildScript.dirName;
|
||||
const dmdRepo = srcDir.dirName;
|
||||
const testDir = dmdRepo.buildPath("test");
|
||||
const compilerDir = srcDir.dirName;
|
||||
const dmdRepo = compilerDir.dirName;
|
||||
const testDir = compilerDir.buildPath("test");
|
||||
|
||||
shared bool verbose; // output verbose logging
|
||||
shared bool force; // always build everything (ignores timestamp checking)
|
||||
|
@ -292,7 +293,7 @@ alias lexer = makeRuleWithArgs!((MethodInitializer!BuildRule builder, BuildRule
|
|||
extraFlags,
|
||||
// source files need to have relative paths in order for the code coverage
|
||||
// .lst files to be named properly for CodeCov to find them
|
||||
rule.sources.map!(e => e.relativePath(dmdRepo))
|
||||
rule.sources.map!(e => e.relativePath(compilerDir))
|
||||
).array
|
||||
)
|
||||
);
|
||||
|
@ -307,7 +308,7 @@ alias dmdConf = makeRule!((builder, rule) {
|
|||
{
|
||||
enum confFile = "sc.ini";
|
||||
enum conf = `[Environment]
|
||||
DFLAGS="-I%@P%\..\..\..\..\..\druntime\import" "-I%@P%\..\..\..\..\..\phobos"
|
||||
DFLAGS="-I%@P%\..\..\..\..\druntime\import" "-I%@P%\..\..\..\..\..\phobos"
|
||||
LIB="%@P%\..\..\..\..\..\phobos"
|
||||
|
||||
[Environment32]
|
||||
|
@ -324,10 +325,10 @@ DFLAGS=%DFLAGS% -L/OPT:NOICF
|
|||
{
|
||||
enum confFile = "dmd.conf";
|
||||
enum conf = `[Environment32]
|
||||
DFLAGS=-I%@P%/../../../../../druntime/import -I%@P%/../../../../../phobos -L-L%@P%/../../../../../phobos/generated/{OS}/{BUILD}/32{exportDynamic} -fPIC
|
||||
DFLAGS=-I%@P%/../../../../druntime/import -I%@P%/../../../../../phobos -L-L%@P%/../../../../../phobos/generated/{OS}/{BUILD}/32{exportDynamic} -fPIC
|
||||
|
||||
[Environment64]
|
||||
DFLAGS=-I%@P%/../../../../../druntime/import -I%@P%/../../../../../phobos -L-L%@P%/../../../../../phobos/generated/{OS}/{BUILD}/64{exportDynamic} -fPIC
|
||||
DFLAGS=-I%@P%/../../../../druntime/import -I%@P%/../../../../../phobos -L-L%@P%/../../../../../phobos/generated/{OS}/{BUILD}/64{exportDynamic} -fPIC
|
||||
`;
|
||||
}
|
||||
|
||||
|
@ -362,7 +363,7 @@ alias common = makeRuleWithArgs!((MethodInitializer!BuildRule builder, BuildRule
|
|||
|
||||
// source files need to have relative paths in order for the code coverage
|
||||
// .lst files to be named properly for CodeCov to find them
|
||||
rule.sources.map!(e => e.relativePath(dmdRepo))
|
||||
rule.sources.map!(e => e.relativePath(compilerDir))
|
||||
).array)
|
||||
);
|
||||
|
||||
|
@ -398,7 +399,7 @@ alias backend = makeRuleWithArgs!((MethodInitializer!BuildRule builder, BuildRul
|
|||
|
||||
// source files need to have relative paths in order for the code coverage
|
||||
// .lst files to be named properly for CodeCov to find them
|
||||
rule.sources.map!(e => e.relativePath(dmdRepo))
|
||||
rule.sources.map!(e => e.relativePath(compilerDir))
|
||||
).array)
|
||||
);
|
||||
|
||||
|
@ -490,7 +491,7 @@ alias dmdExe = makeRuleWithArgs!((MethodInitializer!BuildRule builder, BuildRule
|
|||
].chain(extraFlags, platformArgs, flags["DFLAGS"],
|
||||
// source files need to have relative paths in order for the code coverage
|
||||
// .lst files to be named properly for CodeCov to find them
|
||||
rule.sources.map!(e => e.relativePath(dmdRepo))
|
||||
rule.sources.map!(e => e.relativePath(compilerDir))
|
||||
).array);
|
||||
});
|
||||
|
||||
|
@ -587,9 +588,9 @@ alias dmdPGO = makeRule!((builder, rule) {
|
|||
// Run phobos unittests
|
||||
//TODO makefiles
|
||||
//generated/linux/release/64/unittest/test_runner builds the unittests without running them.
|
||||
const scope cmd = ["make", "-C", "../phobos", "-j" ~ jobs.to!string, "-fposix.mak", "generated/linux/release/64/unittest/test_runner", "DMD_DIR="~dmdRepo];
|
||||
const scope cmd = ["make", "-C", "../phobos", "-j" ~ jobs.to!string, "-fposix.mak", "generated/linux/release/64/unittest/test_runner", "DMD_DIR="~compilerDir];
|
||||
log("%-(%s %)", cmd);
|
||||
if (spawnProcess(cmd, null, Config.init, dmdRepo).wait())
|
||||
if (spawnProcess(cmd, null, Config.init, compilerDir).wait())
|
||||
stderr.writeln("Phobos Tests failed! This will not end the PGO build because some data may have been gathered");
|
||||
}));
|
||||
alias finalDataMerge = methodInit!(BuildRule, (rundBuilder, rundRule) => rundBuilder
|
||||
|
@ -807,7 +808,7 @@ alias toolsRepo = makeRule!((builder, rule) => builder
|
|||
auto toolsDir = env["TOOLS_DIR"];
|
||||
version(Win32)
|
||||
// Win32-git seems to confuse C:\... as a relative path
|
||||
toolsDir = toolsDir.relativePath(dmdRepo);
|
||||
toolsDir = toolsDir.relativePath(compilerDir);
|
||||
run([env["GIT"], "clone", "--depth=1", env["GIT_HOME"] ~ "/tools", toolsDir]);
|
||||
})
|
||||
);
|
||||
|
@ -893,7 +894,7 @@ alias man = makeRule!((builder, rule) {
|
|||
alias genMan = methodInit!(BuildRule, (genManBuilder, genManRule) => genManBuilder
|
||||
.target(env["G"].buildPath("gen_man"))
|
||||
.sources([
|
||||
dmdRepo.buildPath("docs", "gen_man.d"),
|
||||
compilerDir.buildPath("docs", "gen_man.d"),
|
||||
env["D"].buildPath("cli.d")])
|
||||
.command([
|
||||
env["HOST_DMD_RUN"],
|
||||
|
@ -920,7 +921,7 @@ alias man = makeRule!((builder, rule) {
|
|||
"man1/dumpobj.1 man1/obj2asm.1 man5/dmd.conf.5".split
|
||||
.map!(e => methodInit!(BuildRule, (manFileBuilder, manFileRule) => manFileBuilder
|
||||
.target(genManDir.buildPath(e))
|
||||
.sources([dmdRepo.buildPath("docs", "man", e)])
|
||||
.sources([compilerDir.buildPath("docs", "man", e)])
|
||||
.deps([directoryRule(manFileRule.target.dirName)])
|
||||
.commandFunction(() => copyAndTouch(manFileRule.sources[0], manFileRule.target))
|
||||
.msg("copy '%s' to '%s'".format(manFileRule.sources[0], manFileRule.target))
|
||||
|
@ -1069,17 +1070,17 @@ alias install = makeRule!((builder, rule) {
|
|||
installRelativeFiles(env["INSTALL"].buildPath(env["OS"], bin), dmdExeFile.dirName, dmdExeFile.only, octal!755);
|
||||
|
||||
version (Windows)
|
||||
installRelativeFiles(env["INSTALL"], dmdRepo, sourceFiles);
|
||||
installRelativeFiles(env["INSTALL"], compilerDir, sourceFiles);
|
||||
|
||||
const scPath = buildPath(env["OS"], bin, conf);
|
||||
const iniPath = buildPath(dmdRepo, "ini");
|
||||
const iniPath = buildPath(compilerDir, "ini");
|
||||
|
||||
// The sources distributed alongside an official release only include the
|
||||
// configuration of the current OS at the root directory instead of the
|
||||
// whole `ini` folder in the project root.
|
||||
const confPath = iniPath.exists()
|
||||
? buildPath(iniPath, scPath)
|
||||
: buildPath(dmdRepo, "..", scPath);
|
||||
: buildPath(dmdRepo, scPath);
|
||||
|
||||
copyAndTouch(confPath, buildPath(env["INSTALL"], scPath));
|
||||
|
||||
|
@ -1258,9 +1259,9 @@ void parseEnvironment()
|
|||
else
|
||||
enum installPref = "..";
|
||||
|
||||
env.setDefault("INSTALL", environment.get("INSTALL_DIR", dmdRepo.buildPath(installPref, "install")));
|
||||
env.setDefault("INSTALL", environment.get("INSTALL_DIR", compilerDir.buildPath(installPref, "install")));
|
||||
|
||||
env.setDefault("DOCSRC", dmdRepo.buildPath("dlang.org"));
|
||||
env.setDefault("DOCSRC", compilerDir.buildPath("dlang.org"));
|
||||
env.setDefault("DOCDIR", srcDir);
|
||||
env.setDefault("DOC_OUTPUT_DIR", env["DOCDIR"]);
|
||||
|
||||
|
@ -1272,7 +1273,7 @@ void parseEnvironment()
|
|||
auto generated = env["GENERATED"] = dmdRepo.buildPath("generated");
|
||||
auto g = env["G"] = generated.buildPath(os, build, model);
|
||||
mkdirRecurse(g);
|
||||
env.setDefault("TOOLS_DIR", dmdRepo.dirName.buildPath("tools"));
|
||||
env.setDefault("TOOLS_DIR", compilerDir.dirName.buildPath("tools"));
|
||||
|
||||
auto hostDmdDef = env.getDefault("HOST_DMD", null);
|
||||
if (hostDmdDef.length == 0)
|
||||
|
@ -2243,7 +2244,7 @@ class BuildException : Exception
|
|||
The directory where all run commands are executed from. All relative file paths
|
||||
in a `run` command must be relative to `runDir`.
|
||||
*/
|
||||
alias runDir = dmdRepo;
|
||||
alias runDir = compilerDir;
|
||||
|
||||
/**
|
||||
Run a command which may not succeed and optionally log the invocation.
|
||||
|
|
|
@ -68,7 +68,7 @@ endif
|
|||
INSTALL_DIR=../../install
|
||||
D = dmd
|
||||
|
||||
GENERATED = ../generated
|
||||
GENERATED = ../../generated
|
||||
G = $(GENERATED)/$(OS)/$(BUILD)/$(MODEL)
|
||||
$(shell mkdir -p $G)
|
||||
|
||||
|
|
|
@ -112,32 +112,32 @@
|
|||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
<OutDir>..\..\generated\Windows\$(Configuration)\$(PlatformName)\</OutDir>
|
||||
<OutDir>..\..\..\generated\Windows\$(Configuration)\$(PlatformName)\</OutDir>
|
||||
<IntDir>$(OutDir)\dmd\</IntDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
<OutDir>..\..\generated\Windows\$(Configuration)\$(PlatformName)\</OutDir>
|
||||
<OutDir>..\..\..\generated\Windows\$(Configuration)\$(PlatformName)\</OutDir>
|
||||
<IntDir>$(OutDir)\dmd\</IntDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
<OutDir>..\..\generated\Windows\$(Configuration)\$(PlatformName)\</OutDir>
|
||||
<OutDir>..\..\..\generated\Windows\$(Configuration)\$(PlatformName)\</OutDir>
|
||||
<IntDir>$(OutDir)\dmd\</IntDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='RelWithAsserts|Win32'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
<OutDir>..\..\generated\Windows\$(Configuration)\$(PlatformName)\</OutDir>
|
||||
<OutDir>..\..\..\generated\Windows\$(Configuration)\$(PlatformName)\</OutDir>
|
||||
<IntDir>$(OutDir)\dmd\</IntDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
<OutDir>..\..\generated\Windows\$(Configuration)\$(PlatformName)\</OutDir>
|
||||
<OutDir>..\..\..\generated\Windows\$(Configuration)\$(PlatformName)\</OutDir>
|
||||
<IntDir>$(OutDir)\dmd\</IntDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='RelWithAsserts|x64'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
<OutDir>..\..\generated\Windows\$(Configuration)\$(PlatformName)\</OutDir>
|
||||
<OutDir>..\..\..\generated\Windows\$(Configuration)\$(PlatformName)\</OutDir>
|
||||
<IntDir>$(OutDir)\dmd\</IntDir>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
|
@ -316,9 +316,9 @@
|
|||
<ClInclude Include="../dmd/**/*.h" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<CustomBuild Include="..\..\VERSION">
|
||||
<Message>Creating VERSION: $(_rdmdExe) ..\..\config.d $(OutDir) ..\..\VERSION</Message>
|
||||
<Command>$(_rdmdExe) ..\..\config.d $(OutDir) ..\..\VERSION</Command>
|
||||
<CustomBuild Include="..\..\..\VERSION">
|
||||
<Message>Creating VERSION: $(_rdmdExe) ..\..\..\config.d $(OutDir) ..\..\..\VERSION</Message>
|
||||
<Command>$(_rdmdExe) ..\..\..\config.d $(OutDir) ..\..\..\VERSION</Command>
|
||||
<Outputs>$(OutDir)VERSION;%(Outputs)</Outputs>
|
||||
</CustomBuild>
|
||||
</ItemGroup>
|
||||
|
|
|
@ -49,7 +49,7 @@ OS=windows
|
|||
D=dmd
|
||||
|
||||
# Generated files directory
|
||||
GEN = ..\generated
|
||||
GEN = ..\..\generated
|
||||
G = $(GEN)\$(OS)\$(BUILD)\$(MODEL)
|
||||
|
||||
##### Tools
|
||||
|
|
|
@ -17,7 +17,7 @@ OS=windows
|
|||
$(HOST_DC) -g -of$@ $<
|
||||
|
||||
D=dmd
|
||||
GEN = ..\generated
|
||||
GEN = ..\..\generated
|
||||
G = $(GEN)\$(OS)\$(BUILD)\$(MODEL)
|
||||
DEPENDENCIES=vcbuild\msvc-lib.exe $G
|
||||
|
||||
|
|
|
@ -48,31 +48,31 @@ ifeq ($(findstring win,$(OS)),win)
|
|||
PIC?=0
|
||||
|
||||
DRUNTIME_PATH=..\..\druntime
|
||||
PHOBOS_PATH=..\..\phobos
|
||||
PHOBOS_PATH=..\..\..\phobos
|
||||
export DFLAGS=-I$(DRUNTIME_PATH)\import -I$(PHOBOS_PATH)
|
||||
export LIB=$(PHOBOS_PATH)
|
||||
|
||||
# auto-tester might run the testsuite with a different $(MODEL) than DMD
|
||||
# has been compiled with. Hence we manually check which binary exists.
|
||||
# For windows the $(OS) during build is: `windows`
|
||||
ifeq (,$(wildcard ../generated/windows/$(BUILD)/64/dmd$(EXE)))
|
||||
ifeq (,$(wildcard ../../generated/windows/$(BUILD)/64/dmd$(EXE)))
|
||||
DMD_MODEL=32
|
||||
else
|
||||
DMD_MODEL=64
|
||||
endif
|
||||
export DMD=../generated/windows/$(BUILD)/$(DMD_MODEL)/dmd$(EXE)
|
||||
export DMD=../../generated/windows/$(BUILD)/$(DMD_MODEL)/dmd$(EXE)
|
||||
|
||||
else
|
||||
export EXE=
|
||||
|
||||
# auto-tester might run the testsuite with a different $(MODEL) than DMD
|
||||
# has been compiled with. Hence we manually check which binary exists.
|
||||
ifeq (,$(wildcard ../generated/$(OS)/$(BUILD)/64/dmd))
|
||||
ifeq (,$(wildcard ../../generated/$(OS)/$(BUILD)/64/dmd))
|
||||
DMD_MODEL=32
|
||||
else
|
||||
DMD_MODEL=64
|
||||
endif
|
||||
export DMD=../generated/$(OS)/$(BUILD)/$(DMD_MODEL)/dmd
|
||||
export DMD=../../generated/$(OS)/$(BUILD)/$(DMD_MODEL)/dmd
|
||||
|
||||
# default to PIC, use PIC=1/0 to en-/disable PIC.
|
||||
# Note that shared libraries and C files are always compiled with PIC.
|
||||
|
@ -86,7 +86,7 @@ else
|
|||
endif
|
||||
|
||||
DRUNTIME_PATH=../../druntime
|
||||
PHOBOS_PATH=../../phobos
|
||||
PHOBOS_PATH=../../../phobos
|
||||
# link against shared libraries (defaults to true on supported platforms, can be overridden w/ make SHARED=0)
|
||||
SHARED=$(if $(findstring $(OS),linux freebsd),1,)
|
||||
DFLAGS=-I$(DRUNTIME_PATH)/import -I$(PHOBOS_PATH) -L-L$(PHOBOS_PATH)/generated/$(OS)/$(BUILD)/$(MODEL)
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
"importPaths": [
|
||||
"compilable",
|
||||
"../../druntime/import",
|
||||
"../../phobos"
|
||||
"../../../phobos"
|
||||
],
|
||||
"libName": "VALUE_REMOVED_FOR_TEST",
|
||||
"libraryFiles": [
|
||||
|
|
|
@ -10,7 +10,7 @@ int main()
|
|||
|
||||
run("$DMD -m$MODEL -of$OUTPUT_BASE/a$EXE -defaultlib=libphobos2.so $EXTRA_FILES/test_shared.d");
|
||||
run("$OUTPUT_BASE/a$EXE", stdout, stderr, [
|
||||
"LD_LIBRARY_PATH" : "../../phobos/generated/"~OS~'/'~BUILD~'/'~MODEL
|
||||
"LD_LIBRARY_PATH" : "../../../phobos/generated/"~OS~'/'~BUILD~'/'~MODEL
|
||||
]);
|
||||
|
||||
return 0;
|
||||
|
|
|
@ -61,10 +61,10 @@ private struct CallbackHelper {
|
|||
|
||||
int main()
|
||||
{
|
||||
auto dmdParentDir = dirName(dirName(dirName(__FILE_FULL_PATH__)));
|
||||
auto dmdParentDir = dirName(dirName(dirName(dirName(__FILE_FULL_PATH__))));
|
||||
global.path = new Strings();
|
||||
global.path.push((dmdParentDir ~ "/phobos").ptr);
|
||||
global.path.push((dmdParentDir ~ "/druntime/import").ptr);
|
||||
global.path.push((dmdParentDir ~ "/dmd/druntime/import").ptr);
|
||||
|
||||
/* comment for error output in parsing & semantic */
|
||||
diagnosticHandler = (const ref Loc location,
|
||||
|
|
|
@ -529,7 +529,7 @@ string[string] getEnvironment()
|
|||
env["DSEP"] = `\\`;
|
||||
env["SEP"] = `\`;
|
||||
auto druntimePath = environment.get("DRUNTIME_PATH", testPath(`..\..\druntime`));
|
||||
auto phobosPath = environment.get("PHOBOS_PATH", testPath(`..\..\phobos`));
|
||||
auto phobosPath = environment.get("PHOBOS_PATH", testPath(`..\..\..\phobos`));
|
||||
env["DFLAGS"] = `-I"%s\import" -I"%s"`.format(druntimePath, phobosPath);
|
||||
env["LIB"] = phobosPath ~ ";" ~ environment.get("LIB");
|
||||
}
|
||||
|
@ -540,7 +540,7 @@ string[string] getEnvironment()
|
|||
env["DSEP"] = "/";
|
||||
env["SEP"] = "/";
|
||||
auto druntimePath = environment.get("DRUNTIME_PATH", testPath(`../../druntime`));
|
||||
auto phobosPath = environment.get("PHOBOS_PATH", testPath(`../../phobos`));
|
||||
auto phobosPath = environment.get("PHOBOS_PATH", testPath(`../../../phobos`));
|
||||
|
||||
// default to PIC, use PIC=1/0 to en-/disable PIC.
|
||||
// Note that shared libraries and C files are always compiled with PIC.
|
||||
|
|
|
@ -30,12 +30,13 @@ else version (SunOS)
|
|||
else
|
||||
static assert(0, "Unrecognized or unsupported OS.");
|
||||
|
||||
enum projectRootDir = __FILE_FULL_PATH__.dirName.buildNormalizedPath("..", "..");
|
||||
enum projectRootDir = __FILE_FULL_PATH__.dirName.buildNormalizedPath("..", "..", "..");
|
||||
enum generatedDir = projectRootDir.buildPath("generated");
|
||||
|
||||
enum dmdFilename = "dmd".setExtension(exeExtension);
|
||||
|
||||
alias testPath = path => projectRootDir.buildPath("test", path);
|
||||
enum compilerRootDir = __FILE_FULL_PATH__.dirName.buildNormalizedPath("..", "..");
|
||||
alias testPath = path => compilerRootDir.buildPath("test", path);
|
||||
|
||||
string build()
|
||||
{
|
||||
|
|
|
@ -239,7 +239,7 @@ void writeRunnerFile(Range)(Range moduleNames, string path, string filter)
|
|||
.joiner(",\n")
|
||||
.to!string;
|
||||
|
||||
const content = format!codeTemplate(imports, modules, format!`"%s"`(filter), projectRootDir);
|
||||
const content = format!codeTemplate(imports, modules, format!`"%s"`(filter), compilerRootDir);
|
||||
write(path, content);
|
||||
}
|
||||
|
||||
|
@ -269,7 +269,7 @@ string[] buildCmdArgs(string runnerPath, string outputPath, const string[] testF
|
|||
"-of" ~ outputPath,
|
||||
"-m" ~ model
|
||||
],
|
||||
testFiles.map!(f => relativePath(f, projectRootDir)),
|
||||
testFiles.map!(f => relativePath(f, compilerRootDir)),
|
||||
[ runnerPath ]
|
||||
).array;
|
||||
|
||||
|
@ -339,7 +339,7 @@ int main(string[] args)
|
|||
const flags = buildCmdArgs(runnerPath, outputPath, testFiles);
|
||||
write(cmdfilePath, flags.join("\n"));
|
||||
|
||||
const dmd = execute([ dmdPath, "@" ~ cmdfilePath ], null, Config.none, size_t.max, projectRootDir);
|
||||
const dmd = execute([ dmdPath, "@" ~ cmdfilePath ], null, Config.none, size_t.max, compilerRootDir);
|
||||
if (dmd.status)
|
||||
{
|
||||
enum msg = "Failed to compile the `unit` test executable! (exit code %d)
|
||||
|
|
|
@ -22,7 +22,7 @@ string[] defaultImportPaths()
|
|||
|
||||
enum dlangDir = __FILE_FULL_PATH__.dirName.buildNormalizedPath("..", "..", "..");
|
||||
enum druntimeDir = dlangDir.buildPath("druntime", "import");
|
||||
enum phobosDir = dlangDir.buildPath("phobos");
|
||||
enum phobosDir = dlangDir.buildPath("..", "phobos");
|
||||
|
||||
return [
|
||||
environment.get("DRUNTIME_PATH", druntimeDir),
|
||||
|
|
|
@ -5,9 +5,9 @@
|
|||
|
||||
QUIET:=
|
||||
|
||||
DMD_DIR=../dmd
|
||||
DMD_DIR=../compiler
|
||||
DUB=dub
|
||||
TOOLS_DIR=../tools
|
||||
TOOLS_DIR=../../tools
|
||||
|
||||
include $(DMD_DIR)/src/osmodel.mak
|
||||
|
||||
|
@ -25,8 +25,8 @@ ifneq ($(BUILD),release)
|
|||
endif
|
||||
endif
|
||||
|
||||
DMD=$(DMD_DIR)/generated/$(OS)/$(BUILD)/$(MODEL)/dmd
|
||||
INSTALL_DIR=../install
|
||||
DMD=$(DMD_DIR)/../generated/$(OS)/$(BUILD)/$(MODEL)/dmd
|
||||
INSTALL_DIR=../../install
|
||||
|
||||
# directory where the html files for the documentation are placed
|
||||
DOC_OUTPUT_DIR=doc
|
||||
|
@ -88,7 +88,7 @@ endif
|
|||
UTFLAGS:=-version=CoreUnittest -unittest -checkaction=context
|
||||
|
||||
# Set PHOBOS_DFLAGS (for linking against Phobos)
|
||||
PHOBOS_PATH=../phobos
|
||||
PHOBOS_PATH=../../phobos
|
||||
SHARED=$(if $(findstring $(OS),linux freebsd),1,)
|
||||
ROOT_DIR := $(shell pwd)
|
||||
PHOBOS_DFLAGS=-conf= $(MODEL_FLAG) -I$(ROOT_DIR)/import -I$(PHOBOS_PATH) -L-L$(PHOBOS_PATH)/generated/$(OS)/$(BUILD)/$(MODEL) $(PIC)
|
||||
|
@ -96,7 +96,7 @@ ifeq (1,$(SHARED))
|
|||
PHOBOS_DFLAGS+=-defaultlib=libphobos2.so -L-rpath=$(PHOBOS_PATH)/generated/$(OS)/$(BUILD)/$(MODEL)
|
||||
endif
|
||||
|
||||
ROOT_OF_THEM_ALL = generated
|
||||
ROOT_OF_THEM_ALL = ../generated
|
||||
ROOT = $(ROOT_OF_THEM_ALL)/$(OS)/$(BUILD)/$(MODEL)
|
||||
OBJDIR=obj/$(OS)/$(BUILD)/$(MODEL)
|
||||
DRUNTIME_BASE=druntime-$(OS)$(MODEL)
|
||||
|
|
|
@ -943,5 +943,3 @@ unittest
|
|||
assert(rol(C7_9, 1) == rol1(C7_9));
|
||||
assert(ror(C7_9, 1) == ror1(C7_9));
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -468,4 +468,3 @@ const(section)* getsectbynamefromheaderwithswap_64(
|
|||
const scope char* section,
|
||||
int fSwap
|
||||
);
|
||||
|
||||
|
|
|
@ -19,4 +19,3 @@ static if (__BSD_VISIBLE)
|
|||
{
|
||||
pure void* memmem(return scope const void* haystack, size_t haystacklen, scope const void* needle, size_t needlelen);
|
||||
}
|
||||
|
||||
|
|
|
@ -65,4 +65,3 @@ extern (D) pure @safe @nogc nothrow {
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -66,4 +66,3 @@ ssize_t flistxattr (int __fd, char *list, size_t size);
|
|||
int removexattr (const scope char *path, const scope char *name);
|
||||
int lremovexattr (const scope char *path, const scope char *name);
|
||||
int fremovexattr (int fd, const scope char *name);
|
||||
|
||||
|
|
|
@ -208,4 +208,3 @@ enum: int
|
|||
TIPC_DEST_DROPPABLE = 129,
|
||||
TIPC_CONN_TIMEOUT = 130,
|
||||
}
|
||||
|
||||
|
|
|
@ -608,4 +608,3 @@ pure unittest
|
|||
assert(!FD_ISSET(i, &fd));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1628,4 +1628,3 @@ version (Solaris)
|
|||
int addrtosymstr(uintptr_t, char*, int);
|
||||
int printstack(int);
|
||||
}
|
||||
|
||||
|
|
|
@ -113,4 +113,3 @@ struct pcadmin_t
|
|||
id_t pc_cid;
|
||||
caddr_t pc_cladmin;
|
||||
}
|
||||
|
||||
|
|
|
@ -50,4 +50,3 @@ void setprocset(ref procset_t psp, idop_t op, idtype_t ltype, id_t lid, idtype_t
|
|||
psp.p_ridtype = rtype;
|
||||
psp.p_rid = rid;
|
||||
}
|
||||
|
||||
|
|
|
@ -10,4 +10,3 @@ module core.sys.windows.cguid;
|
|||
version (Windows):
|
||||
|
||||
import core.sys.windows.basetyps;
|
||||
|
||||
|
|
|
@ -444,4 +444,3 @@ alias NTSTATUS function(ULONG, PULONG,
|
|||
PSECPKG_FUNCTION_TABLE *, PULONG) SpLsaModeInitializeFn;
|
||||
alias NTSTATUS function(ULONG, PULONG,
|
||||
PSECPKG_USER_FUNCTION_TABLE *, PULONG) SpUserModeInitializeFn;
|
||||
|
||||
|
|
|
@ -10,4 +10,3 @@ module core.sys.windows.olectlid;
|
|||
version (Windows):
|
||||
|
||||
import core.sys.windows.basetyps;
|
||||
|
||||
|
|
|
@ -16,4 +16,3 @@ import core.sys.windows.basetyps, core.sys.windows.w32api;
|
|||
|
||||
// I think this is just a helper macro for other win32 headers?
|
||||
//MACRO #define DEFINE_SHLGUID(n,l,w1,w2) DEFINE_GUID(n,l,w1,w2,0xC0,0,0,0,0,0,0,0x46)
|
||||
|
||||
|
|
|
@ -380,4 +380,3 @@ version (Unicode) {
|
|||
alias QUERY_SECURITY_PACKAGE_INFO_FN_A QUERY_SECURITY_PACKAGE_INFO_FN;
|
||||
alias INIT_SECURITY_INTERFACE_A INIT_SECURITY_INTERFACE;
|
||||
}
|
||||
|
||||
|
|
|
@ -25,4 +25,3 @@ __attribute__((destructor)) static void finalizer ()
|
|||
{
|
||||
rt_term();
|
||||
}
|
||||
|
||||
|
|
|
@ -10,4 +10,3 @@ custom_gc:
|
|||
$(DMD) -m$(MODEL) -conf= -Isrc -defaultlib=$(DRUNTIMELIB) test\init_fini\src\custom_gc.d
|
||||
custom_gc.exe
|
||||
del custom_gc.exe custom_gc.obj
|
||||
|
||||
|
|
|
@ -7,4 +7,3 @@ DRUNTIMELIB=druntime64.lib
|
|||
test:
|
||||
$(DMD) -m$(MODEL) -conf= -Isrc -defaultlib=$(DRUNTIMELIB) test\uuid\test.d uuid.lib
|
||||
del test.exe test.obj
|
||||
|
||||
|
|
|
@ -4,10 +4,10 @@
|
|||
# Ignored, only the default value is supported
|
||||
#MODEL=32omf
|
||||
|
||||
DMD_DIR=..\dmd
|
||||
DMD_DIR=..\compiler
|
||||
BUILD=release
|
||||
OS=windows
|
||||
DMD=$(DMD_DIR)\generated\$(OS)\$(BUILD)\32\dmd
|
||||
DMD=$(DMD_DIR)\..\generated\$(OS)\$(BUILD)\32\dmd
|
||||
|
||||
# Used for running MASM assembler on .asm files
|
||||
CC=dmc
|
||||
|
|
|
@ -9,13 +9,13 @@ MODEL=64
|
|||
# Otherwise set it explicitly, e.g., to `C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\bin\Hostx86\x86\cl.exe`.
|
||||
CC=cl
|
||||
|
||||
DMD_DIR=..\dmd
|
||||
DMD_DIR=..\compiler
|
||||
|
||||
BUILD=release
|
||||
OS=windows
|
||||
|
||||
# The D compiler used to build things
|
||||
DMD=$(DMD_DIR)\generated\$(OS)\$(BUILD)\$(MODEL)\dmd
|
||||
DMD=$(DMD_DIR)\..\generated\$(OS)\$(BUILD)\$(MODEL)\dmd
|
||||
|
||||
DOCDIR=doc
|
||||
IMPDIR=import
|
||||
|
|
52
dub.sdl
52
dub.sdl
|
@ -10,25 +10,27 @@ dependency ":frontend" version="*"
|
|||
subPackage {
|
||||
name "root"
|
||||
targetType "library"
|
||||
sourcePaths "src/dmd/common" "src/dmd/root"
|
||||
importPaths "compiler/src"
|
||||
sourcePaths "compiler/src/dmd/common" "compiler/src/dmd/root"
|
||||
}
|
||||
|
||||
subPackage {
|
||||
name "lexer"
|
||||
targetType "library"
|
||||
importPaths "compiler/src"
|
||||
sourcePaths
|
||||
|
||||
sourceFiles \
|
||||
"src/dmd/console.d" \
|
||||
"src/dmd/entity.d" \
|
||||
"src/dmd/errors.d" \
|
||||
"src/dmd/file_manager.d" \
|
||||
"src/dmd/globals.d" \
|
||||
"src/dmd/id.d" \
|
||||
"src/dmd/identifier.d" \
|
||||
"src/dmd/lexer.d" \
|
||||
"src/dmd/tokens.d" \
|
||||
"src/dmd/utils.d"
|
||||
"compiler/src/dmd/console.d" \
|
||||
"compiler/src/dmd/entity.d" \
|
||||
"compiler/src/dmd/errors.d" \
|
||||
"compiler/src/dmd/file_manager.d" \
|
||||
"compiler/src/dmd/globals.d" \
|
||||
"compiler/src/dmd/id.d" \
|
||||
"compiler/src/dmd/identifier.d" \
|
||||
"compiler/src/dmd/lexer.d" \
|
||||
"compiler/src/dmd/tokens.d" \
|
||||
"compiler/src/dmd/utils.d"
|
||||
|
||||
versions \
|
||||
"CallbackAPI" \
|
||||
|
@ -47,7 +49,7 @@ subPackage {
|
|||
preGenerateCommands `"%DUB_EXE%" --arch=%DUB_ARCH% --compiler="%DC%" --single "%DUB_PACKAGE_DIR%config.d" -- "%DUB_PACKAGE_DIR%generated/dub" "%DUB_PACKAGE_DIR%VERSION"` platform="windows"
|
||||
|
||||
stringImportPaths \
|
||||
"src/dmd/res" \
|
||||
"compiler/src/dmd/res" \
|
||||
"generated/dub"
|
||||
|
||||
dependency "dmd:root" version="*"
|
||||
|
@ -56,14 +58,15 @@ subPackage {
|
|||
subPackage {
|
||||
name "parser"
|
||||
targetType "library"
|
||||
importPaths "compiler/src"
|
||||
sourcePaths
|
||||
|
||||
sourceFiles \
|
||||
"src/dmd/astbase.d" \
|
||||
"src/dmd/parse.d" \
|
||||
"src/dmd/transitivevisitor.d" \
|
||||
"src/dmd/permissivevisitor.d" \
|
||||
"src/dmd/strictvisitor.d"
|
||||
"compiler/src/dmd/astbase.d" \
|
||||
"compiler/src/dmd/parse.d" \
|
||||
"compiler/src/dmd/transitivevisitor.d" \
|
||||
"compiler/src/dmd/permissivevisitor.d" \
|
||||
"compiler/src/dmd/strictvisitor.d"
|
||||
|
||||
versions "CallbackAPI"
|
||||
|
||||
|
@ -73,8 +76,9 @@ subPackage {
|
|||
subPackage {
|
||||
name "frontend"
|
||||
targetType "library"
|
||||
sourcePaths "src/dmd"
|
||||
stringImportPaths "src/dmd/res"
|
||||
importPaths "compiler/src"
|
||||
sourcePaths "compiler/src/dmd"
|
||||
stringImportPaths "compiler/src/dmd/res"
|
||||
|
||||
versions \
|
||||
"NoBackend" \
|
||||
|
@ -83,10 +87,10 @@ subPackage {
|
|||
"MARS" \
|
||||
"CallbackAPI"
|
||||
|
||||
excludedSourceFiles "src/dmd/backend/*"
|
||||
excludedSourceFiles "src/dmd/root/*"
|
||||
excludedSourceFiles "src/dmd/common/*"
|
||||
excludedSourceFiles "src/dmd/{\
|
||||
excludedSourceFiles "compiler/src/dmd/backend/*"
|
||||
excludedSourceFiles "compiler/src/dmd/root/*"
|
||||
excludedSourceFiles "compiler/src/dmd/common/*"
|
||||
excludedSourceFiles "compiler/src/dmd/{\
|
||||
astbase,\
|
||||
console,\
|
||||
entity,\
|
||||
|
@ -104,7 +108,7 @@ subPackage {
|
|||
utf,\
|
||||
utils\
|
||||
}.d"
|
||||
excludedSourceFiles "src/dmd/{\
|
||||
excludedSourceFiles "compiler/src/dmd/{\
|
||||
dmsc,\
|
||||
e2ir,\
|
||||
eh,\
|
||||
|
|
35
posix.mak
35
posix.mak
|
@ -1,18 +1,20 @@
|
|||
INSTALL_DIR=$(PWD)/../install
|
||||
ECTAGS_LANGS = Make,C,C++,D,Sh
|
||||
ECTAGS_FILES = src/dmd/*.[chd] src/dmd/backend/*.[chd] src/dmd/root/*.[chd]
|
||||
ECTAGS_FILES = compiler/dmd/*.[chd] compiler/dmd/backend/*.[chd] compiler/dmd/root/*.[chd]
|
||||
|
||||
.PHONY: all clean test install auto-tester-build auto-tester-test toolchain-info
|
||||
|
||||
all:
|
||||
$(QUIET)$(MAKE) -C src -f posix.mak all
|
||||
$(QUIET)$(MAKE) -C compiler/src -f posix.mak all
|
||||
$(QUIET)$(MAKE) -C druntime -f posix.mak target
|
||||
|
||||
ifneq (,$(findstring Darwin_64_32, $(PWD)))
|
||||
auto-tester-build:
|
||||
echo "Darwin_64_32_disabled"
|
||||
else
|
||||
auto-tester-build:
|
||||
$(QUIET)$(MAKE) -C src -f posix.mak auto-tester-build ENABLE_RELEASE=1 ENABLE_ASSERTS=1
|
||||
$(QUIET)$(MAKE) -C compiler/src -f posix.mak auto-tester-build ENABLE_RELEASE=1 ENABLE_ASSERTS=1
|
||||
$(QUIET)$(MAKE) -C druntime -f posix.mak auto-tester-build ENABLE_RELEASE=1 ENABLE_ASSERTS=1
|
||||
endif
|
||||
|
||||
ifneq (,$(findstring Darwin_64_32, $(PWD)))
|
||||
|
@ -24,28 +26,29 @@ auto-tester-test: test
|
|||
else # POSIX
|
||||
# Like test, but without runnable_cxx
|
||||
auto-tester-test:
|
||||
$(QUIET)$(MAKE) -C src -f posix.mak auto-tester-test
|
||||
$(QUIET)$(MAKE) -C test -f Makefile auto-tester-test
|
||||
$(QUIET)$(MAKE) -C compiler/src -f posix.mak auto-tester-test
|
||||
$(QUIET)$(MAKE) -C compiler/test -f Makefile auto-tester-test
|
||||
$(QUIET)$(MAKE) -C druntime -f posix.mak auto-tester-test
|
||||
endif
|
||||
endif
|
||||
|
||||
buildkite-test: test
|
||||
|
||||
toolchain-info:
|
||||
$(QUIET)$(MAKE) -C src -f posix.mak toolchain-info
|
||||
$(QUIET)$(MAKE) -C compiler/src -f posix.mak toolchain-info
|
||||
|
||||
clean:
|
||||
$(QUIET)$(MAKE) -C src -f posix.mak clean
|
||||
$(QUIET)$(MAKE) -C test -f Makefile clean
|
||||
$(QUIET)$(MAKE) -C compiler/src -f posix.mak clean
|
||||
$(QUIET)$(MAKE) -C compiler/test -f Makefile clean
|
||||
$(RM) tags
|
||||
|
||||
test:
|
||||
$(QUIET)$(MAKE) -C src -f posix.mak unittest
|
||||
$(QUIET)$(MAKE) -C src -f posix.mak dmd
|
||||
$(QUIET)$(MAKE) -C test -f Makefile
|
||||
$(QUIET)$(MAKE) -C compiler/src -f posix.mak unittest
|
||||
$(QUIET)$(MAKE) -C compiler/src -f posix.mak dmd
|
||||
$(QUIET)$(MAKE) -C compiler/test -f Makefile
|
||||
|
||||
html:
|
||||
$(QUIET)$(MAKE) -C src -f posix.mak html
|
||||
$(QUIET)$(MAKE) -C compiler/src -f posix.mak html
|
||||
|
||||
# Creates Exuberant Ctags tags file
|
||||
tags: posix.mak $(ECTAGS_FILES)
|
||||
|
@ -57,10 +60,10 @@ install:
|
|||
echo "Darwin_64_32_disabled"
|
||||
else
|
||||
install: all
|
||||
$(MAKE) INSTALL_DIR=$(INSTALL_DIR) -C src -f posix.mak install
|
||||
cp -r samples $(INSTALL_DIR)
|
||||
$(MAKE) INSTALL_DIR=$(INSTALL_DIR) -C compiler/src -f posix.mak install
|
||||
cp -r compiler/samples $(INSTALL_DIR)
|
||||
mkdir -p $(INSTALL_DIR)/man
|
||||
cp -r docs/man/* $(INSTALL_DIR)/man/
|
||||
cp -r compiler/docs/man/* $(INSTALL_DIR)/man/
|
||||
endif
|
||||
|
||||
# Checks that all files have been committed and no temporary, untracked files exist.
|
||||
|
@ -74,7 +77,7 @@ check-clean-git:
|
|||
fi
|
||||
|
||||
style:
|
||||
$(QUIET)$(MAKE) -C src -f posix.mak style
|
||||
$(QUIET)$(MAKE) -C compiler/src -f posix.mak style
|
||||
|
||||
.DELETE_ON_ERROR: # GNU Make directive (delete output files on error)
|
||||
|
||||
|
|
3
src/README.md
Normal file
3
src/README.md
Normal file
|
@ -0,0 +1,3 @@
|
|||
# Backwards-compatibility stub directory
|
||||
|
||||
This directory holds backwards compatibility files for scripts written before Druntime was merged into this directory.
|
1
src/dmd/backend/dvec.d
Normal file
1
src/dmd/backend/dvec.d
Normal file
|
@ -0,0 +1 @@
|
|||
// Dummy file for backwards compatibility with old ae.sys.d-based D build tools.
|
1
src/dmd/mars.d
Normal file
1
src/dmd/mars.d
Normal file
|
@ -0,0 +1 @@
|
|||
// Dummy file for backwards compatibility with old ae.sys.d-based D build tools.
|
1
src/osmodel.mak
Normal file
1
src/osmodel.mak
Normal file
|
@ -0,0 +1 @@
|
|||
include $(dir $(lastword $(MAKEFILE_LIST)))../compiler/src/osmodel.mak
|
38
src/posix.mak
Normal file
38
src/posix.mak
Normal file
|
@ -0,0 +1,38 @@
|
|||
# Proxy Makefile for backwards compatibility after move to /compiler/src
|
||||
|
||||
|
||||
all:
|
||||
$(QUIET)$(MAKE) -C ../compiler/src -f posix.mak $@
|
||||
|
||||
auto-tester-build:
|
||||
$(QUIET)$(MAKE) -C ../compiler/src -f posix.mak $@
|
||||
|
||||
auto-tester-test:
|
||||
$(QUIET)$(MAKE) -C ../compiler/src -f posix.mak $@
|
||||
|
||||
buildkite-test:
|
||||
$(QUIET)$(MAKE) -C ../compiler/src -f posix.mak $@
|
||||
|
||||
toolchain-info:
|
||||
$(QUIET)$(MAKE) -C ../compiler/src -f posix.mak $@
|
||||
|
||||
clean:
|
||||
$(QUIET)$(MAKE) -C ../compiler/src -f posix.mak $@
|
||||
|
||||
test:
|
||||
$(QUIET)$(MAKE) -C ../compiler/src -f posix.mak $@
|
||||
|
||||
html:
|
||||
$(QUIET)$(MAKE) -C ../compiler/src -f posix.mak $@
|
||||
|
||||
tags:
|
||||
$(QUIET)$(MAKE) -C ../compiler/src -f posix.mak $@
|
||||
|
||||
install:
|
||||
$(QUIET)$(MAKE) -C ../compiler/src -f posix.mak $@
|
||||
|
||||
check-clean-git:
|
||||
$(QUIET)$(MAKE) -C ../compiler/src -f posix.mak $@
|
||||
|
||||
style:
|
||||
$(QUIET)$(MAKE) -C ../compiler/src -f posix.mak $@
|
89
src/win32.mak
Normal file
89
src/win32.mak
Normal file
|
@ -0,0 +1,89 @@
|
|||
# Proxy Makefile for backwards compatibility after move to /compiler/src
|
||||
|
||||
############################### Configuration ################################
|
||||
|
||||
OS=windows
|
||||
BUILD=release
|
||||
MODEL=32
|
||||
HOST_DC=dmd
|
||||
MAKE=make
|
||||
GEN=..\..\generated
|
||||
G=$(GEN)\$(OS)\$(BUILD)\$(MODEL)
|
||||
|
||||
MAKE_WIN32=$(MAKE) -f win32.mak \
|
||||
"OS=$(OS)" \
|
||||
"BUILD=$(BUILD)" \
|
||||
"MODEL=$(MODEL)" \
|
||||
"HOST_DMD=$(HOST_DMD)" \
|
||||
"HOST_DC=$(HOST_DC)" \
|
||||
"MAKE=$(MAKE)" \
|
||||
"VERBOSE=$(VERBOSE)" \
|
||||
"ENABLE_RELEASE=$(ENABLE_RELEASE)" \
|
||||
"ENABLE_DEBUG=$(ENABLE_DEBUG)" \
|
||||
"ENABLE_ASSERTS=$(ENABLE_ASSERTS)" \
|
||||
"ENABLE_LTO=$(ENABLE_LTO)" \
|
||||
"ENABLE_UNITTEST=$(ENABLE_UNITTEST)" \
|
||||
"ENABLE_PROFILE=$(ENABLE_PROFILE)" \
|
||||
"ENABLE_COVERAGE=$(ENABLE_COVERAGE)" \
|
||||
"DFLAGS=$(DFLAGS)" \
|
||||
"GEN=$(GEN)" \
|
||||
"G=$G"
|
||||
|
||||
################################## Targets ###################################
|
||||
|
||||
defaulttarget :
|
||||
cd ..\compiler\src
|
||||
$(MAKE_WIN32) $@
|
||||
cd ..\..\src
|
||||
release :
|
||||
cd ..\compiler\src
|
||||
$(MAKE_WIN32) $@
|
||||
cd ..\..\src
|
||||
trace :
|
||||
cd ..\compiler\src
|
||||
$(MAKE_WIN32) $@
|
||||
cd ..\..\src
|
||||
clean :
|
||||
cd ..\compiler\src
|
||||
$(MAKE_WIN32) $@
|
||||
cd ..\..\src
|
||||
install :
|
||||
cd ..\compiler\src
|
||||
$(MAKE_WIN32) $@
|
||||
cd ..\..\src
|
||||
install-clean :
|
||||
cd ..\compiler\src
|
||||
$(MAKE_WIN32) $@
|
||||
cd ..\..\src
|
||||
zip :
|
||||
cd ..\compiler\src
|
||||
$(MAKE_WIN32) $@
|
||||
cd ..\..\src
|
||||
dmd :
|
||||
cd ..\compiler\src
|
||||
$(MAKE_WIN32) $@
|
||||
cd ..\..\src
|
||||
debdmd :
|
||||
cd ..\compiler\src
|
||||
$(MAKE_WIN32) $@
|
||||
cd ..\..\src
|
||||
reldmd :
|
||||
cd ..\compiler\src
|
||||
$(MAKE_WIN32) $@
|
||||
cd ..\..\src
|
||||
reldmd-asserts :
|
||||
cd ..\compiler\src
|
||||
$(MAKE_WIN32) $@
|
||||
cd ..\..\src
|
||||
unittest :
|
||||
cd ..\compiler\src
|
||||
$(MAKE_WIN32) $@
|
||||
cd ..\..\src
|
||||
detab :
|
||||
cd ..\compiler\src
|
||||
$(MAKE_WIN32) $@
|
||||
cd ..\..\src
|
||||
tolf :
|
||||
cd ..\compiler\src
|
||||
$(MAKE_WIN32) $@
|
||||
cd ..\..\src
|
89
src/win64.mak
Normal file
89
src/win64.mak
Normal file
|
@ -0,0 +1,89 @@
|
|||
# Proxy Makefile for backwards compatibility after move to /compiler/src
|
||||
|
||||
############################### Configuration ################################
|
||||
|
||||
OS=windows
|
||||
BUILD=release
|
||||
MODEL=64
|
||||
HOST_DC=dmd
|
||||
MAKE=make
|
||||
GEN=..\..\generated
|
||||
G=$(GEN)\$(OS)\$(BUILD)\$(MODEL)
|
||||
|
||||
MAKE_WIN32=$(MAKE) -f win64.mak \
|
||||
"OS=$(OS)" \
|
||||
"BUILD=$(BUILD)" \
|
||||
"MODEL=$(MODEL)" \
|
||||
"HOST_DMD=$(HOST_DMD)" \
|
||||
"HOST_DC=$(HOST_DC)" \
|
||||
"MAKE=$(MAKE)" \
|
||||
"VERBOSE=$(VERBOSE)" \
|
||||
"ENABLE_RELEASE=$(ENABLE_RELEASE)" \
|
||||
"ENABLE_DEBUG=$(ENABLE_DEBUG)" \
|
||||
"ENABLE_ASSERTS=$(ENABLE_ASSERTS)" \
|
||||
"ENABLE_LTO=$(ENABLE_LTO)" \
|
||||
"ENABLE_UNITTEST=$(ENABLE_UNITTEST)" \
|
||||
"ENABLE_PROFILE=$(ENABLE_PROFILE)" \
|
||||
"ENABLE_COVERAGE=$(ENABLE_COVERAGE)" \
|
||||
"DFLAGS=$(DFLAGS)" \
|
||||
"GEN=$(GEN)" \
|
||||
"G=$G"
|
||||
|
||||
################################## Targets ###################################
|
||||
|
||||
defaulttarget :
|
||||
cd ..\compiler\src
|
||||
$(MAKE_WIN32) $@
|
||||
cd ..\..\src
|
||||
release :
|
||||
cd ..\compiler\src
|
||||
$(MAKE_WIN32) $@
|
||||
cd ..\..\src
|
||||
trace :
|
||||
cd ..\compiler\src
|
||||
$(MAKE_WIN32) $@
|
||||
cd ..\..\src
|
||||
clean :
|
||||
cd ..\compiler\src
|
||||
$(MAKE_WIN32) $@
|
||||
cd ..\..\src
|
||||
install :
|
||||
cd ..\compiler\src
|
||||
$(MAKE_WIN32) $@
|
||||
cd ..\..\src
|
||||
install-clean :
|
||||
cd ..\compiler\src
|
||||
$(MAKE_WIN32) $@
|
||||
cd ..\..\src
|
||||
zip :
|
||||
cd ..\compiler\src
|
||||
$(MAKE_WIN32) $@
|
||||
cd ..\..\src
|
||||
dmd :
|
||||
cd ..\compiler\src
|
||||
$(MAKE_WIN32) $@
|
||||
cd ..\..\src
|
||||
debdmd :
|
||||
cd ..\compiler\src
|
||||
$(MAKE_WIN32) $@
|
||||
cd ..\..\src
|
||||
reldmd :
|
||||
cd ..\compiler\src
|
||||
$(MAKE_WIN32) $@
|
||||
cd ..\..\src
|
||||
reldmd-asserts :
|
||||
cd ..\compiler\src
|
||||
$(MAKE_WIN32) $@
|
||||
cd ..\..\src
|
||||
unittest :
|
||||
cd ..\compiler\src
|
||||
$(MAKE_WIN32) $@
|
||||
cd ..\..\src
|
||||
detab :
|
||||
cd ..\compiler\src
|
||||
$(MAKE_WIN32) $@
|
||||
cd ..\..\src
|
||||
tolf :
|
||||
cd ..\compiler\src
|
||||
$(MAKE_WIN32) $@
|
||||
cd ..\..\src
|
18
win32.mak
18
win32.mak
|
@ -1,20 +1,26 @@
|
|||
MAKE=make
|
||||
|
||||
defaulttarget:
|
||||
cd src
|
||||
cd compiler\src
|
||||
$(MAKE) -f win32.mak
|
||||
cd ..
|
||||
cd ..\..
|
||||
|
||||
auto-tester-build:
|
||||
cd src
|
||||
cd compiler\src
|
||||
$(MAKE) -f win32.mak auto-tester-build
|
||||
cd ..\..
|
||||
cd druntime
|
||||
$(MAKE) -f win32.mak auto-tester-build
|
||||
cd ..
|
||||
|
||||
auto-tester-test:
|
||||
cd test
|
||||
cd compiler\test
|
||||
$(MAKE)
|
||||
cd ..\..
|
||||
cd druntime
|
||||
$(MAKE) -f win32.mak auto-tester-test
|
||||
cd ..
|
||||
cd samples
|
||||
cd compiler\samples
|
||||
gmake -f win32.mak DMD=..\src\dmd.exe MODEL=$(MODEL) "LIB=..\..\phobos;$(LIB)" \
|
||||
"DFLAGS=-I..\..\druntime\import -I..\..\phobos -m$(MODEL)"
|
||||
cd ..
|
||||
cd ..\..
|
||||
|
|
|
@ -5,5 +5,5 @@
|
|||
MAKE=make
|
||||
|
||||
all:
|
||||
cd src
|
||||
cd compiler\src
|
||||
$(MAKE) -f win64.mak
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue