Skip to content

Commit 8dbac56

Browse files
authored
[unittests] Fix compilation of Runtime unittests (#84235)
PR#78516 performed a rename from `swiftRuntime` to `swiftRuntimeCore` but might have skipped these two instances because the code is rarely compiled in Darwin platforms (and it is not compiled in Linux/Windows platforms either). The code on the runtime unittests seems to be associated with the SDK overlays being built (either static or dynamic), which none are for Darwin platforms by default. Other platforms should build the dynamic SDK overlay, but the file is surrounded with checks for `__APPLE__` and `__MACH__`. The normal CI would never hit this file, but someone might while building the static or dynamic SDK overlay if they so request it to the `build-script`.
1 parent e5b732d commit 8dbac56

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

unittests/runtime/CompatibilityOverrideRuntime.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
#if defined(__APPLE__) && defined(__MACH__)
1414

15-
#define SWIFT_TARGET_LIBRARY_NAME swiftRuntime
15+
#define SWIFT_TARGET_LIBRARY_NAME swiftRuntimeCore
1616

1717
#include "../../stdlib/public/CompatibilityOverride/CompatibilityOverride.h"
1818
#include "swift/Runtime/Casting.h"
@@ -55,14 +55,14 @@ namespace {
5555

5656
struct OverrideSection {
5757
uintptr_t version;
58-
58+
5959
#define OVERRIDE(name, ret, attrs, ccAttrs, namespace, typedArgs, namedArgs) \
6060
Override_ ## name name;
6161
#include "../../stdlib/public/CompatibilityOverride/CompatibilityOverrideRuntime.def"
6262
};
6363

6464
OverrideSection RuntimeOverrides
65-
__attribute__((section("__DATA," COMPATIBILITY_OVERRIDE_SECTION_NAME_swiftRuntime))) = {
65+
__attribute__((section("__DATA," COMPATIBILITY_OVERRIDE_SECTION_NAME_swiftRuntimeCore))) = {
6666
0,
6767
#define OVERRIDE(name, ret, attrs, ccAttrs, namespace, typedArgs, namedArgs) \
6868
name ## Override,

0 commit comments

Comments
 (0)