Skip to content

Commit dbd3cab

Browse files
committed
more debug
1 parent 1c59f16 commit dbd3cab

1 file changed

Lines changed: 15 additions & 3 deletions

File tree

cpython-unix/build.py

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,7 @@ def simple_build(
286286

287287
# Debug: Check what files exist in the build environment
288288
try:
289-
files = build_env.find_output_files(".", "*")
289+
files = list(build_env.find_output_files(".", "*"))
290290
print(f"Files in build environment: {len(files)} files found")
291291
for f in sorted(files)[:10]: # Show first 10 files
292292
print(f" {f}")
@@ -297,7 +297,7 @@ def simple_build(
297297

298298
# Debug: Check if tools_path directory exists
299299
try:
300-
tools_files = build_env.find_output_files(tools_path, "*")
300+
tools_files = list(build_env.find_output_files(tools_path, "*"))
301301
print(f"Files in {tools_path} directory: {len(tools_files)} files found")
302302
for f in sorted(tools_files)[:5]: # Show first 5 files
303303
print(f" {tools_path}/{f}")
@@ -1309,7 +1309,19 @@ def main():
13091309
else:
13101310
print("unknown build action: %s" % action)
13111311
return 1
1312+
1313+
print(f"Build action '{action}' completed successfully for {target_triple}")
1314+
return 0
13121315

13131316

13141317
if __name__ == "__main__":
1315-
sys.exit(main())
1318+
try:
1319+
exit_code = main()
1320+
print(f"Main function completed with exit code: {exit_code}")
1321+
sys.exit(exit_code)
1322+
except Exception as e:
1323+
print(f"Unhandled exception in main: {e}")
1324+
print(f"Exception type: {type(e)}")
1325+
import traceback
1326+
traceback.print_exc()
1327+
sys.exit(2)

0 commit comments

Comments
 (0)