ITADN

windows native build support.

#273Openliudonghua123 创建于 2025-08-29
L
liudonghua123commented
Hi, I tried this tool on windows. It seems the native is not working now. <img width="1221" height="977" alt="Image" src="https://github.com/user-attachments/assets/4bc97c39-6660-4580-a6b4-f044c60b3c73" /> <details><summary>Details</summary> ``` Liu.D.H playground 147ms 13:20 > cat > hello.js console.info('hi') Liu.D.H playground 6.612s 13:20 > porf hello.js hi Liu.D.H playground 503ms 13:20 > porf wasm hello.js hello.wasm [216ms] compiled hello.js -> hello.wasm (28.2KB) Liu.D.H playground 303ms 13:20 > porf native hello.js hello.exe 4ms parsed 98ms generated wasm 17ms optimized 7ms assembled 37ms compiled Wasm to C \ compiling C to native (using cc)...<stdin>:2:20: error: no include path in which to search for stdint.h <stdin>:3:20: error: no include path in which to search for stdlib.h <stdin>:4:19: error: no include path in which to search for stdio.h <stdin>:5:18: error: no include path in which to search for math.h <stdin>:6:20: error: no include path in which to search for string.h <stdin>:8:9: error: unknown type name ‘uint8_t’ <stdin>:9:9: error: unknown type name ‘uint16_t’ <stdin>:10:9: error: unknown type name ‘int32_t’ <stdin>:11:9: error: unknown type name ‘uint32_t’ <stdin>:12:9: error: unknown type name ‘int64_t’ <stdin>:13:9: error: unknown type name ‘uint64_t’ <stdin>: In function ‘__Porffor_consoleIndent’: <stdin>:168:9: warning: implicit declaration of function ‘putchar’ [-Wimplicit-function-declaration] <stdin>:1:1: note: include ‘<stdio.h>’ or provide a declaration of ‘putchar’ <stdin>: In function ‘__Porffor_allocate’: <stdin>:258:17: warning: implicit declaration of function ‘realloc’ [-Wimplicit-function-declaration] <stdin>:1:1: note: include ‘<stdlib.h>’ or provide a declaration of ‘realloc’ <stdin>:258:17: warning: incompatible implicit declaration of built-in function ‘realloc’ [-Wbuiltin-declaration-mismatch] <stdin>:258:17: note: include ‘<stdlib.h>’ or provide a declaration of ‘realloc’ <stdin>:259:7: warning: implicit declaration of function ‘memset’ [-Wimplicit-function-declaration] <stdin>:1:1: note: include ‘<string.h>’ or provide a declaration of ‘memset’ <stdin>:259:7: warning: incompatible implicit declaration of built-in function ‘memset’ [-Wbuiltin-declaration-mismatch] <stdin>:259:7: note: include ‘<string.h>’ or provide a declaration of ‘memset’ <stdin>: In function ‘__Math_trunc’: <stdin>:359:10: warning: implicit declaration of function ‘trunc’ [-Wimplicit-function-declaration] <stdin>:1:1: note: include ‘<math.h>’ or provide a declaration of ‘trunc’ <stdin>:359:10: warning: incompatible implicit declaration of built-in function ‘trunc’ [-Wbuiltin-declaration-mismatch] <stdin>:359:10: note: include ‘<math.h>’ or provide a declaration of ‘trunc’ <stdin>: In function ‘__Math_round’: <stdin>:365:10: warning: implicit declaration of function ‘round’ [-Wimplicit-function-declaration] <stdin>:365:10: note: include ‘<math.h>’ or provide a declaration of ‘round’ <stdin>:365:10: warning: incompatible implicit declaration of built-in function ‘round’ [-Wbuiltin-declaration-mismatch] <stdin>:365:10: note: include ‘<math.h>’ or provide a declaration of ‘round’ <stdin>: In function ‘__Number_prototype_toString’: <stdin>:633:7: warning: implicit declaration of function ‘printf’ [-Wimplicit-function-declaration] <stdin>:633:7: note: include ‘<stdio.h>’ or provide a declaration of ‘printf’ <stdin>:633:7: warning: incompatible implicit declaration of built-in function ‘printf’ [-Wbuiltin-declaration-mismatch] <stdin>:633:7: note: include ‘<stdio.h>’ or provide a declaration of ‘printf’ <stdin>:634:7: warning: implicit declaration of function ‘exit’ [-Wimplicit-function-declaration] <stdin>:634:7: note: include ‘<stdlib.h>’ or provide a declaration of ‘exit’ <stdin>:634:7: warning: incompatible implicit declaration of built-in function ‘exit’ [-Wbuiltin-declaration-mismatch] <stdin>:634:7: note: include ‘<stdlib.h>’ or provide a declaration of ‘exit’ <stdin>:667:7: warning: incompatible implicit declaration of built-in function ‘printf’ [-Wbuiltin-declaration-mismatch] <stdin>:667:7: note: include ‘<stdio.h>’ or provide a declaration of ‘printf’ <stdin>:668:7: warning: incompatible implicit declaration of built-in function ‘exit’ [-Wbuiltin-declaration-mismatch] <stdin>:668:7: note: include ‘<stdlib.h>’ or provide a declaration of ‘exit’ <stdin>:740:44: warning: incompatible implicit declaration of built-in function ‘trunc’ [-Wbuiltin-declaration-mismatch] <stdin>:740:44: note: include ‘<math.h>’ or provide a declaration of ‘trunc’ <stdin>:847:86: warning: incompatible implicit declaration of built-in function ‘trunc’ [-Wbuiltin-declaration-mismatch] <stdin>:847:86: note: include ‘<math.h>’ or provide a declaration of ‘trunc’ <stdin>:954:46: warning: incompatible implicit declaration of built-in function ‘trunc’ [-Wbuiltin-declaration-mismatch] <stdin>:954:46: note: include ‘<math.h>’ or provide a declaration of ‘trunc’ <stdin>:1045:90: warning: incompatible implicit declaration of built-in function ‘trunc’ [-Wbuiltin-declaration-mismatc] <stdin>:1045:90: note: include ‘<math.h>’ or provide a declaration of ‘trunc’ <stdin>:1127:86: warning: incompatible implicit declaration of built-in function ‘trunc’ [-Wbuiltin-declaration-mismatc] <stdin>:1127:86: note: include ‘<math.h>’ or provide a declaration of ‘trunc’ <stdin>:1226:42: warning: incompatible implicit declaration of built-in function ‘trunc’ [-Wbuiltin-declaration-mismatc] <stdin>:1226:42: note: include ‘<math.h>’ or provide a declaration of ‘trunc’ <stdin>: In function ‘__Function_prototype_toString’: <stdin>:1387:7: warning: incompatible implicit declaration of built-in function ‘printf’ [-Wbuiltin-declaration-mismatc] <stdin>:1387:7: note: include ‘<stdio.h>’ or provide a declaration of ‘printf’ <stdin>:1388:7: warning: incompatible implicit declaration of built-in function ‘exit’ [-Wbuiltin-declaration-mismatch] <stdin>:1388:7: note: include ‘<stdlib.h>’ or provide a declaration of ‘exit’ <stdin>: In function ‘__Porffor_object_get_withHash’: <stdin>:2251:7: warning: incompatible implicit declaration of built-in function ‘printf’ [-Wbuiltin-declaration-mismatc] <stdin>:2251:7: note: include ‘<stdio.h>’ or provide a declaration of ‘printf’ <stdin>:2252:7: warning: incompatible implicit declaration of built-in function ‘exit’ [-Wbuiltin-declaration-mismatch] <stdin>:2252:7: note: include ‘<stdlib.h>’ or provide a declaration of ‘exit’ <stdin>: In function ‘__Object_prototype_toString’: <stdin>:2578:17: warning: incompatible implicit declaration of built-in function ‘printf’ [-Wbuiltin-declaration-mismatch] <stdin>:2578:17: note: include ‘<stdio.h>’ or provide a declaration of ‘printf’ <stdin>:2579:17: warning: incompatible implicit declaration of built-in function ‘exit’ [-Wbuiltin-declaration-mismatch] <stdin>:2579:17: note: include ‘<stdlib.h>’ or provide a declaration of ‘exit’ <stdin>:2625:21: warning: incompatible implicit declaration of built-in function ‘printf’ [-Wbuiltin-declaration-mismatch] <stdin>:2625:21: note: include ‘<stdio.h>’ or provide a declaration of ‘printf’ <stdin>:2626:21: warning: incompatible implicit declaration of built-in function ‘exit’ [-Wbuiltin-declaration-mismatch] <stdin>:2626:21: note: include ‘<stdlib.h>’ or provide a declaration of ‘exit’ <stdin>: In function ‘__String_prototype_toString’: <stdin>:2787:11: warning: incompatible implicit declaration of built-in function ‘printf’ [-Wbuiltin-declaration-mismatch] <stdin>:2787:11: note: include ‘<stdio.h>’ or provide a declaration of ‘printf’ <stdin>:2788:11: warning: incompatible implicit declaration of built-in function ‘exit’ [-Wbuiltin-declaration-mismatch] <stdin>:2788:11: note: include ‘<stdlib.h>’ or provide a declaration of ‘exit’ <stdin>: In function ‘__Porffor_strcat’: <stdin>:2917:11: warning: implicit declaration of function ‘memcpy’ [-Wimplicit-function-declaration] <stdin>:2917:11: note: include ‘<string.h>’ or provide a declaration of ‘memcpy’ <stdin>:2917:11: warning: incompatible implicit declaration of built-in function ‘memcpy’ [-Wbuiltin-declaration-mismatch] <stdin>:2917:11: note: include ‘<string.h>’ or provide a declaration of ‘memcpy’ <stdin>:2956:11: warning: incompatible implicit declaration of built-in function ‘memcpy’ [-Wbuiltin-declaration-mismatch] <stdin>:2956:11: note: include ‘<string.h>’ or provide a declaration of ‘memcpy’ <stdin>:2976:11: warning: incompatible implicit declaration of built-in function ‘memcpy’ [-Wbuiltin-declaration-mismatch] <stdin>:2976:11: note: include ‘<string.h>’ or provide a declaration of ‘memcpy’ <stdin>:3012:11: warning: incompatible implicit declaration of built-in function ‘memcpy’ [-Wbuiltin-declaration-mismatch] <stdin>:3012:11: note: include ‘<string.h>’ or provide a declaration of ‘memcpy’ <stdin>: In function ‘__Porffor_object_get’: <stdin>:3772:7: warning: incompatible implicit declaration of built-in function ‘printf’ [-Wbuiltin-declaration-mismatc] <stdin>:3772:7: note: include ‘<stdio.h>’ or provide a declaration of ‘printf’ <stdin>:3773:7: warning: incompatible implicit declaration of built-in function ‘exit’ [-Wbuiltin-declaration-mismatch] <stdin>:3773:7: note: include ‘<stdlib.h>’ or provide a declaration of ‘exit’ <stdin>: In function ‘__String_prototype_trimEnd’: <stdin>:4061:11: warning: incompatible implicit declaration of built-in function ‘printf’ [-Wbuiltin-declaration-mismatch] <stdin>:4061:11: note: include ‘<stdio.h>’ or provide a declaration of ‘printf’ <stdin>:4062:11: warning: incompatible implicit declaration of built-in function ‘exit’ [-Wbuiltin-declaration-mismatch] <stdin>:4062:11: note: include ‘<stdlib.h>’ or provide a declaration of ‘exit’ <stdin>: In function ‘__String_prototype_trimStart’: <stdin>:4236:11: warning: incompatible implicit declaration of built-in function ‘printf’ [-Wbuiltin-declaration-mismatch] <stdin>:4236:11: note: include ‘<stdio.h>’ or provide a declaration of ‘printf’ <stdin>:4237:11: warning: incompatible implicit declaration of built-in function ‘exit’ [-Wbuiltin-declaration-mismatch] <stdin>:4237:11: note: include ‘<stdlib.h>’ or provide a declaration of ‘exit’ <stdin>: In function ‘__String_prototype_trim’: <stdin>:4359:11: warning: incompatible implicit declaration of built-in function ‘printf’ [-Wbuiltin-declaration-mismatch] <stdin>:4359:11: note: include ‘<stdio.h>’ or provide a declaration of ‘printf’ <stdin>:4360:11: warning: incompatible implicit declaration of built-in function ‘exit’ [-Wbuiltin-declaration-mismatch] <stdin>:4360:11: note: include ‘<stdlib.h>’ or provide a declaration of ‘exit’ <stdin>: In function ‘__String_prototype_charCodeAt’: <stdin>:4706:11: warning: incompatible implicit declaration of built-in function ‘printf’ [-Wbuiltin-declaration-mismatch] <stdin>:4706:11: note: include ‘<stdio.h>’ or provide a declaration of ‘printf’ <stdin>:4707:11: warning: incompatible implicit declaration of built-in function ‘exit’ [-Wbuiltin-declaration-mismatch] <stdin>:4707:11: note: include ‘<stdlib.h>’ or provide a declaration of ‘exit’ <stdin>: In function ‘__Porffor_stn_int’: <stdin>:4914:11: warning: incompatible implicit declaration of built-in function ‘printf’ [-Wbuiltin-declaration-mismatch] <stdin>:4914:11: note: include ‘<stdio.h>’ or provide a declaration of ‘printf’ <stdin>:4915:11: warning: incompatible implicit declaration of built-in function ‘exit’ [-Wbuiltin-declaration-mismatch] <stdin>:4915:11: note: include ‘<stdlib.h>’ or provide a declaration of ‘exit’ <stdin>: In function ‘__Porffor_stn_float’: <stdin>:5138:11: warning: incompatible implicit declaration of built-in function ‘printf’ [-Wbuiltin-declaration-mismatch] <stdin>:5138:11: note: include ‘<stdio.h>’ or provide a declaration of ‘printf’ <stdin>:5139:11: warning: incompatible implicit declaration of built-in function ‘exit’ [-Wbuiltin-declaration-mismatch] <stdin>:5139:11: note: include ‘<stdlib.h>’ or provide a declaration of ‘exit’ <stdin>: In function ‘__ecma262_StringToNumber’: <stdin>:5494:5: warning: incompatible implicit declaration of built-in function ‘printf’ [-Wbuiltin-declaration-mismatc] <stdin>:5494:5: note: include ‘<stdio.h>’ or provide a declaration of ‘printf’ <stdin>:5495:5: warning: incompatible implicit declaration of built-in function ‘exit’ [-Wbuiltin-declaration-mismatch] <stdin>:5495:5: note: include ‘<stdlib.h>’ or provide a declaration of ‘exit’ <stdin>: In function ‘__Number_prototype_valueOf’: <stdin>:6355:7: warning: incompatible implicit declaration of built-in function ‘printf’ [-Wbuiltin-declaration-mismatc] <stdin>:6355:7: note: include ‘<stdio.h>’ or provide a declaration of ‘printf’ <stdin>:6356:7: warning: incompatible implicit declaration of built-in function ‘exit’ [-Wbuiltin-declaration-mismatch] <stdin>:6356:7: note: include ‘<stdlib.h>’ or provide a declaration of ‘exit’ <stdin>: In function ‘__Object_prototype_valueOf’: <stdin>:6479:17: warning: incompatible implicit declaration of built-in function ‘printf’ [-Wbuiltin-declaration-mismatch] <stdin>:6479:17: note: include ‘<stdio.h>’ or provide a declaration of ‘printf’ <stdin>:6480:17: warning: incompatible implicit declaration of built-in function ‘exit’ [-Wbuiltin-declaration-mismatch] <stdin>:6480:17: note: include ‘<stdlib.h>’ or provide a declaration of ‘exit’ <stdin>:6526:21: warning: incompatible implicit declaration of built-in function ‘printf’ [-Wbuiltin-declaration-mismatch] <stdin>:6526:21: note: include ‘<stdio.h>’ or provide a declaration of ‘printf’ <stdin>:6527:21: warning: incompatible implicit declaration of built-in function ‘exit’ [-Wbuiltin-declaration-mismatch] <stdin>:6527:21: note: include ‘<stdlib.h>’ or provide a declaration of ‘exit’ <stdin>: In function ‘__String_prototype_valueOf’: <stdin>:6572:11: warning: incompatible implicit declaration of built-in function ‘printf’ [-Wbuiltin-declaration-mismatch] <stdin>:6572:11: note: include ‘<stdio.h>’ or provide a declaration of ‘printf’ <stdin>:6573:11: warning: incompatible implicit declaration of built-in function ‘exit’ [-Wbuiltin-declaration-mismatch] <stdin>:6573:11: note: include ‘<stdlib.h>’ or provide a declaration of ‘exit’ <stdin>: In function ‘__ecma262_ToPrimitive_Number’: <stdin>:7143:3: warning: incompatible implicit declaration of built-in function ‘printf’ [-Wbuiltin-declaration-mismatc] <stdin>:7143:3: note: include ‘<stdio.h>’ or provide a declaration of ‘printf’ <stdin>:7144:3: warning: incompatible implicit declaration of built-in function ‘exit’ [-Wbuiltin-declaration-mismatch] <stdin>:7144:3: note: include ‘<stdlib.h>’ or provide a declaration of ‘exit’ <stdin>: In function ‘__ecma262_ToNumber’: <stdin>:7184:7: warning: incompatible implicit declaration of built-in function ‘printf’ [-Wbuiltin-declaration-mismatc] <stdin>:7184:7: note: include ‘<stdio.h>’ or provide a declaration of ‘printf’ <stdin>:7185:7: warning: incompatible implicit declaration of built-in function ‘exit’ [-Wbuiltin-declaration-mismatch] <stdin>:7185:7: note: include ‘<stdlib.h>’ or provide a declaration of ‘exit’ <stdin>: In function ‘__Array_from’: <stdin>:7472:7: warning: incompatible implicit declaration of built-in function ‘printf’ [-Wbuiltin-declaration-mismatc] <stdin>:7472:7: note: include ‘<stdio.h>’ or provide a declaration of ‘printf’ <stdin>:7473:7: warning: incompatible implicit declaration of built-in function ‘exit’ [-Wbuiltin-declaration-mismatch] <stdin>:7473:7: note: include ‘<stdlib.h>’ or provide a declaration of ‘exit’ <stdin>:7492:15: warning: incompatible implicit declaration of built-in function ‘printf’ [-Wbuiltin-declaration-mismatch] <stdin>:7492:15: note: include ‘<stdio.h>’ or provide a declaration of ‘printf’ <stdin>:7493:15: warning: incompatible implicit declaration of built-in function ‘exit’ [-Wbuiltin-declaration-mismatch] <stdin>:7493:15: note: include ‘<stdlib.h>’ or provide a declaration of ‘exit’ <stdin>:7512:15: warning: incompatible implicit declaration of built-in function ‘printf’ [-Wbuiltin-declaration-mismatch] <stdin>:7512:15: note: include ‘<stdio.h>’ or provide a declaration of ‘printf’ <stdin>:7513:15: warning: incompatible implicit declaration of built-in function ‘exit’ [-Wbuiltin-declaration-mismatch] <stdin>:7513:15: note: include ‘<stdlib.h>’ or provide a declaration of ‘exit’ <stdin>:7626:17: warning: incompatible implicit declaration of built-in function ‘printf’ [-Wbuiltin-declaration-mismatch] <stdin>:7626:17: note: include ‘<stdio.h>’ or provide a declaration of ‘printf’ <stdin>:7627:17: warning: incompatible implicit declaration of built-in function ‘exit’ [-Wbuiltin-declaration-mismatch] <stdin>:7627:17: note: include ‘<stdlib.h>’ or provide a declaration of ‘exit’ <stdin>:7657:15: warning: incompatible implicit declaration of built-in function ‘printf’ [-Wbuiltin-declaration-mismatch] <stdin>:7657:15: note: include ‘<stdio.h>’ or provide a declaration of ‘printf’ <stdin>:7658:15: warning: incompatible implicit declaration of built-in function ‘exit’ [-Wbuiltin-declaration-mismatch] <stdin>:7658:15: note: include ‘<stdlib.h>’ or provide a declaration of ‘exit’ <stdin>:7794:11: warning: incompatible implicit declaration of built-in function ‘printf’ [-Wbuiltin-declaration-mismatch] <stdin>:7794:11: note: include ‘<stdio.h>’ or provide a declaration of ‘printf’ <stdin>:7795:11: warning: incompatible implicit declaration of built-in function ‘exit’ [-Wbuiltin-declaration-mismatch] <stdin>:7795:11: note: include ‘<stdlib.h>’ or provide a declaration of ‘exit’ <stdin>: In function ‘__ecma262_ToPrimitive_String’: <stdin>:8512:3: warning: incompatible implicit declaration of built-in function ‘printf’ [-Wbuiltin-declaration-mismatc] <stdin>:8512:3: note: include ‘<stdio.h>’ or provide a declaration of ‘printf’ <stdin>:8513:3: warning: incompatible implicit declaration of built-in function ‘exit’ [-Wbuiltin-declaration-mismatch] <stdin>:8513:3: note: include ‘<stdlib.h>’ or provide a declaration of ‘exit’ <stdin>: In function ‘__ecma262_ToString’: <stdin>:8555:7: warning: incompatible implicit declaration of built-in function ‘printf’ [-Wbuiltin-declaration-mismatc] <stdin>:8555:7: note: include ‘<stdio.h>’ or provide a declaration of ‘printf’ <stdin>:8556:7: warning: incompatible implicit declaration of built-in function ‘exit’ [-Wbuiltin-declaration-mismatch] <stdin>:8556:7: note: include ‘<stdlib.h>’ or provide a declaration of ‘exit’ <stdin>: In function ‘__Porffor_printArray’: <stdin>:8781:7: warning: incompatible implicit declaration of built-in function ‘printf’ [-Wbuiltin-declaration-mismatc] <stdin>:8781:7: note: include ‘<stdio.h>’ or provide a declaration of ‘printf’ <stdin>:8814:21: warning: incompatible implicit declaration of built-in function ‘printf’ [-Wbuiltin-declaration-mismatch] <stdin>:8814:21: note: include ‘<stdio.h>’ or provide a declaration of ‘printf’ <stdin>:8815:21: warning: incompatible implicit declaration of built-in function ‘exit’ [-Wbuiltin-declaration-mismatch] <stdin>:8815:21: note: include ‘<stdlib.h>’ or provide a declaration of ‘exit’ <stdin>: In function ‘__Porffor_print’: <stdin>:9184:9: warning: incompatible implicit declaration of built-in function ‘printf’ [-Wbuiltin-declaration-mismatc] <stdin>:9184:9: note: include ‘<stdio.h>’ or provide a declaration of ‘printf’ <stdin>: In function ‘main’: <stdin>:9651:13: warning: implicit declaration of function ‘calloc’ [-Wimplicit-function-declaration] <stdin>:9651:13: note: include ‘<stdlib.h>’ or provide a declaration of ‘calloc’ <stdin>:9651:13: warning: incompatible implicit declaration of built-in function ‘calloc’ [-Wbuiltin-declaration-mismatch] <stdin>:9651:13: note: include ‘<stdlib.h>’ or provide a declaration of ‘calloc’ Error: Command failed: cc -xc - -o hello.exe -lm -fno-exceptions -fno-ident -ffunction-sections -fdata-sections -O3 Liu.D.H playground 2.157s 13:21 > ``` </details>
8 条评论