swiftlang / swift-corelibs-libdispatch

The libdispatch Project, (a.k.a. Grand Central Dispatch), for concurrency on multicore hardware
swift.org
Apache License 2.0
2.47k stars 460 forks source link

Merge libdispatch-1462.0.4 #809

Open AreaZR opened 10 months ago

AreaZR commented 10 months ago

This took a bit of work to ensure every change that happened following the last merge was preserved, but I was eventually able to do it.

This brings libdispatch on par with macOS Sonoma!

triplef commented 9 months ago

Thank you for trying to keep this repo up-to-date!

I just wanted to note that there are a couple errors when trying to build this branch on Android or Windows (and possibly other non-Apple platforms) due to new references to Apple-specific headers/defines:

And on Android there’s also this error:

In file included from /Users/me/libdispatch/src/transform.c:21:
In file included from /Users/me/libdispatch/src/internal.h:222:
In file included from /Users/me/libdispatch/os/workgroup_base.h:13:
In file included from /Users/me/Library/Android/sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/darwin-x86_64/sysroot/usr/local/include/stdlib.h:31:
In file included from /Users/me/Library/Android/sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/darwin-x86_64/sysroot/usr/include/stdlib.h:34:
In file included from /Users/me/Library/Android/sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/darwin-x86_64/sysroot/usr/include/malloc.h:30:
/Users/me/Library/Android/sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/darwin-x86_64/sysroot/usr/include/stdio.h:55:14: error: expected ';' after top level declarator
typedef off_t fpos_t;
             ^
/Users/me/Library/Android/sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/darwin-x86_64/sysroot/usr/include/stdio.h:248:25: error: unknown type name 'fpos_t'; did you mean 'fpos64_t'?
int fgetpos(FILE* __fp, fpos_t* __pos);
                        ^
/Users/me/Library/Android/sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/darwin-x86_64/sysroot/usr/include/stdio.h:56:17: note: 'fpos64_t' declared here
typedef off64_t fpos64_t;
                ^
/Users/me/Library/Android/sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/darwin-x86_64/sysroot/usr/include/stdio.h:249:31: error: unknown type name 'fpos_t'; did you mean 'fpos64_t'?
int fsetpos(FILE* __fp, const fpos_t* __pos);
                              ^
/Users/me/Library/Android/sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/darwin-x86_64/sysroot/usr/include/stdio.h:56:17: note: 'fpos64_t' declared here
typedef off64_t fpos64_t;
                ^

libdispatch-android-build.txt contains the full build instructions and logs for an Android build. Not sure if this is something that would have to be sorted out before a merge.

AreaZR commented 9 months ago

I'm working on it and looking into it!