dmd.mars: Add method to predefine FreeBSD_12 at compile-time.

This allows to statically set which version of FreeBSD to compile for
using DFLAGS, choices are FreeBSD 10, 11 or 12. If unset, the default is
to use the same version as the host, or fallback to version 11 if
compiling on a different host, or using an old D compiler to build DMD.

To be decided is whether there should be a dynamic way of detecting the
FreeBSD OS version as well, such as by using getosreldate().
This commit is contained in:
Iain Buclaw 2020-11-19 17:43:05 +01:00 committed by The Dlang Bot
parent 79413aba10
commit 646d83480f
4 changed files with 28 additions and 7 deletions

View file

@ -71,6 +71,7 @@ task:
timeout_in: 60m
environment:
OS_NAME: freebsd
CI_DFLAGS: -version=TARGET_FREEBSD12
install_bash_script: pkg install -y bash
<< : *COMMON_STEPS_TEMPLATE
@ -84,5 +85,6 @@ task:
environment:
OS_NAME: freebsd
HOST_DC: dmd-2.079.0
CI_DFLAGS: -version=TARGET_FREEBSD11
install_bash_script: pkg install -y bash
<< : *COMMON_STEPS_TEMPLATE