1
- From 8105c1de468d1962c7aacd0aaf31ec2dc90121c0 Mon Sep 17 00:00:00 2001
1
+ From 173de308e35d9cb7dcd65b0726ccd86bc2e0eb9b Mon Sep 17 00:00:00 2001
2
2
From: Yuta Saito <
[email protected] >
3
3
Date: Thu, 19 Sep 2024 04:45:51 +0000
4
4
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
11
11
the previous commit. This exposed the issue that the host LLVM build
12
12
directory is not suitable for configuring the stdlib build.
13
13
---
14
- .../products/wasmstdlib.py | 57 +++++++++++++++++--
15
- 1 file changed, 51 insertions(+), 6 deletions(-)
14
+ .../products/wasmstdlib.py | 58 +++++++++++++++++--
15
+ 1 file changed, 52 insertions(+), 6 deletions(-)
16
16
17
17
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..f87cd87d41c 100644
18
+ index d042fc38038..3c93a7a679f 100644
19
19
--- a/utils/swift_build_support/swift_build_support/products/wasmstdlib.py
20
20
+++ b/utils/swift_build_support/swift_build_support/products/wasmstdlib.py
21
21
@@ -17,6 +17,8 @@ from . import llvm
@@ -80,7 +80,7 @@ index d042fc38038..f87cd87d41c 100644
80
80
self.cmake_options.define(
81
81
'SWIFT_STDLIB_BUILD_TYPE:STRING', self._build_variant)
82
82
83
- @@ -71,9 +110,12 @@ class WasmStdlib(cmake_product.CMakeProduct):
83
+ @@ -71,9 +110,13 @@ class WasmStdlib(cmake_product.CMakeProduct):
84
84
self.cmake_options.define('SWIFT_WASI_SYSROOT_PATH:STRING',
85
85
self._wasi_sysroot_path(target_triple))
86
86
@@ -91,12 +91,13 @@ index d042fc38038..f87cd87d41c 100644
91
91
+ # so skip compiler health checks here.
92
92
+ self.cmake_options.define('CMAKE_C_COMPILER_WORKS:BOOL', 'TRUE')
93
93
+ self.cmake_options.define('CMAKE_CXX_COMPILER_WORKS:BOOL', 'TRUE')
94
+ + self.cmake_options.define('CMAKE_Swift_COMPILER_WORKS:BOOL', 'TRUE')
94
95
+ self.cmake_options.define('LLVM_COMPILER_CHECKED:BOOL', 'TRUE')
95
96
+
96
97
self.cmake_options.define('LLVM_DIR:PATH', llvm_cmake_dir)
97
98
98
99
# Standalone stdlib configuration
99
- @@ -90,6 +132 ,9 @@ class WasmStdlib(cmake_product.CMakeProduct):
100
+ @@ -90,6 +133 ,9 @@ class WasmStdlib(cmake_product.CMakeProduct):
100
101
self.cmake_options.define('SWIFT_BUILD_STATIC_STDLIB:BOOL', 'TRUE')
101
102
self.cmake_options.define('SWIFT_BUILD_DYNAMIC_STDLIB:BOOL', 'FALSE')
102
103
self.cmake_options.define('SWIFT_BUILD_STATIC_SDK_OVERLAY:BOOL', 'TRUE')
@@ -106,7 +107,7 @@ index d042fc38038..f87cd87d41c 100644
106
107
self.cmake_options.define('SWIFT_STDLIB_TRACING:BOOL', 'FALSE')
107
108
self.cmake_options.define('SWIFT_STDLIB_HAS_ASLR:BOOL', 'FALSE')
108
109
self.cmake_options.define('SWIFT_STDLIB_CONCURRENCY_TRACING:BOOL', 'FALSE')
109
- @@ -200,7 +245 ,7 @@ class WasmStdlib(cmake_product.CMakeProduct):
110
+ @@ -200,7 +246 ,7 @@ class WasmStdlib(cmake_product.CMakeProduct):
110
111
111
112
class WasmThreadsStdlib(WasmStdlib):
112
113
def build(self, host_target):
0 commit comments