Skip to content

Commit a96e5d0

Browse files
Merge pull request #63350 from aschwaighofer/relative_protocol_witness_tables_test_config
Relative protocol witness tables test configuration
2 parents 06c963b + 1698f69 commit a96e5d0

File tree

5 files changed

+38
-3
lines changed

5 files changed

+38
-3
lines changed

stdlib/cmake/modules/SwiftSource.cmake

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -570,6 +570,7 @@ function(_compile_swift_files
570570

571571
if (SWIFT_STDLIB_USE_RELATIVE_PROTOCOL_WITNESS_TABLES)
572572
list(APPEND swift_flags "-Xfrontend" "-enable-relative-protocol-witness-tables")
573+
list(APPEND swift_flags "-Xfrontend" "-swift-async-frame-pointer=never")
573574
endif()
574575

575576
if(SWIFT_STDLIB_DISABLE_INSTANTIATION_CACHES)

stdlib/public/core/StringObject.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1240,7 +1240,7 @@ extension _StringObject {
12401240

12411241
@inline(never)
12421242
internal func _dump() {
1243-
#if INTERNAL_CHECKS_ENABLED
1243+
#if INTERNAL_CHECKS_ENABLED && !SWIFT_STDLIB_STATIC_PRINT
12441244
let raw = self.rawBits
12451245
let word0 = ("0000000000000000" + String(raw.0, radix: 16)).suffix(16)
12461246
let word1 = ("0000000000000000" + String(raw.1, radix: 16)).suffix(16)

test/lit.cfg

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1003,7 +1003,7 @@ if run_vendor == 'apple':
10031003

10041004
# TODO: consider making the addition of these flags dependent on the CMake
10051005
# setting for hermetic seal at link
1006-
if not config.swift_freestanding_is_darwin:
1006+
if not config.swift_freestanding_is_darwin and not config.swift_stdlib_use_relative_protocol_witness_tables:
10071007
swift_execution_tests_extra_flags += ' -experimental-hermetic-seal-at-link -lto=llvm-full'
10081008

10091009
if not config.swift_freestanding_is_darwin:
@@ -1013,7 +1013,7 @@ if run_vendor == 'apple':
10131013
swift_execution_tests_extra_flags += ' -Xfrontend -reflection-metadata-for-debugger-only'
10141014

10151015
if config.swift_stdlib_use_relative_protocol_witness_tables:
1016-
swift_execution_tests_extra_flags += ' -Xfrontend -enable-relative-protocol-witness-tables'
1016+
swift_execution_tests_extra_flags += ' -Xfrontend -enable-relative-protocol-witness-tables -Xfrontend -swift-async-frame-pointer=never'
10171017

10181018
# Build a resource dir for freestanding tests.
10191019
new_resource_dir = os.path.join(config.test_exec_root, "resource_dir")

utils/build-presets.ini

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2615,6 +2615,39 @@ mixin-preset=stdlib_S_standalone_minimal_macho_arm64,build
26152615
test
26162616
validation-test
26172617

2618+
[preset: stdlib_S_standalone_minimal_macho_arm64_relative_protocol_witness_table,build,test]
2619+
mixin-preset=
2620+
stdlib_base_standalone
2621+
mixin_stdlib_minimal
2622+
2623+
build-subdir=stdlib_S_standalone
2624+
debug
2625+
assertions
2626+
2627+
verbose-build
2628+
2629+
swift-primary-variant-sdk=FREESTANDING
2630+
swift-primary-variant-arch=arm64
2631+
swift-freestanding-flavor=apple
2632+
swift-freestanding-sdk=macosx
2633+
stdlib-deployment-targets=freestanding-arm64
2634+
2635+
# For now, until clang/swiftc works correctly with "none-macho" as the OS part of target triple.
2636+
swift-freestanding-triple-name=macosx11.0
2637+
swift-freestanding-module-name=macos
2638+
swift-freestanding-archs=arm64
2639+
2640+
# For lit tests, we are producing dynamic executables with statically linked stdlib into the executable.
2641+
swift-runtime-static-image-inspection=0
2642+
2643+
swift-stdlib-experimental-hermetic-seal-at-link=0
2644+
swift-stdlib-lto=
2645+
swift-enable-runtime-function-counters=0
2646+
swift-stdlib-use-relative-protocol-witness-tables=1
2647+
2648+
test
2649+
validation-test
2650+
26182651
[preset: stdlib_S_standalone_darwin_x86_64,build]
26192652
mixin-preset=
26202653
stdlib_S_standalone,build

utils/build-script-impl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,7 @@ KNOWN_SETTINGS=(
212212
swift-stdlib-single-threaded-concurrency "0" "build Swift concurrency in single-threaded mode"
213213
swift-stdlib-concurrency-tracing "" "whether to enable tracing signposts for concurrency; default is 1 on Darwin platforms, 0 otherwise"
214214
swift-stdlib-use-relative-protocol-witness-tables "0" "whether to use relative protocol witness table"
215+
swift-enable-runtime-function-counters "1" "whether to enable runtime function counters"
215216
swift-stdlib-os-versioning "1" "whether to build stdlib with availability based on OS versions (Darwin only)"
216217
swift-stdlib-has-commandline "1" "whether to build stdlib with the CommandLine enum and support for argv/argc"
217218
swift-stdlib-stable-abi "" "should stdlib be built with stable ABI, if not set defaults to true on Darwin, false otherwise"

0 commit comments

Comments
 (0)