Skip to content

Commit

Permalink
libdispatch: enable building for x86
Browse files Browse the repository at this point in the history
This is now supported due to our patch for using our own BlocksRuntime.
  • Loading branch information
triplef committed Aug 3, 2021
1 parent b3e335f commit ffdb4a6
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 7 deletions.
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,6 @@ As support for using GNUstep with the MSVC ABI has only been recently added, and

Following is a list of some of the open items.

- [ ] Add support for building libdispatch for x86 (currently blocked by [libdispatch build issue](https://bugs.swift.org/browse/SR-14314))
- [ ] Figure out building Objective-C code in Visual Studio
- [ ] Fix tests in GNUstep Base
- [ ] Provide pre-built binaries
13 changes: 13 additions & 0 deletions patches/libdispatch-fix-stdcall.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git a/src/shims/tsd.h b/src/shims/tsd.h
index 446c4d7..f8b5ec9 100644
--- a/src/shims/tsd.h
+++ b/src/shims/tsd.h
@@ -158,7 +158,7 @@ struct dispatch_tsd {
extern _Thread_local struct dispatch_tsd __dispatch_tsd;

extern void libdispatch_tsd_init(void);
-extern void _libdispatch_tsd_cleanup(void *ctx);
+extern void DISPATCH_TSD_DTOR_CC _libdispatch_tsd_cleanup(void *ctx);

DISPATCH_ALWAYS_INLINE
static inline struct dispatch_tsd *
6 changes: 0 additions & 6 deletions phases/18-libdispatch.bat
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,6 @@ set TAG=
:: load environment and prepare project
call "%~dp0\..\scripts\common.bat" prepare_project || exit /b 1

if "%ARCH%" == "x86" (
echo Skipping libdispatch for x86
echo Blocked on issue: https://bugs.swift.org/browse/SR-14314
exit /b 0
)

set BUILD_DIR="%SRCROOT%\%PROJECT%\build-%ARCH%-%BUILD_TYPE%"
if exist "%BUILD_DIR%" (rmdir /S /Q "%BUILD_DIR%" || exit /b 1)
mkdir "%BUILD_DIR%" || exit /b 1
Expand Down

0 comments on commit ffdb4a6

Please sign in to comment.