Commit Graph

287 Commits

Author SHA1 Message Date
Pierre Muller
e354e8322f Regenerate Makefile's after inc/Makefile.rtl change 2023-08-04 16:33:00 +02:00
Pierre Muller
4bd9ad7dee Regenerated Makefile's after change in inc/Makefile.rtl 2023-08-04 14:48:16 +02:00
Pierre Muller
84c8a68492 Regenerated Makefile's after change in inc/Makefile.rtl 2023-08-04 12:30:48 +02:00
Pierre Muller
d1dca0a815 Regenerated Makefile's after HEAPTRCUNIT change in inc/Makefile.rtl 2023-08-04 11:01:19 +02:00
Pierre Muller
d4172b48bc Regenerated Makefile's after change in inc/Makefile.rtl 2023-08-04 11:00:14 +02:00
Pierre Muller
ec0b830bba Regenerate Makefile's after 21b02cb56b 2023-08-02 22:36:20 +02:00
Pierre Muller
6577cd16e2 Regenerate Makefile's after 0c7c75435d 2023-08-02 15:22:26 +02:00
Pierre Muller
9c68cc9378 Update Makefile's after commit 93c116ff19 2023-08-02 14:22:34 +02:00
Pierre Muller
34169d4fbd Regenerated Makefile's after adding WINDIRSDIR variable 2023-08-02 12:58:30 +02:00
Pierre Muller
2f97637b0f Regenerate Makefile's after change in inc/Makefile.rtl 2023-08-02 11:25:58 +02:00
Pierre Muller
5004889c3c Update Makefile's after cpu unit dependency fix 2023-08-01 10:04:24 +02:00
Pierre Muller
1bfcd45307 Regnerated Makefile's after dependency fixes for debug info units 2023-07-31 14:59:32 +02:00
Michaël Van Canneyt
681a00a76f * Fixes based on feedback of team, fixes issue #40368 2023-07-30 11:19:47 +02:00
Michael VAN CANNEYT
ccfa38c68e * Dotted RTL compiles 2023-07-27 19:04:03 +02:00
Michaël Van Canneyt
f0ef6b08ed * Regenerated makefiles with subtarget support 2023-07-24 16:16:37 +02:00
Michael VAN CANNEYT
78374bf772 * Synchronize API for AnsiString/Unicode string, keep string where possible. 2023-07-24 15:38:09 +02:00
Michael VAN CANNEYT
96c83e7f39 * move $H here 2023-07-14 17:26:11 +02:00
Michael VAN CANNEYT
f6beba0b0b * string -> shortstring 2023-07-14 17:26:11 +02:00
Michael VAN CANNEYT
2ce2bab2a6 * Char -> AnsiChar 2023-07-14 17:26:09 +02:00
Nikolay Nikolov
fa27856478 + added promising _start and _initialize exports 2023-06-17 14:34:09 +03:00
Nikolay Nikolov
b97f3a08ed * since exporting webassembly globals doesn't yet work accross units, added a
workaround by using property getters and setters
2023-06-11 15:00:56 +03:00
Nikolay Nikolov
b247302871 + initial attempt (not fully working, yet) at implementing WebAssembly suspending externals 2023-06-11 14:07:35 +03:00
marcoonthegit
452ec93f06 * implement waitformultiple for win32 only.
* Change interface to allow for COM waiting + a basic windows implementation. (only for desktop apps? Use msgwait* for the rest?)
2023-05-20 14:37:26 +02:00
Dmytro Bogatskyy
327aac7f24 Add aarch64-iphonesim target 2023-03-27 18:45:00 +00:00
Jinyang He
783bbb66f9 Update Makefiles 2023-02-05 19:18:48 +00:00
Nikolay Nikolov
e3139fea21 + setup a thread manager (functions are still not yet implemented), when the WASI RTL is compiled with multithreading support 2022-07-14 05:14:20 +03:00
Nikolay Nikolov
65d8c3d7eb * refactored duplicated code for epoch to datetime and vice versa conversion
between the dos and sysutils units for the WASI platform
2022-06-25 00:40:25 +03:00
marcoonthegit
9e70f49745 * fix missing ifdef for the non win32/64/unix targets.
* also do watcom.
2022-06-01 16:56:02 +02:00
marcoonthegit
e5ac0b2689 * anonymous method overloads for synchronize/queue. 2022-06-01 13:54:06 +02:00
Michaël Van Canneyt
4765d885df * Export wasiAlloc, wasiFree 2022-05-27 19:16:52 +02:00
Nikolay Nikolov
7cac9d2f02 + added AtomicStore() to the WebAssembly unit 2022-05-25 19:39:17 +03:00
Pierre Muller
f12752372f Regenerate Makefile after: Add implicit units to wasi rtl 2022-05-25 18:34:10 +02:00
Pierre Muller
f4964691b0 Add implicit units to wasi rtl 2022-05-25 18:34:10 +02:00
Nikolay Nikolov
585d0cf574 + added unit WebAssembly for WebAssembly-specific stuff. Currently contains
the AtomicFence intrinsic, which emits the atomic.fence instruction.
2022-05-24 14:50:42 +03:00
Nikolay Nikolov
8c562995d7 * regenerate makefiles with latest fpcmake 2022-05-24 14:01:59 +03:00
Nikolay Nikolov
a8b789d183 * patch from Pierre for working around the exitcode <= 125 limitation in wasmtime 2022-05-24 10:15:44 +03:00
Michaël Van Canneyt
1b22a68fc6 * Export wasiAlloc and wasiFree 2022-05-18 14:48:11 +02:00
Pierre Muller
497dd20a08 Regenerate Makefile's with trunk fpcmake 2022-03-27 08:23:22 +00:00
inoussa
163d2ab344 Unicode' unicodenumtable.pas removed : update Makefile.fpc. 2022-03-26 21:17:54 +00:00
Pierre Muller
2f28c5596f Regenerate all Makefile's to fix problem on x86_64 linux 2022-03-07 23:46:15 +00:00
Pierre Muller
ad2ac98858 Update Makefile's 2022-03-07 22:35:29 +00:00
Nikolay Nikolov
590c878690 + added separate startup code for libraries, that declares _initialize, instead of _start 2022-02-16 05:24:41 +02:00
Pierre Muller
4da4c96349 Regenerate Makefile's with mips gcc fixes and new enabled mips64-linux target 2022-02-15 15:45:15 +00:00
Nikolay Nikolov
21593942a1 * regenerate all makefiles with the latest fpcmake 2022-02-13 15:26:54 +02:00
Nikolay Nikolov
68cd1c3973 + define USE_NOTHREADMANAGER in the WASI system unit 2022-01-26 16:39:29 +02:00
Nikolay Nikolov
b407b67ca1 * regenerate all makefiles with latest fpcmake 2022-01-19 07:08:32 +02:00
Robert Roland
53e5a4a03a Adding aaarch64-embedded target
This adds support for aarch64-embedded, specifically for the Raspberry Pi 3.

Uses UART0 at 115200 baud 8N1 for console IO.
2022-01-05 12:29:00 +00:00
Pierre Muller
271ba59cf1 All Makefile's regenerated 2021-11-25 22:13:32 +00:00
florian
65ef6f1f37 * regenerated Makefiles 2021-11-24 22:50:37 +01:00
Nikolay Nikolov
03513720a3 * fixed range check error in the DOS unit 2021-10-20 14:35:52 +03:00
Nikolay Nikolov
6921b968f1 - removed TWasiSearchRec.Mode, because it was unused 2021-10-19 17:31:02 +03:00
Nikolay Nikolov
8c39213d39 + implemented DOS.FSearch for WASI 2021-10-19 16:24:43 +03:00
Nikolay Nikolov
8e730d20db + implemented FindFirst, FindNext and FindClose in SysUtils for the WASI platform 2021-10-19 15:39:59 +03:00
Nikolay Nikolov
090cc8fa8f * moved the FindFirst/FindNext/FindClose code from unit DOS to WasiUtil, using
RawByteString. This will allow to reuse the same implementation in SysUtils.
2021-10-19 13:39:20 +03:00
Nikolay Nikolov
0ead28c1e0 - removed the RtlInfoType record, because it is only used only once in a local
variable. Use an anonymous record instead.
2021-10-19 12:01:14 +03:00
Nikolay Nikolov
6cd88575c6 - removed unused, commented out fields from the RtlInfoType record 2021-10-19 11:51:25 +03:00
Nikolay Nikolov
78c4585b53 * the FNMatch private helper function moved from unit DOS to unit WasiUtil, and
changed to have rawbytestring parameters, so it can be used from SysUtils as
  well.
2021-10-19 11:36:01 +03:00
Nikolay Nikolov
de3ab7e46b * added the fpc_wasi_path_readlink_ansistring helper function to unit wasiutil 2021-10-19 09:39:25 +03:00
Nikolay Nikolov
b2a0df0d10 * ConvertToFdRelativePath removed from the interface part of the WASI system
unit (to avoid cluttering the WASI system unit interface with platform
  dependent routines) and added to a new unit, called wasiutil
2021-10-19 09:06:56 +03:00
Nikolay Nikolov
21d843128d + added a wrapper function around __wasi_path_readlink that calls it iteratively
with doubling buffer sizes, starting with 64 bytes, until it reaches 16384
  bytes, and reads the link into a rawbytestring. Use that function in all
  places in the WASI rtl that need to read a symlink.
2021-10-15 14:33:43 +03:00
Nikolay Nikolov
34587a647f + init the ansistring upper and lower case tables in the WASI SysUtils unit initialization 2021-10-13 06:39:42 +03:00
Nikolay Nikolov
0934df505c + implemented SysUtils.GetLocalTime for WASI 2021-10-13 01:29:04 +03:00
Nikolay Nikolov
099a927331 * fix for the WASI datetime to epoch conversion 2021-10-12 11:27:27 +03:00
Nikolay Nikolov
a55980bfb8 + implemented dos.SetFTime for WASI 2021-10-12 11:06:16 +03:00
Nikolay Nikolov
c4d7773c0e + added platform-specific helper function dos.DTToWasiDate, similar to
DTToUnixDate on Unix
2021-10-12 10:33:28 +03:00
Nikolay Nikolov
ca242e9ad0 + implemented DOS.GetFAttr for WASI 2021-10-12 09:14:14 +03:00
Nikolay Nikolov
4e605fb764 + dummy implementation of dos.SetFAttr for WASI, based on the Unix version 2021-10-12 07:08:32 +03:00
Nikolay Nikolov
00aa7b8ab3 + implemented SysUtils.FileGetAttr for WASI 2021-10-12 05:50:24 +03:00
Nikolay Nikolov
7f7c5785fc * always return an error in SysUtils.FileSetAttr on WASI - this function is not supported by the WASI API 2021-10-12 05:38:16 +03:00
Nikolay Nikolov
809277d2b1 + implemented SysUtils.FileGetSymLinkTarget for WASI 2021-10-12 05:32:53 +03:00
Nikolay Nikolov
1e5ecccdc6 + implemented SysUtils.DirectoryExists for WASI 2021-10-12 03:50:23 +03:00
Nikolay Nikolov
aafb471bc8 * don't set InOutRes in ConvertToFdRelativePath, but return it instead. This
fixes issues in places where this function is used in a way that should not
  set IOResult.
2021-10-12 03:28:03 +03:00
Nikolay Nikolov
4dc0c37678 + implemented SysUtils.FileExists for WASI 2021-10-12 03:28:03 +03:00
Nikolay Nikolov
fe903f2ae4 * fixed range check error in HasDriveLetter when path is 1 character long 2021-10-12 03:28:03 +03:00
Nikolay Nikolov
00d5bb5bbc * fixed off-by-one error when initializing current_drive in the WASI system unit 2021-10-12 03:28:03 +03:00
Nikolay Nikolov
068f781c7a + also implemented FileSetDate(FileName) for WASI, via the __wasi_path_filestat_set_times API call 2021-10-11 17:51:13 +03:00
Nikolay Nikolov
94d8c22c6a + implemented SysUtils.FileSetDate for WASI 2021-10-11 15:51:13 +03:00
Nikolay Nikolov
38075ac30c + implemented SysUtils.FileAge for WASI 2021-10-11 15:26:55 +03:00
Nikolay Nikolov
8f95c14827 + implemented SysUtils.FileGetDate for WASI 2021-10-11 15:08:48 +03:00
Nikolay Nikolov
2a93340bcc + implemented SysUtils.DeleteFile for WASI 2021-10-11 11:27:57 +03:00
Nikolay Nikolov
c8d5bd77a3 - don't call ToSingleByteFileSystemEncodedFileName in SysUtils.FileOpen and
.FileCreate, because ConvertToFdRelativePath already calls it
2021-10-11 11:21:33 +03:00
Nikolay Nikolov
05c6937fd9 + implemented SysUtils.RenameFile for WASI 2021-10-11 11:14:05 +03:00
Nikolay Nikolov
4c89eaa6cf + implemented SysUtils.FileSeek for WASI 2021-10-11 10:50:44 +03:00
Nikolay Nikolov
14f361e13f + implemented SysUtils.FileWrite for WASI 2021-10-11 10:37:11 +03:00
Nikolay Nikolov
09e61201d2 * fixed WASI bug in do_read, where the result of the __wasi_fd_read syscall function was ignored 2021-10-11 10:33:54 +03:00
Nikolay Nikolov
977b2f2a4b + implemented SysUtils.FileRead for WASI 2021-10-11 10:32:50 +03:00
Nikolay Nikolov
305393a9c1 - removed the zero constants from the implementation of SysUtils.FileOpen for WASI 2021-10-11 10:26:06 +03:00
Nikolay Nikolov
0bbc5a7528 + implemented SysUtils.FileCreate for WASI 2021-10-11 10:24:36 +03:00
Nikolay Nikolov
62846f54ad + implemented SysUtils.FileOpen for WASI 2021-10-11 10:11:07 +03:00
Nikolay Nikolov
aa4070ca8a + implemented SysUtils.FileClose for WASI 2021-10-11 09:52:09 +03:00
Nikolay Nikolov
27df4e98d2 * use rawbytestring instead of ansistring for the WASI file name handling 2021-10-11 09:25:01 +03:00
Nikolay Nikolov
a0e7882692 * use AllowDirectorySeparators, instead of checking for '/' and '\' 2021-10-11 09:04:32 +03:00
Nikolay Nikolov
60d350f067 * another instance of ['/','\'] replaced with AllowDirectorySeparators 2021-10-11 08:56:16 +03:00
Nikolay Nikolov
d7755a56f6 * replaced '/' with DirectorySeparator in the WASI directory parsing code 2021-10-11 08:51:39 +03:00
Nikolay Nikolov
13c344a3a0 * replaced ['/','\'] with AllowDirectorySeparators in the WASI directory
parsing code
2021-10-11 08:45:42 +03:00
Nikolay Nikolov
25ac138092 * keep the drive string separate in the preopen and the current dir records on
the WASI platform
2021-10-11 08:38:33 +03:00
Nikolay Nikolov
64db584eef * moved the preopened dir and current dir handling types and variables to the
implementation part of the system unit, so their implementation is not exposed
  and can be changed in the future (e.g. for thread safety when WebAssembly
  gets multithreading support, etc.)
2021-10-10 20:25:29 +03:00
Nikolay Nikolov
a62c7555d7 - removed the DebugWriteXXX functions from the WASI system unit, since console
output is now quite stable and can be used for debugging
2021-10-10 20:25:29 +03:00
Nikolay Nikolov
0d6b5338d0 + implemented ChDir() for WASI 2021-10-10 20:25:29 +03:00
Nikolay Nikolov
85ebd2c94c * fixed handling of relative paths that are not directly relative to a preopened
dir in ConvertToFdRelativePath. This is a preparation for ChDir support.
2021-10-10 20:25:29 +03:00