Skip to content

Repair WebAssembly CI by build script and IRGen test fix #76480

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Sep 16, 2024

Conversation

kateinoigakukun
Copy link
Member

@kateinoigakukun kateinoigakukun commented Sep 16, 2024

  • 37927fd: wasm: Build static SDK overlay explicitly
    The static SDK overlay has been built implicitly for a long time, but this is not the case anymore after 5bf2c93. We need to build it explicitly now. Otherwise we get the following error:
    ninja: error: 'test/swiftStdlibCollectionUnittest-wasi', needed by 'test/CMakeFiles/check-swift-wasi-wasm32-custom', missing and no known rule to make it
    
  • e66ad5a: test: Fix test/IRGen/stdlib/Mutex.swift for 32-bit platforms
    The test was failing on 32-bit platforms because the offset of the layout of struct metadata depends on the pointer size.
Field Type Offset (32-bit) Offset (64-bit)
Layout String Pointer ptr 4 * (-2) 4 * (-4)
VWT ptr 4 * (-1) 4 * (-2)
Metadata Flags ptr 4 * 0 4 * 0
Nominal Type Descriptor ptr 4 * 1 4 * 2
Generic Requirement ptr 4 * 2 4 * 4
Field Offset for handle i32 4 * 3 4 * 6
Field Offset for value i32 4 * 4 4 * 7

The static SDK overlay has been built implicitly for a long time, but
this is not the case anymore after 5bf2c93.
We need to build it explicitly now.
The test was failing on 32-bit platforms because the offset of the
layout of struct metadata depends on the pointer size.

| Field                   | Type | Offset (32-bit) | Offset (64-bit) |
|-------------------------|------|-----------------|-----------------|
| Layout String Pointer   | ptr  | 4 * (-2)        | 4 * (-4)        |
| VWT                     | ptr  | 4 * (-1)        | 4 * (-2)        |
| Metadata Flags          | ptr  | 4 * 0           | 4 * 0           |
| Nominal Type Descriptor | ptr  | 4 * 1           | 4 * 2           |
| Generic Requirement     | ptr  | 4 * 2           | 4 * 4           |
| Field Offset for handle | i32  | 4 * 3           | 4 * 6           |
| Field Offset for value  | i32  | 4 * 4           | 4 * 7           |
@kateinoigakukun
Copy link
Member Author

@swift-ci smoke test

@kateinoigakukun
Copy link
Member Author

@swift-ci test WebAssembly

@MaxDesiatov
Copy link
Contributor

@swift-ci build toolchain

@kateinoigakukun kateinoigakukun merged commit 0a304e1 into swiftlang:main Sep 16, 2024
4 of 7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants