浏览代码

New second-phase toolchain for non-compiled spdlog

default_compile_flags
vector-of-bool 4 年前
父节点
当前提交
c145426c5d
共有 9 个文件被更改,包括 107 次插入9 次删除
  1. +17
    -3
      Makefile
  2. +1
    -1
      azure-pipelines.yml
  3. +11
    -3
      tools/ci.py
  4. +0
    -1
      tools/freebsd-gcc-9.jsonc
  5. +20
    -0
      tools/freebsd-gcc-9.next.jsonc
  6. +19
    -0
      tools/gcc-9-static.jsonc
  7. +3
    -1
      tools/gcc-9.jsonc
  8. +23
    -0
      tools/gcc-9.next.jsonc
  9. +13
    -0
      tools/msvc.next.jsonc

+ 17
- 3
Makefile 查看文件

@@ -8,6 +8,10 @@ _invalid:
echo "Specify a target name to execute"
exit 1

clean:
rm -f -r -- $(shell find -name __pycache__ -type d)
rm -f -r -- _build/ _prebuilt/

docs:
sphinx-build -b html \
docs \
@@ -31,8 +35,17 @@ docs-sync-server:
--reload-delay 300 \
--watch **/*.html

macos-ci: nix-ci
linux-ci: nix-ci
macos-ci:
python3 -u tools/ci.py \
-B download \
-T tools/gcc-9.jsonc \
-T2 tools/gcc-9.next.jsonc \

linux-ci:
python3 -u tools/ci.py \
-B download \
-T tools/gcc-9.jsonc \
-T2 tools/gcc-9-static.jsonc

nix-ci:
python3 -u tools/ci.py \
@@ -46,7 +59,8 @@ vagrant-freebsd-ci:
cd /vagrant && \
python3.7 tools/ci.py \
-B download \
-T tools/freebsd-gcc-9.jsonc \
-T tools/freebsd-gcc-9.jsonc \
-T2 tools/freebsd-gcc-9.next.jsonc \
'
vagrant scp freebsd11:/vagrant/_build/dds _build/dds-freebsd-x64
vagrant halt

+ 1
- 1
azure-pipelines.yml 查看文件

@@ -12,7 +12,7 @@ jobs:
echo Executing Build and Tests
reg add HKLM\SYSTEM\CurrentControlSet\Control\FileSystem /v LongPathsEnabled /t REG_DWORD /d 1 /f || exit 1
python -m pip install pytest pytest-xdist || exit 1
python -u tools/ci.py -B download -T tools\msvc.jsonc || exit 1
python -u tools/ci.py -B download -T tools\msvc.jsonc -T2 tools\msvc.next.jsonc || exit 1
displayName: Full CI
- publish: _build/dds.exe
artifact: DDS Executable - Windows VS2019

+ 11
- 3
tools/ci.py 查看文件

@@ -15,6 +15,7 @@ from dds_ci import paths, proc

class CIOptions(NamedTuple):
toolchain: str
toolchain_2: str


def _do_bootstrap_build(opts: CIOptions) -> None:
@@ -71,13 +72,19 @@ def main(argv: Sequence[str]) -> int:
help='The toolchain to use for the CI process',
required=True,
)
parser.add_argument(
'--toolchain-2',
'-T2',
help='The toolchain to use for the self-build',
required=True,
)
parser.add_argument(
'--build-only',
action='store_true',
help='Only build the `dds` executable. Skip second-phase and tests.')
args = parser.parse_args(argv)

opts = CIOptions(toolchain=args.toolchain)
opts = CIOptions(toolchain=args.toolchain, toolchain_2=args.toolchain_2)

if args.bootstrap_with == 'build':
_do_bootstrap_build(opts)
@@ -113,11 +120,12 @@ def main(argv: Sequence[str]) -> int:

print('Bootstrapping myself:')
new_cat_path = paths.BUILD_DIR / 'catalog.db'
new_repo_dir = paths.BUILD_DIR / 'ci-repo'
self_build(
paths.CUR_BUILT_DDS,
toolchain=opts.toolchain,
toolchain=opts.toolchain_2,
cat_path=new_cat_path,
dds_flags=[f'--repo-dir={ci_repo_dir}'])
dds_flags=[f'--repo-dir={new_repo_dir}'])
print('Bootstrap test PASSED!')

return pytest.main([

+ 0
- 1
tools/freebsd-gcc-9.jsonc 查看文件

@@ -3,7 +3,6 @@
"compiler_id": "gnu",
"c_compiler": "gcc9",
"cxx_compiler": "g++9",
// "cxx_version": "c++17",
"flags": [
"-DSPDLOG_COMPILED_LIB", // Required to use a compiled spdlog
"-Werror=return-type",

+ 20
- 0
tools/freebsd-gcc-9.next.jsonc 查看文件

@@ -0,0 +1,20 @@
{
"$schema": "../res/toolchain-schema.json",
"compiler_id": "gnu",
"c_compiler": "gcc9",
"cxx_compiler": "g++9",
"flags": [
"-Werror=return-type",
],
"cxx_flags": [
"-fconcepts",
"-std=c++2a",
],
"link_flags": [
"-static-libgcc",
"-static-libstdc++",
],
// "debug": true,
"optimize": true,
"compiler_launcher": "ccache"
}

+ 19
- 0
tools/gcc-9-static.jsonc 查看文件

@@ -0,0 +1,19 @@
{
"$schema": "../res/toolchain-schema.json",
"compiler_id": "gnu",
"c_compiler": "gcc-9",
"cxx_compiler": "g++-9",
"flags": [
"-Werror=return-type",
],
"cxx_flags": [
"-fconcepts",
"-std=c++2a",
],
"link_flags": [
"-static",
],
// "debug": true,
"optimize": true,
"compiler_launcher": "ccache"
}

+ 3
- 1
tools/gcc-9.jsonc 查看文件

@@ -3,10 +3,10 @@
"compiler_id": "gnu",
"c_compiler": "gcc-9",
"cxx_compiler": "g++-9",
// "cxx_version": "c++17",
"flags": [
"-DSPDLOG_COMPILED_LIB", // Required to use a compiled spdlog
"-Werror=return-type",
// "-fsanitize=address",
],
"cxx_flags": [
"-fconcepts",
@@ -15,6 +15,8 @@
"link_flags": [
"-static-libgcc",
"-static-libstdc++"
// "-fsanitize=address",
// "-fuse-ld=lld",
],
// "debug": true,
"optimize": true,

+ 23
- 0
tools/gcc-9.next.jsonc 查看文件

@@ -0,0 +1,23 @@
{
"$schema": "../res/toolchain-schema.json",
"compiler_id": "gnu",
"c_compiler": "gcc-9",
"cxx_compiler": "g++-9",
"flags": [
"-Werror=return-type",
"-fsanitize=address",
],
"cxx_flags": [
"-fconcepts",
"-std=c++2a",
],
"link_flags": [
// "-static-libgcc",
// "-static-libstdc++"
"-fsanitize=address",
"-fuse-ld=lld",
],
"debug": true,
// "optimize": true,
"compiler_launcher": "ccache"
}

+ 13
- 0
tools/msvc.next.jsonc 查看文件

@@ -0,0 +1,13 @@
{
"$schema": "../res/toolchain-schema.json",
"compiler_id": "msvc",
"flags": [
"/Zc:preprocessor", // Required for range-v3
"/std:c++latest",
],
"link_flags": [
"rpcrt4.lib",
],
// "debug": true,
"optimize": true
}

正在加载...
取消
保存