Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
26 changes: 23 additions & 3 deletions .github/workflows/build-and-test-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,12 @@
# tests, and uninstrumented, for the test cache key) and then runs one test
# leg per configuration; a test leg waits only on its own toolchain's builds:
#
# prepare ─┬─► linux-gcc-debug: build, hash ─► Test ×2 ─┬─► publish (on failure)
# └─► linux-i686-gcc-debug: build, hash ─► Test ×2 ─┴─► coverage
# prepare ─┬─► linux-gcc-debug: build, hash ─► Test ×2 ─┬─► publish
# ├─► linux-i686-gcc-debug: build, hash ─► Test ×2 ─┤ (on failure)
# ├─► linux-gcc-macos-like-debug: build, hash ─► Test ×2 ─┤
# ├─► linux-gcc-windows-like-debug: build, hash ─► Test ×2 ─┤
# ├─► linux-gcc-variants-debug: build, hash ─► Test ×2 ─┤
# └─► linux-gcc-legacy-debug: build, hash ─► Test ×2 ─┴─► coverage
# bench (pull requests only; independent)
#
# The prepare job computes the shared run timestamp and test-input hash that
Expand Down Expand Up @@ -135,6 +139,22 @@ jobs:
build_dir: build/gcc-i686
base: gcc-i686
configs: '["edg_x86_32", "edg_x86_32_cp"]'
- preset: linux-gcc-macos-like-debug
build_dir: build/gcc-macos-like
base: gcc
configs: '["edg_macos_like", "edg_macos_like_cp"]'
- preset: linux-gcc-windows-like-debug
build_dir: build/gcc-windows-like
base: gcc
configs: '["edg_windows_like", "edg_windows_like_cp"]'
- preset: linux-gcc-variants-debug
build_dir: build/gcc-variants
base: gcc
configs: '["edg_variants", "edg_variants_cp"]'
- preset: linux-gcc-legacy-debug
build_dir: build/gcc-legacy
base: gcc
configs: '["edg_legacy", "edg_legacy_cp"]'
uses: ./.github/workflows/ci-toolchain.yml
with:
preset: ${{ matrix.preset }}
Expand Down Expand Up @@ -308,7 +328,7 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 120
container:
image: ghcr.io/edgcpp/ci-runner@sha256:da140ca90c420977f187279d7939fe0c7cb3c4b656e5ab2dc0f6b9ac2a43a255
image: ghcr.io/edgcpp/ci-runner@sha256:565d7b6581912008ca91c5dbc940280c6e28a02c8cb6487d88ee5f0d7e8c51d7
defaults:
run:
shell: edg-container-exec "bash -eo pipefail {0}"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci-toolchain.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 120
container:
image: &ci-runner-image ghcr.io/edgcpp/ci-runner@sha256:da140ca90c420977f187279d7939fe0c7cb3c4b656e5ab2dc0f6b9ac2a43a255
image: &ci-runner-image ghcr.io/edgcpp/ci-runner@sha256:565d7b6581912008ca91c5dbc940280c6e28a02c8cb6487d88ee5f0d7e8c51d7
defaults: &container-defaults
run:
shell: edg-container-exec "bash -eo pipefail {0}"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/promote-test-cache.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ jobs:
# The test legs' image, so that actions/cache picks the same compression
# (part of an entry's version) and the test legs can restore the entry.
container:
image: ghcr.io/edgcpp/ci-runner@sha256:da140ca90c420977f187279d7939fe0c7cb3c4b656e5ab2dc0f6b9ac2a43a255
image: ghcr.io/edgcpp/ci-runner@sha256:565d7b6581912008ca91c5dbc940280c6e28a02c8cb6487d88ee5f0d7e8c51d7
strategy:
fail-fast: false
matrix:
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/strict-build-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 120
container:
image: ghcr.io/edgcpp/ci-runner@sha256:da140ca90c420977f187279d7939fe0c7cb3c4b656e5ab2dc0f6b9ac2a43a255
image: ghcr.io/edgcpp/ci-runner@sha256:565d7b6581912008ca91c5dbc940280c6e28a02c8cb6487d88ee5f0d7e8c51d7
defaults:
run:
shell: edg-container-exec "bash -eo pipefail {0}"
Expand All @@ -185,7 +185,7 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 120
container:
image: ghcr.io/edgcpp/ci-runner@sha256:da140ca90c420977f187279d7939fe0c7cb3c4b656e5ab2dc0f6b9ac2a43a255
image: ghcr.io/edgcpp/ci-runner@sha256:565d7b6581912008ca91c5dbc940280c6e28a02c8cb6487d88ee5f0d7e8c51d7
defaults:
run:
shell: edg-container-exec "bash -eo pipefail {0}"
Expand All @@ -212,7 +212,7 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 120
container:
image: ghcr.io/edgcpp/ci-runner@sha256:da140ca90c420977f187279d7939fe0c7cb3c4b656e5ab2dc0f6b9ac2a43a255
image: ghcr.io/edgcpp/ci-runner@sha256:565d7b6581912008ca91c5dbc940280c6e28a02c8cb6487d88ee5f0d7e8c51d7
defaults:
run:
shell: edg-container-exec "bash -eo pipefail {0}"
Expand All @@ -239,7 +239,7 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 120
container:
image: ghcr.io/edgcpp/ci-runner@sha256:da140ca90c420977f187279d7939fe0c7cb3c4b656e5ab2dc0f6b9ac2a43a255
image: ghcr.io/edgcpp/ci-runner@sha256:565d7b6581912008ca91c5dbc940280c6e28a02c8cb6487d88ee5f0d7e8c51d7
defaults:
run:
shell: edg-container-exec "bash -eo pipefail {0}"
Expand Down
60 changes: 60 additions & 0 deletions CMakePresets.json
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,66 @@
"CXX": "g++"
}
},
{
"name": "linux-gcc-macos-like-debug",
"inherits": "linux-common",
"displayName": "Linux (GCC) macOS-like Build Config - DEBUG",
"description": "CI coverage build: Linux build using GCC with the macOS (arm64) host and feature choices",
"binaryDir": "${sourceDir}/build/gcc-macos-like",
"cacheVariables": {
"EDG_MACRO_CONF": "linux-gcc-macos-like",
"CMAKE_BUILD_TYPE": "Debug"
},
"environment": {
"CC": "gcc",
"CXX": "g++"
}
},
{
"name": "linux-gcc-windows-like-debug",
"inherits": "linux-common",
"displayName": "Linux (GCC) Windows-like Build Config - DEBUG",
"description": "CI coverage build: Linux build using GCC with the Windows ABI and feature choices",
"binaryDir": "${sourceDir}/build/gcc-windows-like",
"cacheVariables": {
"EDG_MACRO_CONF": "linux-gcc-windows-like",
"CMAKE_BUILD_TYPE": "Debug"
},
"environment": {
"CC": "gcc",
"CXX": "g++"
}
},
{
"name": "linux-gcc-variants-debug",
"inherits": "linux-common",
"displayName": "Linux (GCC) variants Build Config - DEBUG",
"description": "CI coverage build: Linux build using GCC with build-time variants no platform uses",
"binaryDir": "${sourceDir}/build/gcc-variants",
"cacheVariables": {
"EDG_MACRO_CONF": "linux-gcc-variants",
"CMAKE_BUILD_TYPE": "Debug"
},
"environment": {
"CC": "gcc",
"CXX": "g++"
}
},
{
"name": "linux-gcc-legacy-debug",
"inherits": "linux-common",
"displayName": "Linux (GCC) legacy Build Config - DEBUG",
"description": "CI coverage build: Linux build using GCC with the Cfront ABI and legacy compatibility",
"binaryDir": "${sourceDir}/build/gcc-legacy",
"cacheVariables": {
"EDG_MACRO_CONF": "linux-gcc-legacy",
"CMAKE_BUILD_TYPE": "Debug"
},
"environment": {
"CC": "gcc",
"CXX": "g++"
}
},
{
"name": "linux-i686-gcc-debug",
"inherits": "linux-common",
Expand Down
2 changes: 2 additions & 0 deletions cmake/macro-conf/default/cpfe-cp.cmakedef
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
BACK_END_IS_C_GEN_BE=0
BACK_END_IS_CP_GEN_BE=1
ALL_TEMPLATE_INFO_IN_IL=1
PARENS_IN_IL=1
2 changes: 2 additions & 0 deletions cmake/macro-conf/linux-gcc-legacy/base.cmakedef
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
import <linux-gcc/base>
import <support/ci-variants/legacy>
2 changes: 2 additions & 0 deletions cmake/macro-conf/linux-gcc-legacy/cdisp.cmakedef
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
import <linux-gcc/cdisp>
import <support/ci-variants/legacy>
2 changes: 2 additions & 0 deletions cmake/macro-conf/linux-gcc-legacy/cpfe-cp.cmakedef
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
import <linux-gcc/cpfe-cp>
import <support/ci-variants/legacy>
2 changes: 2 additions & 0 deletions cmake/macro-conf/linux-gcc-legacy/cpfe.cmakedef
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
import <linux-gcc/cpfe>
import <support/ci-variants/legacy>
1 change: 1 addition & 0 deletions cmake/macro-conf/linux-gcc-legacy/cpprtlib.cmakedef
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
import <linux-gcc/cpprtlib>
14 changes: 14 additions & 0 deletions cmake/macro-conf/linux-gcc-macos-like/base.cmakedef
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import <linux-gcc/base>
import <support/ci-variants/macos-like>
# --- language features macOS leaves off
delete COROUTINE_ENABLING_POSSIBLE
delete TIE_DEFAULT_GNU_ABI_VERSION_TO_GNU_VERSION
delete BUILTIN_VA_LIST_OVERRIDE_TYPE_NAME
delete ASSUME_THIS_CANNOT_BE_NULL_IN_CONDITIONAL_OPERATORS
delete HANDLE_VIRTUAL_BASES_IN_SUBOBJECT_CTOR_DTORS
# --- 128-bit host integers
delete TYPE_FOR_AN_INTEGER_VALUE
delete TYPE_FOR_A_SIGNED_INTEGER_VALUE
delete TYPE_FOR_A_FIXED_POINT_VALUE
# --- host floating point: long double is binary64, as on arm64 macOS
delete FP_LONG_DOUBLE_IS_80BIT_EXTENDED
2 changes: 2 additions & 0 deletions cmake/macro-conf/linux-gcc-macos-like/cdisp.cmakedef
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
import <linux-gcc/cdisp>
import <support/ci-variants/macos-like>
2 changes: 2 additions & 0 deletions cmake/macro-conf/linux-gcc-macos-like/cpfe-cp.cmakedef
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
import <linux-gcc/cpfe-cp>
import <support/ci-variants/macos-like>
5 changes: 5 additions & 0 deletions cmake/macro-conf/linux-gcc-macos-like/cpfe.cmakedef
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import <linux-gcc/cpfe>
import <support/ci-variants/macos-like>
# --- IL and memory management
delete LOWER_FIXED_POINT
delete RECORD_BACKING_EXPRS_WITH_IL_LOWERING
7 changes: 7 additions & 0 deletions cmake/macro-conf/linux-gcc-macos-like/cpprtlib.cmakedef
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import <linux-gcc/cpprtlib>
# The runtime library is compiled against the host's glibc headers, which
# use __float128 on x86-64; this configuration's front end has no 128-bit
# floating-point types (and long double is binary64), so map them to double.
__float128=double
_Float128=__edg_rt_float128
__TC__=__DC__
2 changes: 2 additions & 0 deletions cmake/macro-conf/linux-gcc-variants/base.cmakedef
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
import <linux-gcc/base>
import <support/ci-variants/variants>
2 changes: 2 additions & 0 deletions cmake/macro-conf/linux-gcc-variants/cdisp.cmakedef
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
import <linux-gcc/cdisp>
import <support/ci-variants/variants>
2 changes: 2 additions & 0 deletions cmake/macro-conf/linux-gcc-variants/cpfe-cp.cmakedef
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
import <linux-gcc/cpfe-cp>
import <support/ci-variants/variants>
2 changes: 2 additions & 0 deletions cmake/macro-conf/linux-gcc-variants/cpfe.cmakedef
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
import <linux-gcc/cpfe>
import <support/ci-variants/variants>
7 changes: 7 additions & 0 deletions cmake/macro-conf/linux-gcc-variants/cpprtlib.cmakedef
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import <linux-gcc/cpprtlib>
# The runtime library is compiled against the host's glibc headers, which
# use __float128 on x86-64; this configuration's front end has no 128-bit
# floating-point types, so map them to long double.
__float128=long double
_Float128=__edg_rt_float128
__TC__=__XC__
10 changes: 10 additions & 0 deletions cmake/macro-conf/linux-gcc-windows-like/base.cmakedef
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import <linux-gcc/base>
import <support/ci-variants/windows-like>
# --- language features Windows leaves off
delete COROUTINE_ENABLING_POSSIBLE
delete BUILTIN_VA_LIST_OVERRIDE_TYPE_NAME
delete ASSUME_THIS_CANNOT_BE_NULL_IN_CONDITIONAL_OPERATORS
# --- IL and memory management
delete TYPE_FOR_AN_INTEGER_VALUE
delete TYPE_FOR_A_SIGNED_INTEGER_VALUE
delete TYPE_FOR_A_FIXED_POINT_VALUE
4 changes: 4 additions & 0 deletions cmake/macro-conf/linux-gcc-windows-like/cdisp.cmakedef
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import <linux-gcc/cdisp>
import <support/ci-variants/windows-like>
# The standalone IL display program reads IL files.
IL_SHOULD_BE_WRITTEN_TO_FILE=1
2 changes: 2 additions & 0 deletions cmake/macro-conf/linux-gcc-windows-like/cpfe-cp.cmakedef
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
import <linux-gcc/cpfe-cp>
import <support/ci-variants/windows-like>
6 changes: 6 additions & 0 deletions cmake/macro-conf/linux-gcc-windows-like/cpfe.cmakedef
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import <linux-gcc/cpfe>
import <support/ci-variants/windows-like>
# --- IL and memory management
delete LOWER_FIXED_POINT
delete LOWER_IFUNC
delete RECORD_BACKING_EXPRS_WITH_IL_LOWERING
1 change: 1 addition & 0 deletions cmake/macro-conf/linux-gcc-windows-like/cpprtlib.cmakedef
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
import <linux-gcc/cpprtlib>
70 changes: 70 additions & 0 deletions cmake/macro-conf/support/ci-variants/legacy.cmakedef
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
# Part of the EDG Compiler Project, under the Apache License v2.0 with LLVM
# Exceptions.
# See https://edgcpp.org/LICENSE.txt for license information.
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception

# CI-only (linux-gcc-legacy): the Cfront ABI with cfront/Sun/early-GNU
# compatibility, a host without mmap, feature-off states, and SoftFloat host
# floating point, for code coverage.
# --- non-IA-64 (Cfront) ABI
# Companions required for IA64_ABI=0 on the linux macro conf:
IA64_ABI=0
TIE_DEFAULT_GNU_ABI_VERSION_TO_GNU_VERSION=0
HANDLE_VIRTUAL_BASES_IN_COMPLETE_CTOR_DTORS=0
# The linux_i686 target configuration only has the IA-64 ABI macros; add the
# non-IA-64 ones (values from src/defines_linux.h).
TARG_ALIGNOF_PTR_TO_VIRTUAL_BASE_CLASS_linux_i686=4
TARG_SIZEOF_PTR_TO_VIRTUAL_BASE_CLASS_linux_i686=4
TARG_RUNTIME_ELEM_COUNT_INT_KIND_linux_i686=((an_integer_kind)ik_int)
TARG_DELTA_INT_KIND_linux_i686=((an_integer_kind)ik_short)
TARG_FORCE_ONE_BIT_BIT_FIELD_TO_BE_UNSIGNED_linux_i686=1
TARG_ZERO_WIDTH_BIT_FIELD_ALIGNMENT_linux_i686=4
# cfront 2.1 object-code compatibility, using EDG's own "cfront-like + latest features"
# recipe from src/defines.h:3527-3566 (otherwise RTTI/array new/covariant returns are off,
# and DEFAULT_DISTINCT_TEMPLATE_SIGNATURES=0 trips targ_def.h:4351 with EXPORT_ENABLING_POSSIBLE=1).
CFRONT_2_1_OBJECT_CODE_COMPATIBILITY=1
CFRONT_GLOBAL_VS_MEMBER_NAME_LOOKUP_BUG=1
ABI_CHANGES_FOR_RTTI=1
ABI_CHANGES_FOR_ARRAY_NEW_AND_DELETE=1
ABI_CHANGES_FOR_PLACEMENT_DELETE=1
ABI_CHANGES_FOR_COVARIANT_VIRTUAL_FUNC_RETURN=1
ABI_CHANGES_FOR_CONSTRUCTION_VTBLS=1
DEFAULT_REMOVE_QUALIFIERS_FROM_PARAM_TYPES=1
DEFAULT_C_AND_CPP_FUNCTION_TYPES_ARE_DISTINCT=1
DEFAULT_DISTINCT_TEMPLATE_SIGNATURES=1
TARG_OPTIMIZE_EMPTY_BASE_CLASS_LAYOUT=1
DEFAULT_COMPRESS_MANGLED_NAMES=1
# Other cluster options at their non-baseline values:
LINKER_CAN_DISCARD_DUPLICATE_DEFINITIONS=0
NEW_CAN_BE_FOLDED_INTO_CTOR=1
ASSIGNMENT_TO_THIS_ALLOWED=1
ASSUME_THIS_CANNOT_BE_NULL_IN_CONDITIONAL_OPERATORS=1
DEFAULT_SUN_COMPATIBILITY=1
# SUN_TARGET_VERSION_NUMBER only matters with Sun extensions in the C++-generating back end
SUN_EXTENSIONS_ALLOWED=1
SUN_TARGET_VERSION_NUMBER=0x530
# --- gnu_version_compat flips (TIE=0 already present above as an IA64_ABI=0 companion)
MIN_GNU_VERSION=29500
ACCEPT_GNU_CARRIAGE_RETURN_LINE_TERMINATOR=1
DEFAULT_EMULATE_GNU_VALUE_INITIALIZATION_BUGS=1
BUILTIN_VA_LIST_OVERRIDE_TYPE_NAME="__edg_va_list"
GUARD_MACRO_FOR_VA_LIST="_VA_LIST"
# --- more old-group knobs
GNU_TARGET_VERSION_NUMBER=130300
DEFAULT_EMULATE_MSVC_VALUE_INITIALIZATION_BUGS=1
STDC_ZERO_IN_NONSTRICT_MODE=1
INSTANTIATE_EXTERN_INLINE=BACK_END_IS_C_GEN_BE
LOCALE_TO_SET_WHEN_MULTIBYTE_CHARS_ENABLED="C"
# --- no-mmap host (Cygwin-style) with preallocated PCH memory
USE_MMAP_FOR_MEMORY_REGIONS=0
DEFAULT_PREALLOCATED_PCH_MEM_SIZE=8388608
# --- feature-off states (they only remove code)
UPC_EXTENSIONS_ALLOWED=0
EXTRA_SOURCE_POSITIONS_IN_IL=0
SEQUENCING_DIAGNOSTICS_ENABLED=0
DUMP_LOWERED_EH_CONSTRUCTS_IN_C_GEN_BE=1
# --- SoftFloat host FP with an IEEE binary128 long double (x86 stand-in for aarch64/riscv64 hosts)
USE_SOFTFLOAT=1
USE_QUADMATH_LIBRARY=0
FP_LONG_DOUBLE_IS_80BIT_EXTENDED=0
FP_LONG_DOUBLE_IS_BINARY128=1
34 changes: 34 additions & 0 deletions cmake/macro-conf/support/ci-variants/macos-like.cmakedef
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Part of the EDG Compiler Project, under the Apache License v2.0 with LLVM
# Exceptions.
# See https://edgcpp.org/LICENSE.txt for license information.
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception

# CI-only (linux-gcc-macos-like): the host and feature choices of the
# macos-arm-clang configuration on a Linux build, for code coverage. The
# Linux target configurations are kept, so tests still compile, link, and run.
# --- language features macOS leaves off
FIXED_POINT_ALLOWED=0
EMBEDDED_C_ALLOWED=0
GNU_VECTOR_TYPES_ALLOWED=0
NAMED_ADDRESS_SPACES_ALLOWED=0
NAMED_REGISTERS_ALLOWED=0
THREAD_LOCAL_STORAGE_SPECIFIER_ALLOWED=0
GNU_INIT_PRIORITY_ATTRIBUTE_ALLOWED=0
GNU_FUNCTION_MULTIVERSIONING=0
RISCV_VECTOR_BUILTINS_ENABLED=0
# --- IL and memory management
RECORD_RAW_ASM_OPERAND_DESCRIPTIONS=1
KEEP_OBJECT_LIFETIME_INFO_IN_LOWERED_IL_WHEN_EH_ENABLED=0
FREE_MEMORY_REGIONS_EARLY=0
# --- 128-bit host integers
INTEGER_VALUE_REPR_IS_A_HOST_INTEGER=1
HOST_ALIGNMENT_REQUIRED=16
# --- host floating point: double, with the host conversion routines; long
# double is binary64, as on arm64 macOS
USE_DOUBLE_FOR_HOST_FP_VALUE=1
USE_FLOAT128_FOR_HOST_FP_VALUE=0
USE_QUADMATH_LIBRARY=0
USE_HOST_FP_CONVERSION_ROUTINES=1
FLOAT80_ENABLING_POSSIBLE=0
FLOAT128_ENABLING_POSSIBLE=0
FP_LONG_DOUBLE_IS_BINARY64=1
Loading
Loading