Skip to content

Commit 81b908e

Browse files
DEBUG CI: Dump .ninja_log file to analyze build time
1 parent 98f3e8f commit 81b908e

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

utils/swift_build_support/swift_build_support/products/wasmswiftsdk.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,14 @@ def _build_foundation(self, swift_host_triple, has_pthread, wasi_sysroot):
164164
with shell.pushd(foundation.build_dir):
165165
shell.call([self.toolchain.cmake, '--install', '.', '--prefix', '/usr'],
166166
env={'DESTDIR': dest_dir})
167+
# DEBUG: Print the contents of .ninja_log file
168+
ninja_log_path = os.path.join(foundation.build_dir, '.ninja_log')
169+
print(f"DEBUG CI: Contents of {ninja_log_path}:")
170+
if os.path.exists(ninja_log_path):
171+
with open(ninja_log_path, 'r') as ninja_log_file:
172+
print(ninja_log_file.read())
173+
else:
174+
print(f"DEBUG CI: {ninja_log_path} does not exist!?")
167175

168176
def _build_swift_testing(self, swift_host_triple, has_pthread, wasi_sysroot):
169177
swift_testing = CMakeProduct(

0 commit comments

Comments
 (0)