Skip to content

Commit 599bacf

Browse files
Skip compiler checks in stdlib too
1 parent 27d1338 commit 599bacf

File tree

1 file changed

+13
-7
lines changed

1 file changed

+13
-7
lines changed

schemes/main/swift/0002-wasm-Configure-LLVM-for-WebAssembly-target-independe.patch

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
From 061b9339c6c76064e3930ee81811be058ca853fc Mon Sep 17 00:00:00 2001
1+
From 8105c1de468d1962c7aacd0aaf31ec2dc90121c0 Mon Sep 17 00:00:00 2001
22
From: Yuta Saito <[email protected]>
33
Date: Thu, 19 Sep 2024 04:45:51 +0000
44
Subject: [PATCH 2/2] [wasm] Configure LLVM for WebAssembly target
@@ -11,11 +11,11 @@ we fixed the stdlib build to use `WASI` as the system name properly in
1111
the previous commit. This exposed the issue that the host LLVM build
1212
directory is not suitable for configuring the stdlib build.
1313
---
14-
.../products/wasmstdlib.py | 51 ++++++++++++++++---
15-
1 file changed, 45 insertions(+), 6 deletions(-)
14+
.../products/wasmstdlib.py | 57 +++++++++++++++++--
15+
1 file changed, 51 insertions(+), 6 deletions(-)
1616

1717
diff --git a/utils/swift_build_support/swift_build_support/products/wasmstdlib.py b/utils/swift_build_support/swift_build_support/products/wasmstdlib.py
18-
index d042fc38038..053756139d5 100644
18+
index d042fc38038..f87cd87d41c 100644
1919
--- a/utils/swift_build_support/swift_build_support/products/wasmstdlib.py
2020
+++ b/utils/swift_build_support/swift_build_support/products/wasmstdlib.py
2121
@@ -17,6 +17,8 @@ from . import llvm
@@ -80,17 +80,23 @@ index d042fc38038..053756139d5 100644
8080
self.cmake_options.define(
8181
'SWIFT_STDLIB_BUILD_TYPE:STRING', self._build_variant)
8282

83-
@@ -71,9 +110,6 @@ class WasmStdlib(cmake_product.CMakeProduct):
83+
@@ -71,9 +110,12 @@ class WasmStdlib(cmake_product.CMakeProduct):
8484
self.cmake_options.define('SWIFT_WASI_SYSROOT_PATH:STRING',
8585
self._wasi_sysroot_path(target_triple))
8686

8787
- # It's ok to use the host LLVM build dir just for CMake functionalities
8888
- llvm_cmake_dir = os.path.join(self._host_llvm_build_dir(
8989
- host_target), 'lib', 'cmake', 'llvm')
90+
+ # compiler-rt for WebAssembly target is not installed in the host toolchain
91+
+ # so skip compiler health checks here.
92+
+ self.cmake_options.define('CMAKE_C_COMPILER_WORKS:BOOL', 'TRUE')
93+
+ self.cmake_options.define('CMAKE_CXX_COMPILER_WORKS:BOOL', 'TRUE')
94+
+ self.cmake_options.define('LLVM_COMPILER_CHECKED:BOOL', 'TRUE')
95+
+
9096
self.cmake_options.define('LLVM_DIR:PATH', llvm_cmake_dir)
9197

9298
# Standalone stdlib configuration
93-
@@ -90,6 +126,9 @@ class WasmStdlib(cmake_product.CMakeProduct):
99+
@@ -90,6 +132,9 @@ class WasmStdlib(cmake_product.CMakeProduct):
94100
self.cmake_options.define('SWIFT_BUILD_STATIC_STDLIB:BOOL', 'TRUE')
95101
self.cmake_options.define('SWIFT_BUILD_DYNAMIC_STDLIB:BOOL', 'FALSE')
96102
self.cmake_options.define('SWIFT_BUILD_STATIC_SDK_OVERLAY:BOOL', 'TRUE')
@@ -100,7 +106,7 @@ index d042fc38038..053756139d5 100644
100106
self.cmake_options.define('SWIFT_STDLIB_TRACING:BOOL', 'FALSE')
101107
self.cmake_options.define('SWIFT_STDLIB_HAS_ASLR:BOOL', 'FALSE')
102108
self.cmake_options.define('SWIFT_STDLIB_CONCURRENCY_TRACING:BOOL', 'FALSE')
103-
@@ -200,7 +239,7 @@ class WasmStdlib(cmake_product.CMakeProduct):
109+
@@ -200,7 +245,7 @@ class WasmStdlib(cmake_product.CMakeProduct):
104110

105111
class WasmThreadsStdlib(WasmStdlib):
106112
def build(self, host_target):

0 commit comments

Comments
 (0)