Skip to content

Commit 9ae9696

Browse files
authored
build-script: add missing ignore_extra_cmake_options for Wasm (#82873)
With the addition of libxml2 and Foundation builds, lack of `ignore_extra_cmake_options=True` regressed macOS builds, where `extra-cmake-options` from macOS presets are picked up, overriding required `CMAKE_CXX_FLAGS` that need to be used for these products instead.
1 parent 0f919f1 commit 9ae9696

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

utils/swift_build_support/swift_build_support/products/wasmswiftsdk.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,8 @@ def _build_libxml2(self, swift_host_triple, has_pthread, wasi_sysroot):
130130
libxml2.cmake_options.define('HAVE_PTHREAD_H', cmake_thread_enabled)
131131

132132
libxml2.build_with_cmake([], self.args.build_variant, [],
133-
prefer_native_toolchain=True)
133+
prefer_native_toolchain=True,
134+
ignore_extra_cmake_options=True)
134135
with shell.pushd(libxml2.build_dir):
135136
shell.call([self.toolchain.cmake, '--install', '.', '--prefix', '/', '--component', 'development'],
136137
env={'DESTDIR': wasi_sysroot})
@@ -158,7 +159,8 @@ def _build_foundation(self, swift_host_triple, has_pthread, wasi_sysroot):
158159
foundation.cmake_options.define('LIBXML2_LIBRARY', os.path.join(wasi_sysroot, 'lib'))
159160

160161
foundation.build_with_cmake([], self.args.build_variant, [],
161-
prefer_native_toolchain=True)
162+
prefer_native_toolchain=True,
163+
ignore_extra_cmake_options=True)
162164

163165
dest_dir = self._target_package_path(swift_host_triple)
164166
with shell.pushd(foundation.build_dir):
@@ -184,7 +186,8 @@ def _build_swift_testing(self, swift_host_triple, has_pthread, wasi_sysroot):
184186
swift_testing.cmake_options.define('SwiftTesting_MACRO', 'NO')
185187

186188
swift_testing.build_with_cmake([], self.args.build_variant, [],
187-
prefer_native_toolchain=True)
189+
prefer_native_toolchain=True,
190+
ignore_extra_cmake_options=True)
188191
dest_dir = self._target_package_path(swift_host_triple)
189192
with shell.pushd(swift_testing.build_dir):
190193
shell.call([self.toolchain.cmake, '--install', '.', '--prefix', '/usr'],

0 commit comments

Comments
 (0)