Commit Graph

28 Commits

Author SHA1 Message Date
Alejandro Alonso
4e087653f2 Update Unicode data files in stdlib 2025-01-15 14:07:46 -08:00
Ben Barham
684166e24c [embedded] Skip C++ stdlib for unicode stubs
`stdint.h` should be picked up from `clang/lib/Headers`, but is instead
being picked up by the system libc++. There's no C++ stdlib being used
here, so just exclude it.

Resolves rdar://134584685.
2024-09-27 21:19:16 -07:00
Carl Peto
3689427834 [AVR] standard library support for AVR
- when compiling embedded cross compile target standard libraries, include AVR
- add 16-bit pointer as a conditional compilation condition and get the void pointer size right for gyb sources
- attempt to fix clang importer not importing __swift_intptr_t correctly on 16 bit platforms
- changed the unit test target to avr-none-none-elf to match the cmake build

[AVR] got the standard library compiling in a somewhat restricted form:

General
- updated the Embedded Runtime
- tweaked CTypes.swift to fix clang import on 16 bit platforms

Strings
- as discussed in https://forums.swift.org/t/stringguts-stringobject-internals-how-to-layout-on-16-bit-platforms/73130, I went for just using the same basic layout in 16 bit as 32 bit but with 16 bit pointers/ints... the conversation is ongoing, I think something more efficient is possible but at least this compiles and will probably work (inefficiently)

Unicode
- the huge arrays of unicode stuff in UnicodeStubs would not compile, so I skipped it for AVR for now.

Synchronization
- disabled building the Synchronization library on AVR for now. It's arguable if it adds value on this platform anyway.
2024-07-16 12:28:27 +01:00
Alexander Cyon
c21b1e68fd [stdlib] Fix typos 2024-07-06 13:09:57 +02:00
Kuba Mracek
6eeef12849 [embedded] Add a embedded-libraries CMake target to simplify the test dependencies 2024-06-23 13:08:01 -07:00
Eric Miotto
66df28f108 [embedded] use dedicated CMakeLists.txt to build unicode data tables
This will avoid CMake configuration errors in `llvm_process_sources`
 in configurations that build only the the standard library for embedded.

Addresses rdar://130229502
2024-06-20 14:04:28 -07:00
Kuba Mracek
7d92baaddd [embedded] Provide Unicode data tables for embedded as a static library 2024-05-26 13:00:52 -07:00
David Smith
f1feba0e42 Eytzingerize word break data (#71731)
Switch word break property searching to Eytzinger binary search
2024-02-20 22:49:34 -08:00
David Smith
ea7d07714f Switch grapheme break property searching to Eytzinger binary search (#71668) 2024-02-16 16:06:20 -08:00
Alejandro Alonso
04f6e1ad7c Add some more documentation around the scalar arrays 2023-03-30 15:01:12 -07:00
Alejandro Alonso
ade2b754cc Fix Common normData prefix 2023-03-29 13:32:43 -07:00
Alejandro Alonso
cc62bb1ddc Update copyright years 2023-03-29 10:35:30 -07:00
Alejandro Alonso
f16f0c3c23 Update the stdlib to use Unicode 15 data 2023-03-29 10:18:16 -07:00
Egor Zhdan
84a1ffcb33 [Shims] Include SwiftShims headers without ../
This replaces a number of `#include`-s like this:
```
#include "../../../stdlib/public/SwiftShims/Visibility.h"
```
with this:
```
#include "swift/shims/Visibility.h"
```

This is needed to allow SwiftCompilerSources to use C++ headers which include SwiftShims headers. Currently trying to do that results in errors:
```
swift/swift/include/swift/Demangling/../../../stdlib/public/SwiftShims/module.modulemap:1:8: error: redefinition of module 'SwiftShims'
module SwiftShims {
       ^
Builds.noindex/swift/swift/bootstrapping0/lib/swift/shims/module.modulemap:1:8: note: previously defined here
module SwiftShims {
       ^
```
This happens because the headers in both the source dir and the build dir refer to SwiftShims headers by relative path, and both the source root and the build root contain SwiftShims headers (which are equivalent, but since they are located in different dirs, Clang treats them as different modules).
2022-09-14 11:14:50 +01:00
Alejandro Alonso
95da55b182 [stdlib] Implement String.WordView (#42414)
* Implement String.WordView

* Add isWordAligned bit

* Hide WordView for now (also separate Index type)

add bidirectional conformance

Fix tests

* Address comments from Karoy and Michael

* Remove word view, use index methods

* Address Karoy's comments

aaa
2022-06-22 09:10:09 -07:00
Alejandro Alonso
c59f47389f Add Script and Script Extension tests (#59194) 2022-06-01 09:55:09 -07:00
Alejandro Alonso
5fe6a7e247 Add caseFolded to scalar properties 2022-04-10 13:03:13 -07:00
Alejandro Alonso
1a3f791779 Underscore the script APIs
forgot underscore part 2

add build rules back in for right now

indents
2022-04-07 16:20:10 -07:00
Alejandro Alonso
79bf63505b Add Unicode script data to scalar properties 2022-04-06 13:37:04 -07:00
Kuba (Brecka) Mracek
15400c3ef7 Set build-swift-stdlib-unicode-data=0 for the freestanding preset (#41258) 2022-02-08 12:31:49 -08:00
Saleem Abdulrasool
ca39bb5b10 stubs: avoid reaching up-tree, prefer inclusion options
This removes the explicit tree structure reference in the stubs to
locate the shims.  Instead, it expects that the `SwiftShims` directory
will be added to the header search path.
2022-01-14 09:34:56 -08:00
Alejandro Alonso
6ca7366cd8 Merge pull request #40746 from Azoy/indic-grapheme-clusters
[stdlib] Implement the Indic grapheme breaking rules
2022-01-11 12:50:02 -08:00
Alejandro Alonso
4a451829f8 Implement the Indic grapheme breaking rules 2022-01-05 16:18:54 -08:00
David Smith
48399afb03 Merge branch 'main' into unicodectomy 2022-01-03 22:57:37 -08:00
David Smith
f1a5e27821 Add a build flag to disable building Unicode support 2021-12-21 17:26:15 -08:00
Alejandro Alonso
47a8402be6 Define the last scalar offset instead of hard coding it 2021-12-20 15:40:43 -08:00
Alejandro Alonso
76fbb3c139 Some fixes for scalar names 2021-12-20 13:51:45 -08:00
Alejandro Alonso
da246ac287 Use Apple's PUA Unicode data
oops
2021-12-13 03:32:40 -08:00