Skip to content

Commit

Permalink
Merge pull request #8 from swiftwasm/update-base-tag-release-5.9-swif…
Browse files Browse the repository at this point in the history
…t-5.9-DEVELOPMENT-SNAPSHOT-2023-06-28-a

Update base tag for release-5.9 to swift-5.9-DEVELOPMENT-SNAPSHOT-2023-06-28-a
  • Loading branch information
kateinoigakukun committed Jun 30, 2023
2 parents 1170a2f + 051c311 commit 9d9b26c
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 10 deletions.
2 changes: 1 addition & 1 deletion schemes/release-5.9/manifest.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"update-checkout-scheme": "release/5.9",
"base-tag": "swift-5.9-DEVELOPMENT-SNAPSHOT-2023-06-17-a",
"base-tag": "swift-5.9-DEVELOPMENT-SNAPSHOT-2023-06-28-a",
"repos": {
"swift-corelibs-foundation": "660624d0220c0efbef054f4919f9f01fd3866be1",
"swift-corelibs-xctest": "77bc9f5386ee8a2a4e8da5ac30e846b451d101b6"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,30 +1,31 @@
From a3ad76d8f0cc71efc0f86eaf945b805a806c6695 Mon Sep 17 00:00:00 2001
From 297fcf0681be59ebd53867ce073cdac4475cfe09 Mon Sep 17 00:00:00 2001
From: Yuta Saito <[email protected]>
Date: Sat, 10 Jun 2023 14:51:49 +0000
Subject: [PATCH] [ClangImporter] Support wasi-libc.modulemap import with VFS

---
lib/ClangImporter/ClangIncludePaths.cpp | 40 ++++++++++++++++++-------
1 file changed, 30 insertions(+), 10 deletions(-)
lib/ClangImporter/ClangIncludePaths.cpp | 41 +++++++++++++++++++------
1 file changed, 31 insertions(+), 10 deletions(-)

diff --git a/lib/ClangImporter/ClangIncludePaths.cpp b/lib/ClangImporter/ClangIncludePaths.cpp
index 59afe4fbb33..bafcd3bc215 100644
index 0dd1f446757..5d321d432c1 100644
--- a/lib/ClangImporter/ClangIncludePaths.cpp
+++ b/lib/ClangImporter/ClangIncludePaths.cpp
@@ -91,6 +91,12 @@ static Optional<Path> getGlibcModuleMapPath(
return getActualModuleMapPath("glibc.modulemap", Opts, triple, vfs);
@@ -101,6 +101,13 @@ static Optional<Path> getGlibcModuleMapPath(
/*isArchSpecific*/ true, vfs);
}

+static Optional<Path> getWASILibcModuleMapPath(
+ SearchPathOptions &Opts, const llvm::Triple &triple,
+ const llvm::IntrusiveRefCntPtr<llvm::vfs::FileSystem> &vfs) {
+ return getActualModuleMapPath("wasi-libc.modulemap", Opts, triple, vfs);
+ return getActualModuleMapPath("wasi-libc.modulemap", Opts, triple,
+ /*isArchSpecific*/ true, vfs);
+}
+
static Optional<Path> getLibStdCxxModuleMapPath(
SearchPathOptions &opts, const llvm::Triple &triple,
const llvm::IntrusiveRefCntPtr<llvm::vfs::FileSystem> &vfs) {
@@ -183,11 +189,32 @@ static bool shouldInjectGlibcModulemap(const llvm::Triple &triple) {
@@ -195,11 +202,32 @@ static bool shouldInjectGlibcModulemap(const llvm::Triple &triple) {
triple.isAndroid();
}

Expand Down Expand Up @@ -58,7 +59,7 @@ index 59afe4fbb33..bafcd3bc215 100644
return {};

// Extract the Glibc path from Clang driver.
@@ -213,24 +240,17 @@ static SmallVector<std::pair<std::string, std::string>, 2> getGlibcFileMapping(
@@ -225,24 +253,17 @@ static SmallVector<std::pair<std::string, std::string>, 2> getGlibcFileMapping(
return {};
}

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
From 2c1e67d9a0582b2bf8dbb3726c8873fcaeefcc69 Mon Sep 17 00:00:00 2001
From: Yuta Saito <[email protected]>
Date: Thu, 29 Jun 2023 05:57:18 +0000
Subject: [PATCH] [test] Make KeyPath test pointer-size agnostic part 2

---
test/stdlib/KeyPath.swift | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/test/stdlib/KeyPath.swift b/test/stdlib/KeyPath.swift
index 47a30a15007..59a43a44bbf 100644
--- a/test/stdlib/KeyPath.swift
+++ b/test/stdlib/KeyPath.swift
@@ -1100,7 +1100,7 @@ if #available(SwiftStdlib 5.9, *) {
let catNameKp = _createOffsetBasedKeyPath(
root: Cat.self,
value: String.self,
- offset: 16
+ offset: 2 * MemoryLayout<UnsafeRawPointer>.size
) as? KeyPath<Cat, String>

expectNotNil(catNameKp)
--
2.40.0

0 comments on commit 9d9b26c

Please sign in to comment.