1
- From 574c78452bf15a8c801c2c1e5c53d60192528a79 Mon Sep 17 00:00:00 2001
1
+ From 8b7f1aaa735d1d0b994fc9ac9009f4bc9805a142 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 | 53 ++++++++++++++++---
15
- 1 file changed, 47 insertions(+), 6 deletions(-)
14
+ .../products/wasmstdlib.py | 54 ++++++++++++++++---
15
+ 1 file changed, 48 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..2e780a0453b 100644
18
+ index d042fc38038..09d90be7fe9 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
@@ -27,7 +27,7 @@ index d042fc38038..2e780a0453b 100644
27
27
28
28
29
29
class WasmStdlib(cmake_product.CMakeProduct):
30
- @@ -39,13 +41,52 @@ class WasmStdlib(cmake_product.CMakeProduct):
30
+ @@ -39,13 +41,53 @@ class WasmStdlib(cmake_product.CMakeProduct):
31
31
return self.args.test_wasmstdlib
32
32
33
33
def build(self, host_target):
@@ -57,6 +57,7 @@ index d042fc38038..2e780a0453b 100644
57
57
+ # so skip compiler health checks here.
58
58
+ cmake_options.define('CMAKE_C_COMPILER_WORKS:BOOL', 'TRUE')
59
59
+ cmake_options.define('CMAKE_CXX_COMPILER_WORKS:BOOL', 'TRUE')
60
+ + cmake_options.define('LLVM_COMPILER_CHECKED:BOOL', 'TRUE')
60
61
+ cmake_options.define('LLVM_ENABLE_ZLIB:BOOL', 'FALSE')
61
62
+ cmake_options.define('LLVM_ENABLE_LIBXML2:BOOL', 'FALSE')
62
63
+
@@ -82,7 +83,7 @@ index d042fc38038..2e780a0453b 100644
82
83
self.cmake_options.define(
83
84
'SWIFT_STDLIB_BUILD_TYPE:STRING', self._build_variant)
84
85
85
- @@ -71,9 +112 ,6 @@ class WasmStdlib(cmake_product.CMakeProduct):
86
+ @@ -71,9 +113 ,6 @@ class WasmStdlib(cmake_product.CMakeProduct):
86
87
self.cmake_options.define('SWIFT_WASI_SYSROOT_PATH:STRING',
87
88
self._wasi_sysroot_path(target_triple))
88
89
@@ -92,7 +93,7 @@ index d042fc38038..2e780a0453b 100644
92
93
self.cmake_options.define('LLVM_DIR:PATH', llvm_cmake_dir)
93
94
94
95
# Standalone stdlib configuration
95
- @@ -90,6 +128 ,9 @@ class WasmStdlib(cmake_product.CMakeProduct):
96
+ @@ -90,6 +129 ,9 @@ class WasmStdlib(cmake_product.CMakeProduct):
96
97
self.cmake_options.define('SWIFT_BUILD_STATIC_STDLIB:BOOL', 'TRUE')
97
98
self.cmake_options.define('SWIFT_BUILD_DYNAMIC_STDLIB:BOOL', 'FALSE')
98
99
self.cmake_options.define('SWIFT_BUILD_STATIC_SDK_OVERLAY:BOOL', 'TRUE')
@@ -102,7 +103,7 @@ index d042fc38038..2e780a0453b 100644
102
103
self.cmake_options.define('SWIFT_STDLIB_TRACING:BOOL', 'FALSE')
103
104
self.cmake_options.define('SWIFT_STDLIB_HAS_ASLR:BOOL', 'FALSE')
104
105
self.cmake_options.define('SWIFT_STDLIB_CONCURRENCY_TRACING:BOOL', 'FALSE')
105
- @@ -200,7 +241 ,7 @@ class WasmStdlib(cmake_product.CMakeProduct):
106
+ @@ -200,7 +242 ,7 @@ class WasmStdlib(cmake_product.CMakeProduct):
106
107
107
108
class WasmThreadsStdlib(WasmStdlib):
108
109
def build(self, host_target):
0 commit comments